|
|
|
@ -16,7 +16,16 @@ namespace :excellent_course_exercise do
|
|
|
|
|
exercise_1884 = course.exercises.find_by(id: 1884)
|
|
|
|
|
members_1.each_with_index do |member, index|
|
|
|
|
|
if index < 821
|
|
|
|
|
|
|
|
|
|
exercise_1884.exercise_questions.where.not(question_type: 5).each do |question|
|
|
|
|
|
answer_option = {
|
|
|
|
|
:user_id => current_user.id,
|
|
|
|
|
:exercise_question_id => @exercise_question.id,
|
|
|
|
|
:exercise_choice_id => choice_id,
|
|
|
|
|
:answer_text => ""
|
|
|
|
|
}
|
|
|
|
|
ex_a = ExerciseAnswer.new(answer_option)
|
|
|
|
|
ex_a.save!
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|