实训作业列表

dev_forum
cxt 6 years ago
parent fd924a0f0b
commit 00ba3c5c82

@ -82,12 +82,10 @@ class HomeworkCommonsController < ApplicationController
end
@homework_commons = @homework_commons.joins(:homework_detail_manual).where(sql_str)
end
@homework_commons = @homework_commons.order("IF(ISNULL(homework_commons.publish_time),0,1), homework_commons.publish_time DESC,
homework_commons.created_at DESC")
@task_count = @homework_commons.size
@homework_commons = @homework_commons.page(page).per(15)
@homework_commons = @homework_commons.order("IF(ISNULL(homework_commons.publish_time),0,1), homework_commons.publish_time DESC,
homework_commons.created_at DESC").page(page).per(15)
if @homework_type == 4
@homework_commons = @homework_commons.includes(:homework_detail_manual, :published_settings, :shixuns)

Loading…
Cancel
Save