试卷调整

schedule_job
cxt 5 years ago
parent 0945fb6049
commit c417f6a23b

@ -998,7 +998,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.commit_status == 1 && (exercise_user.exercise_user_scores.size > 0 || exercise_user.subjective_score >= 0.0 ||
exercise_user.commit_status == 1 && (exercise_user.exercise_user_scores.size > 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