Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_new_shixunsrepository
杨树林 5 years ago
commit 0725e162fe

@ -87,7 +87,7 @@ class HomeworkCommonsController < ApplicationController
end
@task_count = @homework_commons.size
order_str = @homework_type == 4 ? "position DESC" : "IF(ISNULL(homework_commons.publish_time),0,1), homework_commons.publish_time DESC,
order_str = @homework_type == 4 ? "homework_commons.position DESC" : "IF(ISNULL(homework_commons.publish_time),0,1), homework_commons.publish_time DESC,
homework_commons.created_at DESC"
@homework_commons = @homework_commons.order(order_str).page(page).per(15)

Loading…
Cancel
Save