diff --git a/app/views/exercise_questions/_exercise_questions.json.jbuilder b/app/views/exercise_questions/_exercise_questions.json.jbuilder index b5a01ed06..7a05c2e11 100644 --- a/app/views/exercise_questions/_exercise_questions.json.jbuilder +++ b/app/views/exercise_questions/_exercise_questions.json.jbuilder @@ -1,6 +1,6 @@ json.question_id question.id # json.question_number question.question_number -json.q_position question.question_number +json.q_position ques_position.present? ? ques_position : question.question_number json.question_title question.question_title json.question_type question.question_type json.question_score question.question_score.round(1).to_s diff --git a/app/views/exercises/start_answer.json.jbuilder b/app/views/exercises/start_answer.json.jbuilder index fb9916696..4cc461d56 100644 --- a/app/views/exercises/start_answer.json.jbuilder +++ b/app/views/exercises/start_answer.json.jbuilder @@ -36,9 +36,9 @@ json.partial! "exercises/exercise_scores" json.exercise_questions do json.array! @exercise_all_questions do |q| question = q[:question] - ques_position = q[:ques_number] #问题的序号,当问题为随机时,重新更新后的问题序号 + # ques_position = q[:ques_number] #问题的序号,当问题为随机时,重新更新后的问题序号 question_info = get_exercise_question_info(question,@exercise,@exercise_user_current,@ex_answerer.id) - json.q_position ques_position + # json.q_position q[:ques_number] #问题的序号,当问题为随机时,重新更新后的问题序号 if @t_user_exercise_status == 3 this_answer_status = "0.0" user_score = "0.0" @@ -58,6 +58,7 @@ json.exercise_questions do user_answer: question_info[:answered_content], choices:question.exercise_choices, exercise_type:3, - shixun_type:question_info[:shixun_type] + shixun_type:question_info[:shixun_type], + ques_position: q[:ques_number] end end \ No newline at end of file