选择题经验问题

dev_forum
daiao 6 years ago
parent 56013378ec
commit 1e7f0afcb0

@ -69,7 +69,7 @@ class Game < ApplicationRecord
else else
if self.status == 2 if self.status == 2
gold = (shixun_status <= 1) ? 0 : self.final_score.to_i gold = (shixun_status <= 1) ? 0 : self.final_score.to_i
experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : challenge.score.to_i experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : challenge.choose_score.to_i
else else
# 选择题只有在全对的时候才会获取final score总分错任何一个题final_score就为0 # 选择题只有在全对的时候才会获取final score总分错任何一个题final_score就为0
gold = challenge.choose_score gold = challenge.choose_score

@ -13,7 +13,7 @@ if @challenges.present?
json.position challenge.position json.position challenge.position
json.st challenge.st json.st challenge.st
json.name challenge.subject json.name challenge.subject
json.score challenge.score json.score challenge.all_score
json.passed_count challenge.user_passed_count json.passed_count challenge.user_passed_count
json.playing_count challenge.playing_count json.playing_count challenge.playing_count
json.name_url shixun_challenge_path(challenge, shixun_identifier: @shixun.identifier) json.name_url shixun_challenge_path(challenge, shixun_identifier: @shixun.identifier)

Loading…
Cancel
Save