You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
625 B
23 lines
625 B
json.course do
|
|
json.partial! "polls/course_name",locals:{course:@course}
|
|
end
|
|
|
|
json.question_types do
|
|
json.q_counts @poll_questions_count
|
|
json.q_singles @poll_question_singles
|
|
json.q_doubles @poll_question_doubles
|
|
json.q_mains @poll_question_mains
|
|
end
|
|
|
|
if @poll_questions_count > 0
|
|
json.questions do
|
|
json.array! @poll_questions do |question|
|
|
json.partial! "polls/commit_answers_result", question: question,
|
|
answers:question.poll_answers,
|
|
question_votes:question.poll_votes #问题的全部答案
|
|
end
|
|
end
|
|
else
|
|
json.questions []
|
|
end
|