Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

schedule_job
杨树明 5 years ago
commit 2dd899b458

@ -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

@ -99,9 +99,9 @@ class Users::ShixunService
end
case params[:category]
when 'study', 'collect' then
when 'study' then
relations.order("myshixuns.#{sort_by} #{sort_direction}")
when 'manage' then
when 'manage', 'collect' then
relations.order("shixuns.#{sort_by} #{sort_direction}")
else
relations.order("shixuns.#{sort_by} #{sort_direction}")

Loading…
Cancel
Save