毕设任务作品列表的调整

dev_course
cxt 6 years ago
parent 0c29de6755
commit ba08f9adb1

@ -27,7 +27,7 @@ class CoursesController < ApplicationController
before_action :teacher_allowed, only: [:update, :destroy, :settings, :search_teacher_candidate, before_action :teacher_allowed, only: [:update, :destroy, :settings, :search_teacher_candidate,
:transfer_to_course_group, :delete_from_course, :transfer_to_course_group, :delete_from_course,
:search_users, :add_students_by_search, :get_historical_courses, :add_teacher_popup, :add_teacher] :search_users, :add_students_by_search, :get_historical_courses, :add_teacher_popup, :add_teacher]
before_action :admin_allowed, only: [:set_invite_code_halt, :set_public_or_private, before_action :admin_allowed, only: [:set_invite_code_halt, :set_public_or_private, :join_graduation_group,
:set_course_group, :change_course_admin, :change_course_teacher, :set_course_group, :change_course_admin, :change_course_teacher,
:delete_course_teacher, :teacher_application_review, :create_group_by_importing_file] :delete_course_teacher, :teacher_application_review, :create_group_by_importing_file]
before_action :teacher_or_admin_allowed, only: [:graduation_group_list, :create_graduation_group, :join_graduation_group, before_action :teacher_or_admin_allowed, only: [:graduation_group_list, :create_graduation_group, :join_graduation_group,

@ -53,7 +53,7 @@ class GraduationWork < ApplicationRecord
# 分班名 # 分班名
def class_grouping_name def class_grouping_name
CourseMember.find_by(user_id: self.user_id, course_id: self.course_id).try(:course_group).try(:name) || '未分班' CourseMember.find_by(user_id: self.user_id, course_id: self.course_id, role: 4).try(:course_group).try(:name) || '未分班'
end end
# 分组名 # 分组名

@ -32,7 +32,7 @@ if @task.published? || @user_course_identity < Course::STUDENT
json.array! @work_list do |work| json.array! @work_list do |work|
json.id work.id json.id work.id
json.user_id work.user.id json.user_id work.user.id
json.name work.user.full_name json.name work.user.real_name
json.student_id work.user.student_id json.student_id work.user.student_id
json.class_grouping_name work.class_grouping_name json.class_grouping_name work.class_grouping_name
if @task.have_grouping? if @task.have_grouping?

Loading…
Cancel
Save