Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
5e0debec70
@ -1,18 +0,0 @@
|
|||||||
json.question do
|
|
||||||
json.id question.id
|
|
||||||
json.question_number question.question_number
|
|
||||||
json.question_title question.question_title
|
|
||||||
json.question_type question.question_type
|
|
||||||
json.is_necessary question.is_necessary
|
|
||||||
if question.question_type == 2
|
|
||||||
json.max_choices question.max_choices
|
|
||||||
json.min_choices question.min_choices
|
|
||||||
end
|
|
||||||
json.answers do
|
|
||||||
json.array! answers do | a|
|
|
||||||
json.answer_id a.id
|
|
||||||
json.answer_position a.choice_position
|
|
||||||
json.answer_text a.choice_text.nil? ? "other_choices" : a.choice_text ##
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,9 +1,14 @@
|
|||||||
|
|
||||||
json.count @count
|
json.count @count
|
||||||
json.course_list @course_lists, partial: 'users/question_banks/shared/course_list', as: :course_list
|
json.course_list @course_lists, partial: 'users/question_banks/shared/course_list', as: :course_list
|
||||||
json.question_banks do
|
|
||||||
json.array! @question_banks do |question_bank|
|
json.question_banks @question_banks do |question_bank|
|
||||||
json.partial! 'users/question_banks/shared/question_bank', locals: { question_bank: question_bank }
|
json.id question_bank.id
|
||||||
json.solve_count @solve_count_map.fetch(question_bank.id, 0)
|
json.name question_bank.name
|
||||||
end
|
json.is_public question_bank.is_public
|
||||||
|
json.quotes_count question_bank.quotes
|
||||||
|
json.creator_name question_bank.user.name
|
||||||
|
json.course_list_name question_bank.course_list.name
|
||||||
|
json.updated_at question_bank.updated_at
|
||||||
|
json.solve_count @solve_count_map.fetch(question_bank.id, 0)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue