From 980cb9e730545abc7827f442a19f4f1e4441e850 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 22 Jun 2019 14:54:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_works_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index 213ea40c0..9e3a1930c 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -429,7 +429,7 @@ class StudentWorksController < ApplicationController def shixun_work_report @user = @work.user @shixun = @homework.shixuns.take - @games = @work.myshixun.games.includes(:challenge) if @work.myshixun + @games = @work.myshixun.games.includes(:challenge, :game_codes, :outputs) if @work.myshixun # 用户最大评测次数 @user_evaluate_count = @games.sum(:evaluate_count) if @games @@ -440,7 +440,7 @@ class StudentWorksController < ApplicationController def export_shixun_work_report @user = @work.user @shixun = @homework.shixuns.take - @games = @work.myshixun.games.includes(:challenge, :game_codes) if @work.myshixun + @games = @work.myshixun.games.includes(:challenge, :game_codes, :outputs) if @work.myshixun # 用户最大评测次数 @user_evaluate_count = @games.sum(:evaluate_count) if @games From 2bbd5dcc2456a81a64aa7ca8aa547ed019f0d89f Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 22 Jun 2019 14:59:45 +0800 Subject: [PATCH 2/3] .. --- db/migrate/20190622065825_add_profile_completed_to_uses.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20190622065825_add_profile_completed_to_uses.rb diff --git a/db/migrate/20190622065825_add_profile_completed_to_uses.rb b/db/migrate/20190622065825_add_profile_completed_to_uses.rb new file mode 100644 index 000000000..ef2cc2bf2 --- /dev/null +++ b/db/migrate/20190622065825_add_profile_completed_to_uses.rb @@ -0,0 +1,5 @@ +class AddProfileCompletedToUses < ActiveRecord::Migration[5.2] + def change + add_column :users, :profile_completed, :boolean, default: false + end +end From 1f3ab3645d46e3c8d200caae088b1db1d3979aa2 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 22 Jun 2019 15:00:17 +0800 Subject: [PATCH 3/3] reset --- db/migrate/20190622065825_add_profile_completed_to_uses.rb | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 db/migrate/20190622065825_add_profile_completed_to_uses.rb diff --git a/db/migrate/20190622065825_add_profile_completed_to_uses.rb b/db/migrate/20190622065825_add_profile_completed_to_uses.rb deleted file mode 100644 index ef2cc2bf2..000000000 --- a/db/migrate/20190622065825_add_profile_completed_to_uses.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddProfileCompletedToUses < ActiveRecord::Migration[5.2] - def change - add_column :users, :profile_completed, :boolean, default: false - end -end