From 9bc2c49bb698b9f1a32f53848e3713dc313020f4 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Tue, 23 Jul 2019 14:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E9=97=AE=E9=A2=98=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise_questions/edit.json.jbuilder | 2 +- 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 ++- app/views/exercises/start_answer.json.jbuilder | 3 ++- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/views/exercise_questions/edit.json.jbuilder b/app/views/exercise_questions/edit.json.jbuilder index 41bd61487..bf9272026 100644 --- a/app/views/exercise_questions/edit.json.jbuilder +++ b/app/views/exercise_questions/edit.json.jbuilder @@ -7,4 +7,4 @@ json.partial! "exercise_questions/exercise_questions", exercise_type:1, user_answer:[], ques_position:nil, - edit_type:1 + edit_type:true diff --git a/app/views/exercise_questions/show.json.jbuilder b/app/views/exercise_questions/show.json.jbuilder index c27fe21a5..d10e41093 100644 --- a/app/views/exercise_questions/show.json.jbuilder +++ b/app/views/exercise_questions/show.json.jbuilder @@ -6,4 +6,5 @@ json.partial! "exercise_questions/exercise_questions", shixun_challenges: @exercise_question_shixun, exercise_type:1, user_answer:[], - ques_position:nil + ques_position:nil, + edit_type:nil diff --git a/app/views/exercises/_user_exercise_info.json.jbuilder b/app/views/exercises/_user_exercise_info.json.jbuilder index e690f4867..0d21cc593 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 exercise_type: ex_type, user_answer: user_ques_answers[:answered_content], shixun_type: user_ques_answers[:shixun_type], - ques_position: nil + ques_position: nil, + edit_type: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 16b5449fb..a23f8e3b4 100644 --- a/app/views/exercises/blank_exercise.json.jbuilder +++ b/app/views/exercises/blank_exercise.json.jbuilder @@ -12,7 +12,8 @@ json.exercise_questions do shixun_challenges: q.exercise_shixun_challenges, exercise_type:2, user_answer:[], - ques_position:nil + ques_position:nil, + edit_type:nil end end diff --git a/app/views/exercises/edit.json.jbuilder b/app/views/exercises/edit.json.jbuilder index 71a6fcf07..587783c7d 100644 --- a/app/views/exercises/edit.json.jbuilder +++ b/app/views/exercises/edit.json.jbuilder @@ -16,7 +16,8 @@ json.exercise_questions do exercise_type:1, user_answer:[], shixun_type:0, - ques_position:nil + ques_position:nil, + edit_type:nil end end diff --git a/app/views/exercises/show.json.jbuilder b/app/views/exercises/show.json.jbuilder index d92eebeab..afd15e8e7 100644 --- a/app/views/exercises/show.json.jbuilder +++ b/app/views/exercises/show.json.jbuilder @@ -19,7 +19,8 @@ json.exercise_questions do exercise_type:1, user_answer:[], shixun_type:0, - ques_position:nil + ques_position:nil, + edit_type:nil end end diff --git a/app/views/exercises/start_answer.json.jbuilder b/app/views/exercises/start_answer.json.jbuilder index 42d611712..53336bf6f 100644 --- a/app/views/exercises/start_answer.json.jbuilder +++ b/app/views/exercises/start_answer.json.jbuilder @@ -59,6 +59,7 @@ json.exercise_questions do choices:question.exercise_choices, exercise_type:3, shixun_type:question_info[:shixun_type], - ques_position: q[:ques_number] + ques_position: q[:ques_number], + edit_type:nil end end \ No newline at end of file