Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
hjm 5 years ago
commit fb422fa51d

@ -21,7 +21,7 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选
user_answer_b = user_answer.include?(a.id) user_answer_b = user_answer.include?(a.id)
json.c_position (index+1) if ex_choice_random_boolean #当选项随机时,选项位置以此为准,否则不出现 json.c_position (index+1) if ex_choice_random_boolean #当选项随机时,选项位置以此为准,否则不出现
json.choice_id a.id json.choice_id a.id
json.choice_text (edit_type.present? ? a.choice_text : "#{(index+65).chr}.#{a.choice_text}") json.choice_text (edit_type.present? || question.question_type == 2) ? a.choice_text : "#{(index+65).chr}.#{a.choice_text}"
json.choice_position a.choice_position json.choice_position a.choice_position
if exercise_type == 1 || exercise_type == 4 #1为教师编辑/预览 试卷或问题2为空白试卷即标准答案和用户答案都不显示3为用户开始答题的显示4为老师评阅试卷或学生在截止后查看试卷 if exercise_type == 1 || exercise_type == 4 #1为教师编辑/预览 试卷或问题2为空白试卷即标准答案和用户答案都不显示3为用户开始答题的显示4为老师评阅试卷或学生在截止后查看试卷
json.standard_boolean standard_answer_b json.standard_boolean standard_answer_b

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