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"} 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 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