|
|
|
@ -35,15 +35,16 @@ json.commit_results do
|
|
|
|
|
if q[:type] != Exercise::PRACTICAL
|
|
|
|
|
json.ques_details do
|
|
|
|
|
json.array! q[:ques_details].each_with_index.to_a do |d,index|
|
|
|
|
|
if q[:type] <= Exercise::MULTIPLE
|
|
|
|
|
ques_index = (index+65).chr
|
|
|
|
|
elsif q[:type] == Exercise::JUDGMENT
|
|
|
|
|
ques_index = (index+1).to_s
|
|
|
|
|
else
|
|
|
|
|
ques_index = nil
|
|
|
|
|
end
|
|
|
|
|
# if q[:type] <= Exercise::MULTIPLE
|
|
|
|
|
# ques_index = (index+65).chr
|
|
|
|
|
# elsif q[:type] == Exercise::JUDGMENT
|
|
|
|
|
# ques_index = (index+1).to_s
|
|
|
|
|
# else
|
|
|
|
|
# ques_index = nil
|
|
|
|
|
# end
|
|
|
|
|
json.choice_position d[:choice_position]
|
|
|
|
|
json.choice_text ques_index.present? ? "#{ques_index}.#{d[:choice_text]}" : d[:choice_text]
|
|
|
|
|
# json.choice_text ques_index.present? ? "#{ques_index}.#{d[:choice_text]}" : d[:choice_text]
|
|
|
|
|
json.choice_text d[:choice_text]
|
|
|
|
|
json.choice_users_count d[:choice_users_count]
|
|
|
|
|
json.choice_percent d[:choice_percent]
|
|
|
|
|
json.choice_right_boolean d[:right_answer]
|
|
|
|
|