试卷问题编号重复

dev_forum
SylorHuang 5 years ago
parent 3200739f3f
commit 9bc2c49bb6

@ -7,4 +7,4 @@ json.partial! "exercise_questions/exercise_questions",
exercise_type:1, exercise_type:1,
user_answer:[], user_answer:[],
ques_position:nil, ques_position:nil,
edit_type:1 edit_type:true

@ -6,4 +6,5 @@ json.partial! "exercise_questions/exercise_questions",
shixun_challenges: @exercise_question_shixun, shixun_challenges: @exercise_question_shixun,
exercise_type:1, exercise_type:1,
user_answer:[], user_answer:[],
ques_position:nil ques_position:nil,
edit_type:nil

@ -62,7 +62,8 @@ json.exercise_questions do
exercise_type: ex_type, exercise_type: ex_type,
user_answer: user_ques_answers[:answered_content], user_answer: user_ques_answers[:answered_content],
shixun_type: user_ques_answers[:shixun_type], shixun_type: user_ques_answers[:shixun_type],
ques_position: nil ques_position: nil,
edit_type:nil
if user_ques_comments.count > 0 if user_ques_comments.count > 0
json.question_comments do json.question_comments do
json.partial! "exercises/exercise_comments", question_comment:user_ques_answers[:question_comment].first json.partial! "exercises/exercise_comments", question_comment:user_ques_answers[:question_comment].first

@ -12,7 +12,8 @@ json.exercise_questions do
shixun_challenges: q.exercise_shixun_challenges, shixun_challenges: q.exercise_shixun_challenges,
exercise_type:2, exercise_type:2,
user_answer:[], user_answer:[],
ques_position:nil ques_position:nil,
edit_type:nil
end end
end end

@ -16,7 +16,8 @@ json.exercise_questions do
exercise_type:1, exercise_type:1,
user_answer:[], user_answer:[],
shixun_type:0, shixun_type:0,
ques_position:nil ques_position:nil,
edit_type:nil
end end
end end

@ -19,7 +19,8 @@ json.exercise_questions do
exercise_type:1, exercise_type:1,
user_answer:[], user_answer:[],
shixun_type:0, shixun_type:0,
ques_position:nil ques_position:nil,
edit_type:nil
end end
end end

@ -59,6 +59,7 @@ json.exercise_questions do
choices:question.exercise_choices, choices:question.exercise_choices,
exercise_type:3, exercise_type:3,
shixun_type:question_info[:shixun_type], shixun_type:question_info[:shixun_type],
ques_position: q[:ques_number] ques_position: q[:ques_number],
edit_type:nil
end end
end end
Loading…
Cancel
Save