1.5.1.sql 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. -- 1.5.1
  2. USE `stmms_ft`;
  3. ALTER TABLE eb_marker ADD COLUMN `finish_count_na` int(11) DEFAULT NULL COMMENT '完成数量不含仲裁';
  4. ALTER TABLE eb_marker ADD COLUMN `valid_count_na` int(11) DEFAULT NULL COMMENT '有效数量不含仲裁';
  5. ALTER TABLE eb_marker ADD COLUMN `avg_score_na` double DEFAULT NULL COMMENT '平均分不含仲裁';
  6. ALTER TABLE eb_marker ADD COLUMN `avg_speed_na` double DEFAULT NULL COMMENT '平均时长不含仲裁';
  7. ALTER TABLE eb_marker ADD COLUMN `stdev_score_na` double DEFAULT NULL COMMENT '标准差不含仲裁';
  8. ALTER TABLE eb_exam ADD COLUMN `inspect_round_limit` tinyint(1) NOT NULL DEFAULT 1 COMMENT '全卷复核进度100%时才能再次复核';
  9. delete from b_privilege t where t.code in ('exam_report_subject','exam_report_subject_range');
  10. delete from b_role_privilege t where t.privilege_code in ('exam_report_subject','exam_report_subject_range');
  11. delete from b_role_privilege t where t.privilege_code in ('exam_mark-group-add','exam_mark-group-edit','exam_mark-group-reset_edit','exam_mark-group-delete');
  12. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
  13. VALUES ('exam_report_subject', '科目分析', 'root_code', 'MENU', '/admin/basic/role/info/sub/page', 110,1,'icon-asterisk','index.report.subject');
  14. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  15. VALUES ('exam_report_subject-total', '总量分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubject', 10,2);
  16. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  17. VALUES ('exam_report_subject-range', '分段统计', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectRange', 20,2);
  18. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  19. VALUES ('exam_report_subject-college', '学院分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectCollege', 30,2);
  20. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  21. VALUES ('exam_report_subject-teacher', '任课老师分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectTeacher', 40,2);
  22. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  23. VALUES ('exam_report_subject-class', '班级分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectClass', 50,2);
  24. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  25. VALUES ('exam_report_subject-objective_question', '客观题分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectQuestion', 60,2);
  26. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  27. VALUES ('exam_report_subject-subjective_question', '主观题分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectQuestion', 70,2);
  28. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  29. VALUES ('exam_report_subject-group', '大题分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectGroup', 80,2);
  30. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  31. SELECT s.id,'SCHOOL_ADMIN',p.`code`,1 from b_privilege p join b_school s
  32. where p.`code` in('exam_report_subject','exam_report_subject-total','exam_report_subject-range','exam_report_subject-college',
  33. 'exam_report_subject-teacher','exam_report_subject-class'
  34. ,'exam_report_subject-objective_question','exam_report_subject-subjective_question','exam_report_subject-group');
  35. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  36. SELECT s.id,'SUBJECT_HEADER',p.`code`,1 from b_privilege p join b_school s
  37. where p.`code` in('exam_report_subject','exam_report_subject-total','exam_report_subject-range','exam_report_subject-college',
  38. 'exam_report_subject-teacher','exam_report_subject-class'
  39. ,'exam_report_subject-objective_question','exam_report_subject-subjective_question','exam_report_subject-group');
  40. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  41. SELECT s.id,'COLLEGE_ADMIN',p.`code`,1 from b_privilege p join b_school s
  42. where p.`code` in('exam_report_subject','exam_report_subject-total','exam_report_subject-range','exam_report_subject-college',
  43. 'exam_report_subject-teacher','exam_report_subject-class'
  44. ,'exam_report_subject-objective_question','exam_report_subject-subjective_question','exam_report_subject-group');
  45. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  46. SELECT s.id,'SCHOOL_VIEWER',p.`code`,1 from b_privilege p join b_school s
  47. where p.`code` in('exam_report_subject','exam_report_subject-total');
  48. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  49. SELECT s.id,'SCHOOL_ADMIN',p.`code`,1 from b_privilege p join b_school s
  50. where p.`code` in('exam_mark-group-add','exam_mark-group-edit','exam_mark-group-reset_edit','exam_mark-group-delete');
  51. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  52. SELECT s.id,'SUBJECT_HEADER',p.`code`,0 from b_privilege p join b_school s
  53. where p.`code` in('exam_mark-group-add','exam_mark-group-edit','exam_mark-group-reset_edit','exam_mark-group-delete');
  54. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  55. SELECT s.id,'COLLEGE_ADMIN',p.`code`,0 from b_privilege p join b_school s
  56. where p.`code` in('exam_mark-group-add','exam_mark-group-edit','exam_mark-group-reset_edit','exam_mark-group-delete');