dev_aliyun
cxt 5 years ago
commit de7cfe5a6c

@ -5,7 +5,7 @@ class ManagementsController < ApplicationController
:editmd_template, :subject_level_system, :subject_setting_list,
:shixun_authorization, :ec_template, :codemirror_template,
:course_guide_template, :shixun_quality_score, :tech_system, :update_notice, :setting_banner,
:training_2018, :create_standard]
:create_standard]
layout 'base_management'
include ManagementsHelper
include SortHelper
@ -100,26 +100,23 @@ class ManagementsController < ApplicationController
@pay_type = params[:pay_type]
@page = params[:page] || 1
@status = params[:status]
if User.current.admin?
@trainings = Training.includes(:training_payinfo)
if params[:search] && params[:search].strip != ""
@trainings = @trainings.where("trainings.name like '%#{params[:search]}%'")
end
if params[:training_type] && params[:training_type].to_i != -1
@trainings = @trainings.where("training_type = #{params[:training_type]}")
end
if params[:pay_type] && params[:pay_type].to_i != -1
@trainings = @trainings.where("training_payinfos.pay_type = #{params[:pay_type]}")
end
if params[:status] && params[:status].to_i != -1
@trainings = @trainings.where("training_payinfos.status = #{params[:status]}")
end
@page = params[:page] || 1
@all_trainings = @trainings.reorder("trainings.created_at desc")
@trainings = paginateHelper @trainings.reorder("trainings.created_at desc"), 50
else
render_403
@trainings = Training.includes(:training_payinfo)
if params[:search] && params[:search].strip != ""
@trainings = @trainings.where("trainings.name like '%#{params[:search]}%'")
end
if params[:training_type] && params[:training_type].to_i != -1
@trainings = @trainings.where("training_type = #{params[:training_type]}")
end
if params[:pay_type] && params[:pay_type].to_i != -1
@trainings = @trainings.where("training_payinfos.pay_type = #{params[:pay_type]}")
end
if params[:status] && params[:status].to_i != -1
@trainings = @trainings.where("training_payinfos.status = #{params[:status]}")
end
@page = params[:page] || 1
@all_trainings = @trainings.reorder("trainings.created_at desc")
@trainings = paginateHelper @trainings.reorder("trainings.created_at desc"), 50
respond_to do |format|
format.js
format.html

@ -90,7 +90,7 @@
<li class="lineh-25 color-grey-6 font-18 mb20">温馨提示</li>
<ul class="font-16">
<li>1.请勿上传已设置加密口令的文档资源;</li>
<li>2.可以上传符合教学案例标准的文档资料,如<a class="color-blue" target="_blank" href="https://www.educoder.net/boards/5909/topics/34799">案例入库标准</a>、<a target="_blank" class="color-blue" href="https://www.educoder.net/boards/5909/topics/34798">案例使用说明书</a>以及其他资料等上传支持的文件最大容量100MB</li>
<li>2.可以上传符合教学案例标准的文档资料,如<a class="color-blue" target="_blank" href="https://www.educoder.net/courses/1309/boards/5909/messages/34799">案例入库标准</a>、<a target="_blank" class="color-blue" href="https://www.educoder.net/courses/1309/boards/5909/messages/34798">案例使用说明书</a>以及其他资料等上传支持的文件最大容量100MB</li>
<li>3.请确保上传内容无侵权或违反国家关于互联网政策的不良行为;</li>
<li>4.请使用ChromeFirefoxSafariIE11及以上版本浏览器</li>
</ul>

@ -5,7 +5,6 @@
<tr>
<th width="5%">ID</th>
<th width="5%">总耗时<i class="fa fa-long-arrow-down color-light-green ml5" ></i></th>
<th width="5%">作品更新</th>
<th width="5%">文件更新</th>
<th width="10%">中间层总耗时</th>
<th width="5%">pull代码</th>
@ -15,7 +14,8 @@
<th width="5%">前端轮询</th>
<th width="5%">结果存储</th>
<th width="10%">创建时间</th>
<th width="5%">最大执行时间</th>
<th width="5%">评测时最大时间</th>
<th width="5%">最新执行时间</th>
<th width="8%">唯一标识</th>
<th width="17%">实训名称</th>
</tr>
@ -26,7 +26,6 @@
<tr>
<td><%= record.id %></td>
<td><%= record.consume_time %></td>
<td><%= record.student_work %></td>
<td><%= record.file_update %></td>
<td><%= record.brige %></td>
<td><%= record.git_pull %></td>
@ -37,8 +36,9 @@
<td><%= record.test_cases %></td>
<td><%= format_time record.created_at %></td>
<% challenge = Game.find(record.game_id).challenge %>
<td><%= record.try(:exec_time) %></td>
<td><%= challenge.try(:exec_time) %></td>
<td><%= record.shixun.try(:identifier) %></td>
<td><%= record.try(:identifier) %></td>
<td><%= link_to record.shixun.try(:name), task_path(record.game), :target => "_blank", :title => "#{record.shixun.try(:name)}" %></td>
</tr>
<% end %>

@ -0,0 +1,5 @@
class AddExecTimeToEvaluateRecords < ActiveRecord::Migration
def change
add_column :evaluate_records, :exec_time, :integer
end
end
Loading…
Cancel
Save