From 2ec730e4fd1772250b1ea8f06b9cbc39b10b6e32 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 22 Jun 2019 10:01:13 +0800 Subject: [PATCH] fix bug --- app/views/exercise_questions/edit.json.jbuilder | 3 ++- app/views/exercise_questions/show.json.jbuilder | 3 ++- app/views/exercises/_user_exercise_info.json.jbuilder | 3 ++- app/views/exercises/blank_exercise.json.jbuilder | 3 ++- app/views/exercises/edit.json.jbuilder | 3 ++- app/views/exercises/show.json.jbuilder | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/views/exercise_questions/edit.json.jbuilder b/app/views/exercise_questions/edit.json.jbuilder index 32567d813..35db720c7 100644 --- a/app/views/exercise_questions/edit.json.jbuilder +++ b/app/views/exercise_questions/edit.json.jbuilder @@ -5,4 +5,5 @@ json.partial! "exercise_questions/exercise_questions", choices:@exercise_choices, shixun_challenges: @exercise_question_shixun, exercise_type:1, - user_answer:[] \ No newline at end of file + user_answer:[], + ques_position:nil \ No newline at end of file diff --git a/app/views/exercise_questions/show.json.jbuilder b/app/views/exercise_questions/show.json.jbuilder index e8662a611..c27fe21a5 100644 --- a/app/views/exercise_questions/show.json.jbuilder +++ b/app/views/exercise_questions/show.json.jbuilder @@ -5,4 +5,5 @@ json.partial! "exercise_questions/exercise_questions", choices:@exercise_choices, shixun_challenges: @exercise_question_shixun, exercise_type:1, - user_answer:[] + user_answer:[], + ques_position:nil diff --git a/app/views/exercises/_user_exercise_info.json.jbuilder b/app/views/exercises/_user_exercise_info.json.jbuilder index a3b7b208c..5b5d0c725 100644 --- a/app/views/exercises/_user_exercise_info.json.jbuilder +++ b/app/views/exercises/_user_exercise_info.json.jbuilder @@ -62,7 +62,8 @@ json.exercise_questions do shixun_challenges: q.exercise_shixun_challenges, exercise_type: ex_type, user_answer: user_ques_answers[:answered_content], - shixun_type: user_ques_answers[:shixun_type] + shixun_type: user_ques_answers[:shixun_type], + ques_position:nil if user_ques_comments.count > 0 json.question_comments do json.partial! "exercises/exercise_comments", question_comment:user_ques_answers[:question_comment].first diff --git a/app/views/exercises/blank_exercise.json.jbuilder b/app/views/exercises/blank_exercise.json.jbuilder index 631f0dcb3..16b5449fb 100644 --- a/app/views/exercises/blank_exercise.json.jbuilder +++ b/app/views/exercises/blank_exercise.json.jbuilder @@ -11,7 +11,8 @@ json.exercise_questions do choices:q.exercise_choices, shixun_challenges: q.exercise_shixun_challenges, exercise_type:2, - user_answer:[] + user_answer:[], + ques_position:nil end end diff --git a/app/views/exercises/edit.json.jbuilder b/app/views/exercises/edit.json.jbuilder index 61ec71db5..71a6fcf07 100644 --- a/app/views/exercises/edit.json.jbuilder +++ b/app/views/exercises/edit.json.jbuilder @@ -15,7 +15,8 @@ json.exercise_questions do shixun_challenges: q.exercise_shixun_challenges, exercise_type:1, user_answer:[], - shixun_type:0 + shixun_type:0, + ques_position:nil end end diff --git a/app/views/exercises/show.json.jbuilder b/app/views/exercises/show.json.jbuilder index 8f6517c2c..d92eebeab 100644 --- a/app/views/exercises/show.json.jbuilder +++ b/app/views/exercises/show.json.jbuilder @@ -18,7 +18,8 @@ json.exercise_questions do shixun_challenges: q.exercise_shixun_challenges, exercise_type:1, user_answer:[], - shixun_type:0 + shixun_type:0, + ques_position:nil end end