dev_course
SylorHuang 6 years ago
parent ccbe7cb1ad
commit 354b3a907b

@ -32,7 +32,7 @@ module ExerciseQuestionsHelper
def shixun_game_scores(challenge,ex_answerer,shixun_type,question_id)
game_score = challenge.question_score
game_answers = challenge.exercise_shixun_answers.search_shixun_answers("user_id",ex_answerer.id).search_shixun_answers("exercise_question_id",question_id)
game_answers = challenge.exercise_shixun_answers.where(user_id:ex_answerer.id,exercise_question_id:question_id)
if shixun_type == 2 && game_answers.present? #试卷已截止,用户才可以查看答案
s_score = game_answers.first.score
else

@ -7,7 +7,7 @@ json.stage_list do
json.evaluate_count game.evaluate_count
json.finished_time finished_time game.end_time
json.time_consuming time_consuming game
json.myself_experience game.final_score #经验值
json.myself_experience game.final_score < 0 ? 0 : game.final_score #经验值
json.experience game.challenge.all_score #经验值
json.user_score user_score.round(1).to_s #用户获得的分数
json.game_score game_score.round(1).to_s #该关卡的总分数

Loading…
Cancel
Save