|
|
|
@ -45,8 +45,8 @@ namespace :excellent_course_exercise do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if exercise_user && exercise_user.commit_status == 0
|
|
|
|
|
exercise_question_ids = exercise_question_ids.sample(rand_num)
|
|
|
|
|
questions = exercise.exercise_questions.where(id: exercise_question_ids)
|
|
|
|
|
question_ids = exercise_question_ids.sample(rand_num)
|
|
|
|
|
questions = exercise.exercise_questions.where(id: question_ids)
|
|
|
|
|
create_exercise_answer questions, member.user_id
|
|
|
|
|
|
|
|
|
|
total_score = calculate_student_score(exercise, member.user)
|
|
|
|
|