diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index 1db75db5..e023adac 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -21,19 +21,17 @@ class GraduationTasksController < ApplicationController end unless @order.blank? - case @order + if @course.is_end + @tasks = @tasks.where("0=1") + else + case @order + when '0', '1', '2', '3' + @tasks = @tasks.where(:status => @order) when '4' - if @course.is_end - @tasks = @tasks - else - @tasks = @tasks.where("0=1") - end + @tasks = @tasks.where("status > 1 and allow_late = 1 and late_time > '#{Time.now}'") else - if @course.is_end - @tasks = @tasks.where("0=1") - else - @tasks = @tasks.where(:status => @order) - end + @tasks = @tasks.where("0=1") + end end end