|
|
|
@ -20,7 +20,7 @@ class HomeworkService
|
|
|
|
|
many_times = course.homeworks.index(@bid) + 1
|
|
|
|
|
name = @bid.name
|
|
|
|
|
homework_count = @bid.homeworks.count #已提交的作业数量
|
|
|
|
|
student_questions_count = @bid.commit.nil? ? 0 : @bid.commit
|
|
|
|
|
student_questions_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count
|
|
|
|
|
description = @bid.description
|
|
|
|
|
#if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2
|
|
|
|
|
state = @bid.comment_status
|
|
|
|
@ -282,7 +282,7 @@ class HomeworkService
|
|
|
|
|
many_times = course.homeworks.index(@bid) + 1
|
|
|
|
|
name = @bid.name
|
|
|
|
|
homework_count = @bid.homeworks.count #已提交的作业数量
|
|
|
|
|
student_questions_count = @bid.commit.nil? ? 0 : @bid.commit
|
|
|
|
|
student_questions_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count
|
|
|
|
|
description = @bid.description
|
|
|
|
|
#if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2
|
|
|
|
|
state = @bid.comment_status
|
|
|
|
|