educoder/app/views/exercises/_shixun_details.json.jbuilder

31 lines
1.0 KiB

6 years ago
#阶段成绩
json.stage_list do
json.array! games do |game|
json.position game.challenge.position
json.name game.challenge.subject
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.experience game.challenge.all_score #经验值
json.user_score user_score.round(1).to_s #用户获得的分数
json.game_score game_score.round(1).to_s #该关卡的总分数
end
end
# 实训详情
json.shixun_detail do
json.array! games do |game|
json.position game.challenge.position
json.game_identifier game.identifier
json.path game.challenge.path
json.st game.challenge.st
json.name game.challenge.subject
json.outputs game.distinct_query_index do |output|
json.position output.query_index
json.output_detail output_detail game, output
end
json.passed_code game.try(:lastest_code)
end
end