dev_haigong
cxt 6 years ago
parent 1192a3c93d
commit b4bbac6fae

@ -1190,9 +1190,9 @@ class CoursesController < ApplicationController
@all_members = searchmember_by_name(student_homework_score(0, 0, 10,"desc"), q) @all_members = searchmember_by_name(student_homework_score(0, 0, 10,"desc"), q)
end end
@homeworks = @course.homework_commons.where("publish_time <= '#{Time.now}'").order("IF(ISNULL(publish_time),0,1), publish_time DESC, created_at DESC") @homeworks = @course.homework_commons.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
@exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("IF(ISNULL(publish_time),0,1), publish_time DESC, created_at DESC") @exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
@tasks = @course.graduation_tasks.where("publish_time <= '#{Time.now}'").order("IF(ISNULL(publish_time),0,1), publish_time DESC, created_at DESC") @tasks = @course.graduation_tasks.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
respond_to do |format| respond_to do |format|
format.xls { format.xls {

Loading…
Cancel
Save