ADD 超级管理员“已发布实训”列表的excel导出,增加实训链接

dev_partners
jasder 6 years ago
parent 6129e17ddb
commit c7a3ef7732

@ -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

@ -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

Loading…
Cancel
Save