diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c207b827d..89f92eba1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -95,6 +95,10 @@ module ApplicationHelper Output.where(:game_id => game).count end + def shixun_final_score myshixun + Game.find_by_sql("SELECT sum(final_score) as score FROM `games` where myshixun_id='#{myshixun.id}';") + end + # def user_blogs_path(resource,parameters={}) # super # end diff --git a/app/views/games/_games_list.html.erb b/app/views/games/_games_list.html.erb index 190f16a0e..7235e534b 100644 --- a/app/views/games/_games_list.html.erb +++ b/app/views/games/_games_list.html.erb @@ -36,7 +36,7 @@
开始时间:<%= format_time(game.created_at) %> 完成时间:<%= format_time(game.updated_at) %> - 耗时:<%= game_avg_day(game.created_at, game.updated_at) %>天<%= game_avg_hour(game.created_at, game.updated_at) %>小时<%= game_avg_min(game.created_at, game.updated_at) %>分 + 耗时:<%= game_avg_hour(game.created_at, game.updated_at) %>小时<%= game_avg_min(game.created_at, game.updated_at) %>分 测评次数:<%= avg_my_pass game %>次 得分:<%= game.final_score %>分
diff --git a/app/views/myshixuns/_myshixun_top.html.erb b/app/views/myshixuns/_myshixun_top.html.erb index 4a2820ef1..21a9a4bfa 100644 --- a/app/views/myshixuns/_myshixun_top.html.erb +++ b/app/views/myshixuns/_myshixun_top.html.erb @@ -3,8 +3,8 @@ 暂时离开