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 %> - -
序号 | -总耗时 | +ID | +总耗时 | 作品更新 | 文件更新 | 中间层总耗时 | pull代码 | pod启动 | pod执行 | -中间层回传 | +回传时间 | 前端轮询 | -回调结果存储 | +结果存储 | 创建时间 | -实训名称 | +唯一表示 | +实训名称 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<%= index %> | +<%= record.id %> | <%= record.consume_time %> | <%= record.student_work %> | <%= record.file_update %> | @@ -60,6 +35,7 @@<%= 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)}" %> |