|
|
|
@ -1342,6 +1342,7 @@ class ExerciseController < ApplicationController
|
|
|
|
|
if exercise_user
|
|
|
|
|
exercise_user.update_attributes(:score => nil, :start_at => nil, :end_at => nil, :status => nil, :commit_status => 0, :objective_score => -1, :subjective_score => -1)
|
|
|
|
|
exercise_user.user.exercise_answer.where(:exercise_question_id => @exercise.exercise_questions.map(&:id)).destroy_all
|
|
|
|
|
exercise_user.exercise_user_questions.destroy_all
|
|
|
|
|
exercise_user.user.exercise_shixun_answers.where(:exercise_question_id => @exercise.exercise_questions.map(&:id)).destroy_all
|
|
|
|
|
end
|
|
|
|
|
redirect_to student_exercise_list_exercise_path(@exercise)
|
|
|
|
|