@ -61,7 +61,7 @@ class Game < ApplicationRecord
if self.status == 2 # 通关了则取实际得分,没通关则取总分
gold = (shixun_status <= 1) ? 0 : self.final_score.to_i
# 只要过关了,查看了答案经验值就是0;通关前查看了答案金final_score为负数
experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : challenge.final_score.to_i
experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : self.final_score.to_i
else
gold = challenge.score.to_i
experience = gold
@ -7,7 +7,7 @@ json.group_list do
end
# 未分班展示情况放在最后
if @course_groups.count < @limit.to_i
if @course_groups.count > 0 && @course_groups.count < @limit.to_i
ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids)
if ungroup_work_count > 0
json.ungroup_list do