试卷是否已评阅

schedule_job
cxt 5 years ago
parent beffb6bf83
commit f4f6b42206

@ -997,7 +997,7 @@ module ExercisesHelper
def has_comment? exercise_user, question_ids
exercise_answer_ids = exercise_user.user.exercise_answers.where(exercise_question_id: question_ids).pluck(:id)
exercise_shixun_answer_ids = exercise_user.user.exercise_shixun_answers.where(exercise_question_id: question_ids).pluck(:id)
exercise_user.exercise_user_scores.size > 0 || exercise_user.subjective_score >= 0.0 ||
ExerciseAnswerComment.where(exercise_answer_id: exercise_answer_ids).or(ExerciseAnswerComment.where(exercise_shixun_answer_id: exercise_shixun_answer_ids)).exists?
exercise_user.comment_status == 1 && (exercise_user.exercise_user_scores.size > 0 || exercise_user.subjective_score >= 0.0 ||
ExerciseAnswerComment.where(exercise_answer_id: exercise_answer_ids).or(ExerciseAnswerComment.where(exercise_shixun_answer_id: exercise_shixun_answer_ids)).exists?)
end
end

Loading…
Cancel
Save