|
|
@ -335,6 +335,7 @@ class CoursesService
|
|
|
|
8, '您已经是该班级的教师了',
|
|
|
|
8, '您已经是该班级的教师了',
|
|
|
|
9, '您已经是该班级的教辅了',
|
|
|
|
9, '您已经是该班级的教辅了',
|
|
|
|
10, '您已经是该班级的管理员了',
|
|
|
|
10, '您已经是该班级的管理员了',
|
|
|
|
|
|
|
|
11, '该班级不存在或已被删除啦',
|
|
|
|
'未知错误,请稍后再试'
|
|
|
|
'未知错误,请稍后再试'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -348,6 +349,8 @@ class CoursesService
|
|
|
|
if course
|
|
|
|
if course
|
|
|
|
if course_endTime_timeout? course
|
|
|
|
if course_endTime_timeout? course
|
|
|
|
@state = 2
|
|
|
|
@state = 2
|
|
|
|
|
|
|
|
elsif course[:is_delete] == 1
|
|
|
|
|
|
|
|
@state = 11
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if current_user.member_of_course?(course) #如果已经是成员
|
|
|
|
if current_user.member_of_course?(course) #如果已经是成员
|
|
|
|
member = course.members.where("user_id=#{current_user.id} and course_id=#{course.id}")[0]
|
|
|
|
member = course.members.where("user_id=#{current_user.id} and course_id=#{course.id}")[0]
|
|
|
@ -632,7 +635,7 @@ class CoursesService
|
|
|
|
:homework_submit_num => bid.student_works.count,
|
|
|
|
:homework_submit_num => bid.student_works.count,
|
|
|
|
:homework_status_student => get_homework_status( bid),:homework_status_teacher => homework_status_desc( bid),
|
|
|
|
:homework_status_student => get_homework_status( bid),:homework_status_teacher => homework_status_desc( bid),
|
|
|
|
:student_evaluation_part => get_evaluation_part( bid ,3),
|
|
|
|
:student_evaluation_part => get_evaluation_part( bid ,3),
|
|
|
|
:ta_evaluation_part => get_evaluation_part( bid ,2),:homework_anony_type => bid.homework_type == 1 && !bid.homework_detail_manual.nil?}
|
|
|
|
:ta_evaluation_part => get_evaluation_part( bid ,2),:homework_anony_type => bid.homework_type == 1 && !bid.homework_detail_manual.nil?,:current_user_is_teacher => is_course_teacher}
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|