|
|
|
@ -148,7 +148,7 @@ module ExercisesHelper
|
|
|
|
|
:choice_position => c.choice_position,
|
|
|
|
|
:choice_text => c.choice_text,
|
|
|
|
|
:choice_users_count => answer_users_count,
|
|
|
|
|
:choice_percent => answer_percent.round(1).to_s,
|
|
|
|
|
:choice_percent => answer_percent.round(2).to_s,
|
|
|
|
|
:right_answer => right_answer
|
|
|
|
|
}
|
|
|
|
|
question_answer_infos.push(answer_option)
|
|
|
|
@ -174,7 +174,7 @@ module ExercisesHelper
|
|
|
|
|
:choice_position => index+1,
|
|
|
|
|
:choice_text => s_choice_text,
|
|
|
|
|
:choice_users_count => user_count,
|
|
|
|
|
:choice_percent => answer_percent.round(1).to_s,
|
|
|
|
|
:choice_percent => answer_percent.round(2).to_s,
|
|
|
|
|
:right_answer => true
|
|
|
|
|
}
|
|
|
|
|
question_answer_infos.push(answer_option)
|
|
|
|
@ -194,7 +194,7 @@ module ExercisesHelper
|
|
|
|
|
:choice_position => (standard_answer_count + 1),
|
|
|
|
|
:choice_text => "wrong",
|
|
|
|
|
:choice_users_count => user_wrong_count,
|
|
|
|
|
:choice_percent => wrong_percent.round(1).to_s,
|
|
|
|
|
:choice_percent => wrong_percent.round(2).to_s,
|
|
|
|
|
:right_answer => false
|
|
|
|
|
}
|
|
|
|
|
question_answer_infos.push(wrong_answer_position)
|
|
|
|
@ -220,7 +220,7 @@ module ExercisesHelper
|
|
|
|
|
:choice_position => index+1,
|
|
|
|
|
:choice_text => index+1,
|
|
|
|
|
:choice_users_count => s,
|
|
|
|
|
:choice_percent => score_percent.round(1).to_s,
|
|
|
|
|
:choice_percent => score_percent.round(2).to_s,
|
|
|
|
|
:right_answer => right_answer
|
|
|
|
|
}
|
|
|
|
|
question_answer_infos.push(answer_option)
|
|
|
|
@ -246,7 +246,7 @@ module ExercisesHelper
|
|
|
|
|
:choice_position => index+1,
|
|
|
|
|
:choice_text => index+1,
|
|
|
|
|
:choice_users_count => s,
|
|
|
|
|
:choice_percent => score_percent.round(1).to_s,
|
|
|
|
|
:choice_percent => score_percent.round(2).to_s,
|
|
|
|
|
:right_answer => right_answer
|
|
|
|
|
}
|
|
|
|
|
shixun_chas.push(answer_option)
|
|
|
|
@ -256,7 +256,7 @@ module ExercisesHelper
|
|
|
|
|
:cha_name => c.challenge.subject,
|
|
|
|
|
:cha_position => c.position,
|
|
|
|
|
:cha_details => shixun_chas,
|
|
|
|
|
:cha_percent => game_percent.round(1).to_s
|
|
|
|
|
:cha_percent => game_percent.round(2).to_s
|
|
|
|
|
}
|
|
|
|
|
question_answer_infos.push(shixun_new_chas)
|
|
|
|
|
end
|
|
|
|
@ -266,7 +266,7 @@ module ExercisesHelper
|
|
|
|
|
:ques_less_title => ques_less_title, #副标题,仅实训题才有
|
|
|
|
|
:type => ex.question_type,
|
|
|
|
|
:position => ex.question_number,
|
|
|
|
|
:percent => percent.round(1).to_s,
|
|
|
|
|
:percent => percent.round(2).to_s,
|
|
|
|
|
:ques_effictive_counts => effictive_users_count,
|
|
|
|
|
:ques_details => question_answer_infos
|
|
|
|
|
}
|
|
|
|
|