json.work_id @work.id json.shixun_name @shixun.name json.shixun_score @shixun.all_score json.view_report @user_course_identity < Course::STUDENT || @current_user == @work_user # 作者信息 json.user_id @work_user.id json.username @work_user.real_name json.login @work_user.login json.image_url url_to_avatar(@work_user) json.complete_count @myshixun.passed_count json.challenges_count @shixun.challenges_count json.efficiency number_with_precision @work.efficiency, precision: 2 json.max_efficiency number_with_precision @homework.max_efficiency, precision: 2 json.passed_time @myshixun.passed_time json.total_spend_time @myshixun.total_spend_time json.user_score @myshixun.total_score # 关卡完成情况 index = 1 json.game_list @myshixun.games do |game| json.position index json.end_time game.end_time ? game.end_time : '--' json.cost_time (game_spend_time game.cost_time) json.score game.final_score json.complete_status game_status(game, @homework) index += 1 end