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

dev_forum
daiao 5 years ago
commit 5e60a01123

@ -6,10 +6,11 @@ json.question_type question.question_type
json.question_score question.question_score.round(1).to_s
if question.question_type <= 2 #当为选择题或判断题时,只显示选项的位置
standard_answers_array = question.get_standard_answer_ids
exercise_choices = choices.order("choice_position ASC")
ex_choice_random_boolean = (exercise_type.present? && exercise_type == 3 && (question.exercise.choice_random)) ? true : false #问题的选项随机打乱
if ex_choice_random_boolean
exercise_choices = exercise_choices.order("RAND()")
exercise_choices = choices.order("RAND()")
else
exercise_choices = choices.order("choice_position ASC")
end
json.question_choices do
json.array! exercise_choices.each_with_index.to_a do |a,index|

Loading…
Cancel
Save