From ae1046632083dc4601738a210c525f1524ff95f3 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 3 Jul 2019 18:19:15 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0git=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index fd75b7062..2131eed9a 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -269,7 +269,8 @@ class MyshixunsController < ApplicationController author_name = current_user.full_name author_email = current_user.mail message = params[:evaluate] == 0 ? "System automatically submitted" : "User submitted" - uid_logger("") + uid_logger("112233#{author_name}") + uid_logger("112233#{author_email}") @content = GitService.update_file(repo_path: @repo_path, file_path: path, message: message, From d2f1a7a06b690ad30996ae74b7254c8234a20da9 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Wed, 3 Jul 2019 18:22:00 +0800 Subject: [PATCH 2/5] fix bug --- app/controllers/homework_commons_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 9b77f8dc7..5842d2522 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -108,8 +108,10 @@ class HomeworkCommonsController < ApplicationController @all_member_count = student_works.size logger.info("###########______@homework.publish_time_________#{@homework.publish_time}") + logger.info("-----------------------------------------------------") if @homework.publish_time.blank? || (@homework.publish_time > Time.now) + logger.info("+++++++++++++++++#{@homework.publish_time}") @student_works = [] if (params[:format] == "xlsx") || (params[:format] == "zip") normal_status(-1,"作业未发布") From 3fecc15aa7fc8c76cf3c708dc9bcb8a06d6dba65 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Wed, 3 Jul 2019 18:24:10 +0800 Subject: [PATCH 3/5] fix bug --- app/controllers/homework_commons_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 5842d2522..b25782026 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -114,6 +114,8 @@ class HomeworkCommonsController < ApplicationController logger.info("+++++++++++++++++#{@homework.publish_time}") @student_works = [] if (params[:format] == "xlsx") || (params[:format] == "zip") + logger.info("++++++params[:format]params[:format]params[:format]params[:format]+++++++++++#{params[:format]}") + normal_status(-1,"作业未发布") end else From cab3b87de3d311687998f9202c1a6899164dc1d8 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 3 Jul 2019 18:27:33 +0800 Subject: [PATCH 4/5] =?UTF-8?q?git=20=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E6=88=90=E5=8A=9F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 2131eed9a..3abc71fd0 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -266,7 +266,7 @@ class MyshixunsController < ApplicationController if content != last_content @content_modified = 1 - author_name = current_user.full_name + author_name = current_user.real_name author_email = current_user.mail message = params[:evaluate] == 0 ? "System automatically submitted" : "User submitted" uid_logger("112233#{author_name}") From 5cdc8bb687ff3d7ad25b04b71e2a51138c4c8ae2 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Thu, 4 Jul 2019 09:00:28 +0800 Subject: [PATCH 5/5] =?UTF-8?q?xlsx=E5=AF=BC=E5=87=BA=E7=9A=84=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 6 ------ app/views/polls/commit_result.xlsx.axlsx | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index b25782026..519c05c62 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -107,15 +107,9 @@ class HomeworkCommonsController < ApplicationController student_works = @homework.all_works @all_member_count = student_works.size - logger.info("###########______@homework.publish_time_________#{@homework.publish_time}") - logger.info("-----------------------------------------------------") - if @homework.publish_time.blank? || (@homework.publish_time > Time.now) - logger.info("+++++++++++++++++#{@homework.publish_time}") @student_works = [] if (params[:format] == "xlsx") || (params[:format] == "zip") - logger.info("++++++params[:format]params[:format]params[:format]params[:format]+++++++++++#{params[:format]}") - normal_status(-1,"作业未发布") end else diff --git a/app/views/polls/commit_result.xlsx.axlsx b/app/views/polls/commit_result.xlsx.axlsx index 6ce00388c..aa7943d2a 100644 --- a/app/views/polls/commit_result.xlsx.axlsx +++ b/app/views/polls/commit_result.xlsx.axlsx @@ -49,7 +49,7 @@ wb.styles do |s| end #each_with_index sheet.add_row poll_users_info, :height =>15, :style => blue_cell - poll_users.each_with_index do |u,index| + poll_users.includes(user: :user_extension).each_with_index do |u,index| u_user = u.user user_answer_array = [] poll_questions.each do |q|