pre_develop
daiao 6 years ago
commit e662286174

@ -853,7 +853,7 @@ class ManagementsController < ApplicationController
def evaluate_simple def evaluate_simple
page = params[:page] page = params[:page]
@recodes = EvaluateRecord.where("created_at > ?", Time.now - 0.5.days).reorder("consume_time desc") @recodes = EvaluateRecord.where("created_at > ?", Time.now - 10000.days).reorder("consume_time desc")
@recodes_count = @recodes.size @recodes_count = @recodes.size
@record_pages = Paginator.new @recodes_count, 20, page || 1 @record_pages = Paginator.new @recodes_count, 20, page || 1
@offset ||= @record_pages.offset @offset ||= @record_pages.offset

@ -584,16 +584,16 @@ class StudentWorkController < ApplicationController
@stundet_works = @stundet_works.where(:work_status => @status) @stundet_works = @stundet_works.where(:work_status => @status)
end end
@stundet_works = search_work_member @stundet_works, @name
if @stundet_works.size != 0 if @stundet_works.size != 0
if @order == "student_id" if @order == "student_id"
@stundet_works = @stundet_works.includes(:user => {:user_extensions => []}).order("user_extensions.student_id #{@b_sort}") @stundet_works = @stundet_works.joins(:user => {:user_extensions => []}).order("user_extensions.student_id #{@b_sort}")
else else
@stundet_works = @stundet_works.order("#{@order} #{@b_sort}") @stundet_works = @stundet_works.order("#{@order} #{@b_sort}")
end end
end end
@stundet_works = search_work_member @stundet_works, @name
@score = @b_sort == "desc" ? "asc" : "desc" @score = @b_sort == "desc" ? "asc" : "desc"
# @is_focus = params[:is_focus] ? params[:is_focus].to_i : 0 # @is_focus = params[:is_focus] ? params[:is_focus].to_i : 0
# 消息传过来的ID # 消息传过来的ID
@ -615,6 +615,7 @@ class StudentWorkController < ApplicationController
_index _index
@stundet_works = paginateHelper @stundet_works, @limit @stundet_works = paginateHelper @stundet_works, @limit
@members = @course.members.select([:user_id, :course_group_id])
if @stundet_works.size != 0 if @stundet_works.size != 0
@stundet_works = if @homework.homework_type == 1 @stundet_works = if @homework.homework_type == 1
@stundet_works.includes(:student_works_scores, [user: :user_extensions]) @stundet_works.includes(:student_works_scores, [user: :user_extensions])
@ -623,7 +624,6 @@ class StudentWorkController < ApplicationController
elsif @homework.homework_type == 4 elsif @homework.homework_type == 4
@stundet_works.includes(:student_works_scores, [myshixun: :games], [user: :user_extensions]) @stundet_works.includes(:student_works_scores, [myshixun: :games], [user: :user_extensions])
end end
@members = @course.members.where(user_id: @stundet_works.pluck(:user_id)).select([:user_id, :course_group_id])
end end
respond_to do |format| respond_to do |format|
format.js format.js

@ -1,54 +1,29 @@
<% if false %>
<style>
.manage_ol ol li{list-style-type: disc;}
</style>
<div class="task-popup" style="width:400px;">
<div class=" task-popup-title clearfix task-popup-bggrey">
<h3 class="fl ">耗时详情</h3>
<a href="javascript:void(0)" id="closeIcon" style="top: -48px;right: -20px;z-index: 100000;"><i class="iconfont icon-shanchudiao"></i></a>
</div>
<div class="task_popup_con manage_ol">
<ol class="pl30">
<li>总耗时:<%= @consume_time %></li>
<li>作品更新:<%= @student_work %></li>
<li>文件更新:<%= @file_update %></li>
<li>中间层总耗时:<%= @brige %></li>
<li class="ml15">pull代码<%= @git_pull %></li>
<li class="ml15">pod启动<%= @create_pod %></li>
<li class="ml15">pod执行<%= @pod_execute %></li>
<li>中间层回传:<%= @return_back %>--中间层出结果传Educoder</li>
<li>前端轮询:<%= @front_js %>--局部数据查询Js轮询</li>
<li>回调结果存储:<%= @test_cases %></li>
</ol>
</div>
</div>
<% end %>
<% if @recodes.present? %> <% if @recodes.present? %>
<div class="edu-con-bg01 mt15" id="evaluate_records_list"> <div class="edu-con-bg01 mt15" id="evaluate_records_list">
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed"> <table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
<thead> <thead>
<tr> <tr>
<th width="5%">序号</th> <th width="5%">ID</th>
<th width="10%">总耗时<i class="fa fa-long-arrow-down color-light-green ml5" ></i></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="5%">文件更新</th> <th width="5%">文件更新</th>
<th width="10%">中间层总耗时</th> <th width="10%">中间层总耗时</th>
<th width="5%">pull代码</th> <th width="5%">pull代码</th>
<th width="5%">pod启动</th> <th width="5%">pod启动</th>
<th width="5%">pod执行</th> <th width="5%">pod执行</th>
<th width="10%">中间层回传</th> <th width="5%">回传时间</th>
<th width="5%">前端轮询</th> <th width="5%">前端轮询</th>
<th width="10%">回调结果存储</th> <th width="5%">结果存储</th>
<th width="15%">创建时间</th> <th width="15%">创建时间</th>
<th width="15%">实训名称</th> <th width="8%">唯一表示</th>
<th width="17%">实训名称</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% @recodes.each_with_index do |record, index| %> <% @recodes.each do |record| %>
<tr> <tr>
<td><%= index %></td> <td><%= record.id %></td>
<td><%= record.consume_time %></td> <td><%= record.consume_time %></td>
<td><%= record.student_work %></td> <td><%= record.student_work %></td>
<td><%= record.file_update %></td> <td><%= record.file_update %></td>
@ -60,6 +35,7 @@
<td><%= record.front_js %></td> <td><%= record.front_js %></td>
<td><%= record.test_cases %></td> <td><%= record.test_cases %></td>
<td><%= format_time record.created_at %></td> <td><%= format_time record.created_at %></td>
<td><%= record.identifier %></td>
<td><%= link_to record.shixun.try(:name), task_path(record.game), :target => "_blank", :title => "#{record.shixun.try(:name)}" %></td> <td><%= link_to record.shixun.try(:name), task_path(record.game), :target => "_blank", :title => "#{record.shixun.try(:name)}" %></td>
</tr> </tr>
<% end %> <% end %>

@ -199,14 +199,11 @@
<a href="javascript:void(0);" id="status_no_limit" class="<%= @status.blank? ? 'check_on' : '' %> pl10 pr10">不限</a> <a href="javascript:void(0);" id="status_no_limit" class="<%= @status.blank? ? 'check_on' : '' %> pl10 pr10">不限</a>
</span> </span>
<input id="work_status_1" class="magic-checkbox fl" type="checkbox" value="0" name="status[]" <%= !@status.blank? && @status.include?('0') ? 'checked' : '' %>> <input id="work_status_1" class="magic-checkbox fl" type="checkbox" value="0" name="status[]" <%= !@status.blank? && @status.include?('0') ? 'checked' : '' %>>
<label for="work_status_1" class="fl mr25">未提交(<%= @all_student_works.where(:work_status => 0).count %> <label for="work_status_1" class="fl mr25">未提交(<%= @all_student_works.where(:work_status => 0).count %>)</label>
)</label>
<input id="work_status_2" class="magic-checkbox fl" type="checkbox" value="1" name="status[]" <%= !@status.blank? && @status.include?('1') ? 'checked' : '' %>> <input id="work_status_2" class="magic-checkbox fl" type="checkbox" value="1" name="status[]" <%= !@status.blank? && @status.include?('1') ? 'checked' : '' %>>
<label for="work_status_2" class="fl mr25">按时提交(<%= student_works.where(:work_status => 1).count %> <label for="work_status_2" class="fl mr25">按时提交(<%= student_works.where(:work_status => 1).count %>)</label>
)</label>
<input id="work_status_3" class="magic-checkbox fl" type="checkbox" value="2" name="status[]" <%= !@status.blank? && @status.include?('2') ? 'checked' : '' %>> <input id="work_status_3" class="magic-checkbox fl" type="checkbox" value="2" name="status[]" <%= !@status.blank? && @status.include?('2') ? 'checked' : '' %>>
<label for="work_status_3" class="fl mr25">延时提交(<%= student_works.where(:work_status => 2).count %> <label for="work_status_3" class="fl mr25">延时提交(<%= student_works.where(:work_status => 2).count %>)</label>
)</label>
</li> </li>
<li class="clearfix"> <li class="clearfix">

Loading…
Cancel
Save