diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 5df43ed6..851c50e6 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -853,7 +853,7 @@ class ManagementsController < ApplicationController def evaluate_simple 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 @record_pages = Paginator.new @recodes_count, 20, page || 1 @offset ||= @record_pages.offset diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 8885353c..1afaefc3 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -584,16 +584,16 @@ class StudentWorkController < ApplicationController @stundet_works = @stundet_works.where(:work_status => @status) end + @stundet_works = search_work_member @stundet_works, @name + if @stundet_works.size != 0 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 @stundet_works = @stundet_works.order("#{@order} #{@b_sort}") end end - @stundet_works = search_work_member @stundet_works, @name - @score = @b_sort == "desc" ? "asc" : "desc" # @is_focus = params[:is_focus] ? params[:is_focus].to_i : 0 # 消息传过来的ID @@ -615,6 +615,7 @@ class StudentWorkController < ApplicationController _index @stundet_works = paginateHelper @stundet_works, @limit + @members = @course.members.select([:user_id, :course_group_id]) if @stundet_works.size != 0 @stundet_works = if @homework.homework_type == 1 @stundet_works.includes(:student_works_scores, [user: :user_extensions]) @@ -623,7 +624,6 @@ class StudentWorkController < ApplicationController elsif @homework.homework_type == 4 @stundet_works.includes(:student_works_scores, [myshixun: :games], [user: :user_extensions]) end - @members = @course.members.where(user_id: @stundet_works.pluck(:user_id)).select([:user_id, :course_group_id]) end respond_to do |format| format.js diff --git a/app/views/managements/evaluate_simple.html.erb b/app/views/managements/evaluate_simple.html.erb index cecfe4a9..a278395c 100644 --- a/app/views/managements/evaluate_simple.html.erb +++ b/app/views/managements/evaluate_simple.html.erb @@ -1,54 +1,29 @@ -<% if false %> - -
-
-

耗时详情

- -
-
-
    -
  1. 总耗时:<%= @consume_time %>
  2. -
  3. 作品更新:<%= @student_work %>
  4. -
  5. 文件更新:<%= @file_update %>
  6. -
  7. 中间层总耗时:<%= @brige %>
  8. -
  9. pull代码:<%= @git_pull %>
  10. -
  11. pod启动:<%= @create_pod %>
  12. -
  13. pod执行:<%= @pod_execute %>
  14. -
  15. 中间层回传:<%= @return_back %>--(中间层出结果传Educoder)
  16. -
  17. 前端轮询:<%= @front_js %>--(局部数据查询,Js轮询)
  18. -
  19. 回调结果存储:<%= @test_cases %>
  20. -
-
-
-<% end %> - <% if @recodes.present? %>
- - + + - + - + - + + - <% @recodes.each_with_index do |record, index| %> + <% @recodes.each do |record| %> - + @@ -60,6 +35,7 @@ + <% end %> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 99384dfc..0e66401c 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -199,14 +199,11 @@ 不限> - + > - + > - +
  • 序号总耗时ID总耗时 作品更新 文件更新 中间层总耗时 pull代码 pod启动 pod执行中间层回传回传时间 前端轮询回调结果存储结果存储 创建时间实训名称唯一表示实训名称
    <%= index %><%= record.id %> <%= record.consume_time %> <%= record.student_work %> <%= record.file_update %><%= record.front_js %> <%= record.test_cases %> <%= format_time record.created_at %><%= record.identifier %> <%= link_to record.shixun.try(:name), task_path(record.game), :target => "_blank", :title => "#{record.shixun.try(:name)}" %>