From 0ed35e841d7f0182978f676521b5d4943a6a771b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 6 Jan 2020 11:08:51 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 89d53e73c..4396f5936 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base unless Rails.env.development? Rails.logger.info("66666 #{params}") suffix = request.url.split(".").last.split("?").first - suffix_arr = ["xls", "xlsx", "pdf"] # excel文件先注释 + suffix_arr = ["xls", "xlsx", "pdf", "zip"] # excel文件先注释 unless suffix_arr.include?(suffix) if params[:client_key].present? randomcode = params[:randomcode] From 71903d215770debc4e8083a53a4c47a0e083f08b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 6 Jan 2020 11:11:40 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BB=99=E8=BF=90=E8=90=A5=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=BC=80=E6=94=BEfork=E5=AE=9E=E8=AE=AD=E7=9A=84?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index f86ade58f..442881df2 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -147,7 +147,7 @@ class ShixunsController < ApplicationController ## 实训详情 def show # 当前用户开启的实训 - can_fork = current_user.is_certification_teacher || current_user.admin? + can_fork = current_user.is_certification_teacher || current_user.admin_or_business? unless can_fork @can_fork = {can_fork: "已经职业认证的教师才能fork实训", certi_url: "/account/certification"} From 5f90a4a3af8c30b54eaecd010b8bf3f468e7c0cd Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 6 Jan 2020 11:12:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/export_shixun_report_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/export_shixun_report_service.rb b/app/services/export_shixun_report_service.rb index 57b955762..4263ef4f1 100644 --- a/app/services/export_shixun_report_service.rb +++ b/app/services/export_shixun_report_service.rb @@ -43,6 +43,7 @@ class ExportShixunReportService @user = @work.user @shixun = homework.shixuns.take @games = @work.myshixun.games.includes(:challenge, :game_codes,:outputs) if @work.myshixun + @challenges = @shixun.challenges if @shixun # 用户最大评测次数 @user_evaluate_count = @games.pluck(:evaluate_count).sum if @games From 7896b7c73f5d6d5e979f3994a069f37ba9be6845 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Mon, 6 Jan 2020 11:12:51 +0800 Subject: [PATCH 4/4] update editor style --- .../modules/page/component/monaco/TPIMonaco.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/public/react/src/modules/page/component/monaco/TPIMonaco.css b/public/react/src/modules/page/component/monaco/TPIMonaco.css index 75fe4ae8a..368ed5c8f 100644 --- a/public/react/src/modules/page/component/monaco/TPIMonaco.css +++ b/public/react/src/modules/page/component/monaco/TPIMonaco.css @@ -143,4 +143,18 @@ /* 选中行边框 */ .monaco-editor .view-overlays .current-line { border-width: 1px !important; +} + +.monaco-editor .margin, +.monaco-editor .margin-view-overlays{ + width: 54px !important; + text-align: center !important; +} + +.monaco-editor .monaco-scrollable-element{ + left: 54px !important; +} + +.monaco-editor .margin-view-overlays .line-numbers{ + text-align: center !important; } \ No newline at end of file