diff --git a/college/models/assignment.py b/college/models/assignment.py index c427d34..89aa60e 100644 --- a/college/models/assignment.py +++ b/college/models/assignment.py @@ -177,7 +177,7 @@ class SchoolAssignmentSubmission(models.Model): def action_open_batch_wizard(self): """老师批量批改:打开批量打分向导。""" - if not self.env.user.has_group('school.group_teacher'): + if not self.env.user.has_group('college.group_teacher'): raise UserError(_('只有老师可以进行批量批改。')) return { 'name': _('批量批改'), @@ -191,7 +191,7 @@ class SchoolAssignmentSubmission(models.Model): def action_download_attachments(self): """老师批量下载提交文件:把选中的提交记录的附件打包为 zip, zip 内文件名格式为「学员姓名 + 原文件名」,并触发下载。""" - if not self.env.user.has_group('school.group_teacher'): + if not self.env.user.has_group('college.group_teacher'): raise UserError(_('只有老师可以批量下载提交文件。')) submissions = self.filtered(lambda s: s.attachment) if not submissions: diff --git a/college/security/ir.model.access.csv b/college/security/ir.model.access.csv index 7ad2fe0..cbc0a4a 100644 --- a/college/security/ir.model.access.csv +++ b/college/security/ir.model.access.csv @@ -1,30 +1,30 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_yuthon_school_course_admin,yuthon.school.course.admin,model_yuthon_school_course,base.group_system,1,1,1,1 -access_yuthon_school_course_teacher,yuthon.school.course.teacher,model_yuthon_school_course,school.group_teacher,1,1,1,1 -access_yuthon_school_course_student,yuthon.school.course.student,model_yuthon_school_course,school.group_student,1,0,0,0 +access_yuthon_school_course_teacher,yuthon.school.course.teacher,model_yuthon_school_course,college.group_teacher,1,1,1,1 +access_yuthon_school_course_student,yuthon.school.course.student,model_yuthon_school_course,college.group_student,1,0,0,0 access_yuthon_school_student_admin,yuthon.school.student.admin,model_yuthon_school_student,base.group_system,1,1,1,1 -access_yuthon_school_student_teacher,yuthon.school.student.teacher,model_yuthon_school_student,school.group_teacher,1,1,1,1 -access_yuthon_school_student_student,yuthon.school.student.student,model_yuthon_school_student,school.group_student,1,0,0,0 +access_yuthon_school_student_teacher,yuthon.school.student.teacher,model_yuthon_school_student,college.group_teacher,1,1,1,1 +access_yuthon_school_student_student,yuthon.school.student.student,model_yuthon_school_student,college.group_student,1,0,0,0 access_yuthon_school_teacher_admin,yuthon.school.teacher.admin,model_yuthon_school_teacher,base.group_system,1,1,1,1 -access_yuthon_school_teacher_teacher,yuthon.school.teacher.teacher,model_yuthon_school_teacher,school.group_teacher,1,1,1,1 -access_yuthon_school_teacher_student,yuthon.school.teacher.student,model_yuthon_school_teacher,school.group_student,1,0,0,0 +access_yuthon_school_teacher_teacher,yuthon.school.teacher.teacher,model_yuthon_school_teacher,college.group_teacher,1,1,1,1 +access_yuthon_school_teacher_student,yuthon.school.teacher.student,model_yuthon_school_teacher,college.group_student,1,0,0,0 access_yuthon_school_class_admin,yuthon.school.class.admin,model_yuthon_school_class,base.group_system,1,1,1,1 -access_yuthon_school_class_teacher,yuthon.school.class.teacher,model_yuthon_school_class,school.group_teacher,1,1,1,1 -access_yuthon_school_class_student,yuthon.school.class.student,model_yuthon_school_class,school.group_student,1,0,0,0 +access_yuthon_school_class_teacher,yuthon.school.class.teacher,model_yuthon_school_class,college.group_teacher,1,1,1,1 +access_yuthon_school_class_student,yuthon.school.class.student,model_yuthon_school_class,college.group_student,1,0,0,0 access_yuthon_school_progress_admin,yuthon.school.progress.admin,model_yuthon_school_progress,base.group_system,1,1,1,1 -access_yuthon_school_progress_teacher,yuthon.school.progress.teacher,model_yuthon_school_progress,school.group_teacher,1,1,1,1 -access_yuthon_school_progress_student,yuthon.school.progress.student,model_yuthon_school_progress,school.group_student,1,0,0,0 +access_yuthon_school_progress_teacher,yuthon.school.progress.teacher,model_yuthon_school_progress,college.group_teacher,1,1,1,1 +access_yuthon_school_progress_student,yuthon.school.progress.student,model_yuthon_school_progress,college.group_student,1,0,0,0 access_yuthon_school_assignment_admin,yuthon.school.assignment.admin,model_yuthon_school_assignment,base.group_system,1,1,1,1 -access_yuthon_school_assignment_teacher,yuthon.school.assignment.teacher,model_yuthon_school_assignment,school.group_teacher,1,1,1,1 -access_yuthon_school_assignment_student,yuthon.school.assignment.student,model_yuthon_school_assignment,school.group_student,1,0,0,0 +access_yuthon_school_assignment_teacher,yuthon.school.assignment.teacher,model_yuthon_school_assignment,college.group_teacher,1,1,1,1 +access_yuthon_school_assignment_student,yuthon.school.assignment.student,model_yuthon_school_assignment,college.group_student,1,0,0,0 access_yuthon_school_assignment_submission_admin,yuthon.school.assignment.submission.admin,model_yuthon_school_assignment_submission,base.group_system,1,1,1,1 -access_yuthon_school_assignment_submission_teacher,yuthon.school.assignment.submission.teacher,model_yuthon_school_assignment_submission,school.group_teacher,1,1,1,1 -access_yuthon_school_assignment_submission_student,yuthon.school.assignment.submission.student,model_yuthon_school_assignment_submission,school.group_student,1,1,1,0 +access_yuthon_school_assignment_submission_teacher,yuthon.school.assignment.submission.teacher,model_yuthon_school_assignment_submission,college.group_teacher,1,1,1,1 +access_yuthon_school_assignment_submission_student,yuthon.school.assignment.submission.student,model_yuthon_school_assignment_submission,college.group_student,1,1,1,0 access_yuthon_school_assignment_submission_batch_wizard_admin,yuthon.school.assignment.submission.batch.wizard.admin,model_yuthon_school_assignment_submission_batch_wizard,base.group_system,1,1,1,1 -access_yuthon_school_assignment_submission_batch_wizard_teacher,yuthon.school.assignment.submission.batch.wizard.teacher,model_yuthon_school_assignment_submission_batch_wizard,school.group_teacher,1,1,1,1 +access_yuthon_school_assignment_submission_batch_wizard_teacher,yuthon.school.assignment.submission.batch.wizard.teacher,model_yuthon_school_assignment_submission_batch_wizard,college.group_teacher,1,1,1,1 access_yuthon_school_course_chapter_admin,yuthon.school.course.chapter.admin,model_yuthon_school_course_chapter,base.group_system,1,1,1,1 -access_yuthon_school_course_chapter_teacher,yuthon.school.course.chapter.teacher,model_yuthon_school_course_chapter,school.group_teacher,1,1,1,1 -access_yuthon_school_course_chapter_student,yuthon.school.course.chapter.student,model_yuthon_school_course_chapter,school.group_student,1,0,0,0 +access_yuthon_school_course_chapter_teacher,yuthon.school.course.chapter.teacher,model_yuthon_school_course_chapter,college.group_teacher,1,1,1,1 +access_yuthon_school_course_chapter_student,yuthon.school.course.chapter.student,model_yuthon_school_course_chapter,college.group_student,1,0,0,0 access_yuthon_school_course_chapter_attachment_admin,yuthon.school.course.chapter.attachment.admin,model_yuthon_school_course_chapter_attachment,base.group_system,1,1,1,1 -access_yuthon_school_course_chapter_attachment_teacher,yuthon.school.course.chapter.attachment.teacher,model_yuthon_school_course_chapter_attachment,school.group_teacher,1,1,1,1 -access_yuthon_school_course_chapter_attachment_student,yuthon.school.course.chapter.attachment.student,model_yuthon_school_course_chapter_attachment,school.group_student,1,0,0,0 +access_yuthon_school_course_chapter_attachment_teacher,yuthon.school.course.chapter.attachment.teacher,model_yuthon_school_course_chapter_attachment,college.group_teacher,1,1,1,1 +access_yuthon_school_course_chapter_attachment_student,yuthon.school.course.chapter.attachment.student,model_yuthon_school_course_chapter_attachment,college.group_student,1,0,0,0 diff --git a/college/views/chapter_views.xml b/college/views/chapter_views.xml index 05f1c8c..a6c172a 100644 --- a/college/views/chapter_views.xml +++ b/college/views/chapter_views.xml @@ -4,7 +4,7 @@ yuthon.school.course.chapter.form.view yuthon.school.course.chapter 30 - +
@@ -35,7 +35,7 @@ yuthon.school.course.chapter.study.form yuthon.school.course.chapter 20 - +
@@ -78,7 +78,7 @@ yuthon.school.course.study.form yuthon.school.course 10 - +
diff --git a/college/views/course_views.xml b/college/views/course_views.xml index d35339b..f268b9b 100644 --- a/college/views/course_views.xml +++ b/college/views/course_views.xml @@ -66,7 +66,7 @@
@@ -124,14 +124,14 @@
- + @@ -165,7 +165,7 @@
作业名:
-
+
学员:
@@ -213,7 +213,7 @@ - + @@ -223,7 +223,7 @@ - + diff --git a/college/views/menus.xml b/college/views/menus.xml index f5eba19..b98d065 100644 --- a/college/views/menus.xml +++ b/college/views/menus.xml @@ -16,7 +16,7 @@ parent="menu_yuthon_course_root" action="action_yuthon_school_course_my" sequence="10" - groups="school.group_teacher,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_student,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_student,base.group_system"/> + groups="college.group_teacher,base.group_system"/> + groups="college.group_student,base.group_system"/> + groups="college.group_teacher,base.group_system"/> diff --git a/college/views/progress_views.xml b/college/views/progress_views.xml index 0c2d282..281d12c 100644 --- a/college/views/progress_views.xml +++ b/college/views/progress_views.xml @@ -21,7 +21,7 @@ - + @@ -103,7 +103,7 @@
-
+
学员: