|
|
|
@ -40,10 +40,10 @@ json.commit_results do
|
|
|
|
|
elsif q[:type] == Exercise::JUDGMENT
|
|
|
|
|
ques_index = (index+1).to_s
|
|
|
|
|
else
|
|
|
|
|
ques_index = ""
|
|
|
|
|
ques_index = nil
|
|
|
|
|
end
|
|
|
|
|
json.choice_position d[:choice_position]
|
|
|
|
|
json.choice_text "#{ques_index}.#{d[:choice_text]}"
|
|
|
|
|
json.choice_text ques_index.present? ? "#{ques_index}.#{d[: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]
|
|
|
|
@ -57,9 +57,9 @@ json.commit_results do
|
|
|
|
|
json.challenge_position cha[:cha_position]
|
|
|
|
|
json.challenge_percent cha[:cha_percent]
|
|
|
|
|
json.challenge_details do
|
|
|
|
|
json.array! cha[:cha_details].each_with_index.to_a do |ch,index|
|
|
|
|
|
json.array! cha[:cha_details] do |ch|
|
|
|
|
|
json.choice_position ch[:choice_position]
|
|
|
|
|
json.choice_text "#{(index+1).to_s}.#{ch[:choice_text]}"
|
|
|
|
|
json.choice_text ch[:choice_text]
|
|
|
|
|
json.choice_users_count ch[:choice_users_count]
|
|
|
|
|
json.choice_percent ch[:choice_percent]
|
|
|
|
|
json.choice_right_boolean ch[:right_answer]
|
|
|
|
|