From c7a3ef7732c495fe0afc42ac5c0da83f4de59248 Mon Sep 17 00:00:00 2001 From: jasder Date: Sat, 27 Apr 2019 17:49:32 +0800 Subject: [PATCH] =?UTF-8?q?ADD=20=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E2=80=9C=E5=B7=B2=E5=8F=91=E5=B8=83=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E2=80=9D=E5=88=97=E8=A1=A8=E7=9A=84excel=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AE=9E=E8=AE=AD=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 7 ++++--- config/settings.yml | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index d1ef793d..53eb23ae 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1011,7 +1011,7 @@ class ManagementsController < ApplicationController end @courselist = @courselist.reorder("created_at desc") @courselist_count = @courselist.count - + @limit = 15 @is_remote = true @page = params['page'] ? params['page'].to_i : 1 @@ -3635,7 +3635,7 @@ end apply_user.tidings.where(:tiding_type => "Apply").update_all(:status => 1) Tiding.create(:user_id => apply_user.user_id ,:trigger_user_id => 0, :container_id => apply_user.id, :container_type => "ApplyUserAuthentication", :belong_container_id => apply_user.user_id, :belong_container_type =>'User', :status => 1, :tiding_type => "System") - + @unapproved_user = ApplyUserAuthentication.where(:status => 0, :auth_type => 1).order("updated_at desc") @unapproved_user_count = @unapproved_user.count @limit = 15 @@ -4107,7 +4107,7 @@ end sheet1 = book.create_worksheet :name => "sheet" blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue - sheet1.row(0).concat(["序号","创建者","发布时间", "ID", "实训名称","技术平台","fork源", "实践任务"]) + sheet1.row(0).concat(["序号","创建者","发布时间", "ID", "实训名称","技术平台","fork源", "实践任务", "实训链接"]) count_row = 1 shixuns.find_each do |shixun| sheet1[count_row, 0] = count_row @@ -4118,6 +4118,7 @@ end sheet1[count_row, 5] = show_shixun_mirror(shixun) sheet1[count_row, 6] = shixun.fork_identifier sheet1[count_row, 7] = shixun.challenges.count + sheet1[count_row, 7] = Setting.server_url + shixun_path(shixun) count_row += 1 end book.write xls_report diff --git a/config/settings.yml b/config/settings.yml index f6c5b2e4..9e189978 100755 --- a/config/settings.yml +++ b/config/settings.yml @@ -89,6 +89,8 @@ wiki_compression: default: "" default_language: default: zh +server_url: + default: https://www.educoder.net/ host_name: default: forge.trustie.net host_course: @@ -211,7 +213,7 @@ default_projects_modules: # - dts default_projects_tracker_ids: serialized: true - default: + default: # Role given to a non-admin user who creates a project new_project_user_role_id: format: int