@ -117,7 +117,7 @@ class HomeworkService
@is_anonymous_comments = @bid . comment_status == 1 && ! @homework . users . include? ( current_user ) && @homework . user != current_user && ! @is_teacher #判断是不是匿评(开启匿评,当前用户不是作业的创建者或者参与者,不是老师)
@is_anonymous_comments = @bid . comment_status == 1 && ! @homework . users . include? ( current_user ) && @homework . user != current_user && ! @is_teacher #判断是不是匿评(开启匿评,当前用户不是作业的创建者或者参与者,不是老师)
jours = @homework . journals_for_messages . where ( " is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null " ) . order ( " created_on DESC " ) #jours留言 is null条件用以兼容历史数据
jours = @homework . journals_for_messages . where ( " is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null " ) . order ( " created_on DESC " ) #jours留言 is null条件用以兼容历史数据
#@jour = paginateHelper jours,5 #留言
#@jour = paginateHelper jours,5 #留言
#@cur_page = params[:cur_page] || 1
@cur_page = params [ :cur_page ] || 1
@cur_type = params [ :cur_type ] || 5
@cur_type = params [ :cur_type ] || 5
teacher_stars_json_like = stars_to_json_like ( @teacher_stars , true , @homework , true )
teacher_stars_json_like = stars_to_json_like ( @teacher_stars , true , @homework , true )
student_stars_json_like = stars_to_json_like ( @student_stars , false , @homework , ( false || @is_teacher ) )
student_stars_json_like = stars_to_json_like ( @student_stars , false , @homework , ( false || @is_teacher ) )
@ -126,7 +126,7 @@ class HomeworkService
end
end
[ @homework , { :is_teacher = > @is_teacher , :m_score = > @m_score , :jours = > jours , :teacher_stars = > teacher_stars_json_like ,
[ @homework , { :is_teacher = > @is_teacher , :m_score = > @m_score , :jours = > jours , :teacher_stars = > teacher_stars_json_like ,
:student_stars = > student_stars_json_like , :is_anonymous_comments = > @is_anonymous_comments , :cur_type = > @cur_type }]
:student_stars = > student_stars_json_like , :is_anonymous_comments = > @is_anonymous_comments , :cur_type = > @cur_type ,:cur_page = > @cur_page }]
#name = @homework.name
#name = @homework.name
#desc = @homework.description
#desc = @homework.description
#datetime = @homework.created_at
#datetime = @homework.created_at