dev_course
SylorHuang 6 years ago
parent 523b646a4c
commit e318ee25b5

@ -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

@ -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
Loading…
Cancel
Save