1.5.1.sql 5.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. delete from b_privilege t where t.code in ('exam_report_subject','exam_report_subject_range');
  9. delete from b_role_privilege t where t.privilege_code in ('exam_report_subject','exam_report_subject_range');
  10. 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');
  11. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
  12. VALUES ('exam_report_subject', '科目分析', 'root_code', 'MENU', '/admin/basic/role/info/sub/page', 110,1,'icon-asterisk','index.report.subject');
  13. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  14. VALUES ('exam_report_subject-total', '总量分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubject', 10,2);
  15. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  16. VALUES ('exam_report_subject-range', '分段统计', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectRange', 20,2);
  17. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  18. VALUES ('exam_report_subject-college', '学院分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectCollege', 30,2);
  19. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  20. VALUES ('exam_report_subject-teacher', '任课老师分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectTeacher', 40,2);
  21. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  22. VALUES ('exam_report_subject-class', '班级分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectClass', 50,2);
  23. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  24. VALUES ('exam_report_subject-objective_question', '客观题分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectQuestion', 60,2);
  25. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  26. VALUES ('exam_report_subject-subjective_question', '主观题分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectQuestion', 70,2);
  27. INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`)
  28. VALUES ('exam_report_subject-group', '大题分析', 'exam_report_subject', 'PAGE', '/admin/exam/reportSubjectGroup', 80,2);
  29. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  30. SELECT s.id,'SCHOOL_ADMIN',p.`code`,1 from b_privilege p join b_school s
  31. where p.`code` in('exam_report_subject','exam_report_subject-total','exam_report_subject-range','exam_report_subject-college',
  32. 'exam_report_subject-teacher','exam_report_subject-class'
  33. ,'exam_report_subject-objective_question','exam_report_subject-subjective_question','exam_report_subject-group');
  34. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  35. SELECT s.id,'SUBJECT_HEADER',p.`code`,1 from b_privilege p join b_school s
  36. where p.`code` in('exam_report_subject','exam_report_subject-total','exam_report_subject-range','exam_report_subject-college',
  37. 'exam_report_subject-teacher','exam_report_subject-class'
  38. ,'exam_report_subject-objective_question','exam_report_subject-subjective_question','exam_report_subject-group');
  39. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  40. SELECT s.id,'COLLEGE_ADMIN',p.`code`,1 from b_privilege p join b_school s
  41. where p.`code` in('exam_report_subject','exam_report_subject-total','exam_report_subject-range','exam_report_subject-college',
  42. 'exam_report_subject-teacher','exam_report_subject-class'
  43. ,'exam_report_subject-objective_question','exam_report_subject-subjective_question','exam_report_subject-group');
  44. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  45. SELECT s.id,'SCHOOL_VIEWER',p.`code`,1 from b_privilege p join b_school s
  46. where p.`code` in('exam_report_subject','exam_report_subject-total');
  47. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  48. SELECT s.id,'SCHOOL_ADMIN',p.`code`,1 from b_privilege p join b_school s
  49. where p.`code` in('exam_mark-group-add','exam_mark-group-edit','exam_mark-group-reset_edit','exam_mark-group-delete');
  50. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  51. SELECT s.id,'SUBJECT_HEADER',p.`code`,0 from b_privilege p join b_school s
  52. where p.`code` in('exam_mark-group-add','exam_mark-group-edit','exam_mark-group-reset_edit','exam_mark-group-delete');
  53. INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
  54. SELECT s.id,'COLLEGE_ADMIN',p.`code`,0 from b_privilege p join b_school s
  55. where p.`code` in('exam_mark-group-add','exam_mark-group-edit','exam_mark-group-reset_edit','exam_mark-group-delete');