|
|
|
@ -146,7 +146,7 @@ class ExerciseController < ApplicationController
|
|
|
|
|
if @exercise_questions.save
|
|
|
|
|
standart_answer = ExerciseStandardAnswer.new
|
|
|
|
|
standart_answer.exercise_question_id = @exercise_questions.id
|
|
|
|
|
@exercise_questions.question_type == 3 ? standart_answer.answer_text = translate_standard_answer(params[:exercise_choice]) : standart_answer.exercise_choice_id = translate_standard_answer(params[:exercise_choice])
|
|
|
|
|
@exercise_questions.question_type == 3 ? standart_answer.answer_text = translate_standard_answer(params[:exercise_choice]) : standart_answer.exercise_choice_id = sigle_selection_standard_answer(params[:exercise_choice])
|
|
|
|
|
standart_answer.save
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.js
|
|
|
|
@ -205,7 +205,6 @@ class ExerciseController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#发布问卷
|
|
|
|
|
def publish_excercise
|
|
|
|
|
@exercise.exercise_status = 2
|
|
|
|
|