|
|
@ -448,7 +448,7 @@ class ExerciseController < ApplicationController
|
|
|
|
def update_exercise_question
|
|
|
|
def update_exercise_question
|
|
|
|
@exercise_question = ExerciseQuestion.find params[:exercise_question]
|
|
|
|
@exercise_question = ExerciseQuestion.find params[:exercise_question]
|
|
|
|
@exercise_question.question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
|
|
|
|
@exercise_question.question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
|
|
|
|
@exercise_question.question_score = params[:question_score]
|
|
|
|
@exercise_question.question_score = params[:question_score] if @exercise_question.question_type != 5
|
|
|
|
# 处理选项:如果选了某个选项,那么则要删除之前的选项
|
|
|
|
# 处理选项:如果选了某个选项,那么则要删除之前的选项
|
|
|
|
if params[:question_answer]
|
|
|
|
if params[:question_answer]
|
|
|
|
@exercise_question.exercise_choices.each do |answer|
|
|
|
|
@exercise_question.exercise_choices.each do |answer|
|
|
|
|