@ -393,17 +393,15 @@ class HomeworkAttachController < ApplicationController
unless annymous_users . nil? || annymous_users . count == 0
unless annymous_users . nil? || annymous_users . count == 0
@anonymous_comments = @homework . journals_for_messages . where ( " is_comprehensive_evaluation = 2 and user_id in #{ convert_array ( annymous_users ) } " ) . order ( " created_on DESC " )
@anonymous_comments = @homework . journals_for_messages . where ( " is_comprehensive_evaluation = 2 and user_id in #{ convert_array ( annymous_users ) } " ) . order ( " created_on DESC " )
end
end
@totle_score = score_for_homework @homework
#@totle_score = score_for_homework @homework
@teaher_score = teacher_score_for_homework @homework
#@teaher_score = teacher_score_for_homework @homework
is_student = is_cur_course_student @homework . bid . courses . first
is_student = is_cur_course_student @homework . bid . courses . first
is_teacher = is_course_teacher User . current , @homework . bid . courses . first
is_teacher = is_course_teacher User . current , @homework . bid . courses . first
@is_anonymous_comments = @homework . bid . comment_status == 1 #是否开启了匿评
@is_anonymous_comments = @homework . bid . comment_status == 1 #是否开启了匿评
if ! User . current . member_of_course? ( @homework . bid . courses . first )
if ! User . current . member_of_course? ( @homework . bid . courses . first )
@is_comprehensive_evaluation = 3 #留言
@is_comprehensive_evaluation = 3 #留言
elsif is_student && @is_anonymous_comments && ! @has_evaluation #是学生且开启了匿评且未进行评分
elsif is_student && @is_anonymous_comments #是学生且开启了匿评
@is_comprehensive_evaluation = 2 #匿评
elsif is_student && @is_anonymous_comments && @has_evaluation #是学生且开启了匿评,但已评分
@is_comprehensive_evaluation = 2 #匿评
@is_comprehensive_evaluation = 2 #匿评
elsif is_student && ! @is_anonymous_comments #是学生未开启匿评
elsif is_student && ! @is_anonymous_comments #是学生未开启匿评
@is_comprehensive_evaluation = 3 #留言
@is_comprehensive_evaluation = 3 #留言