试卷列表增加编程题

dev_chen
cxt 5 years ago
parent 83993dc99d
commit 2b75716e0f

@ -145,7 +145,7 @@ class ExercisesController < ApplicationController
#试卷的内容,及试题/答案的内容编辑
def edit
ActiveRecord::Base.transaction do
@exercise_questions = @exercise.exercise_questions.order("question_number ASC")
@exercise_questions = @exercise.exercise_questions.includes(:hack).order("question_number ASC")
end
end

@ -121,4 +121,9 @@ elsif question.question_type == 5
end
end
end
elsif question.question_type == 6
hack = question.hack
json.hack_identifier hack.identifier
json.description hack.description
json.hack_id hack.id
end
Loading…
Cancel
Save