From 08df962ee6cb8e0291df3350d87915b17c86b8c2 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Apr 2019 15:24:20 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BD=8D=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation_tasks_controller.rb | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) 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 From 26c112cbed74d21c8bc2fcf30e0c66cbf7443455 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 19 Apr 2019 17:23:07 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=9C=89=E5=85=B3=E8=AF=BE=E7=A8=8Bcss?= =?UTF-8?q?=E5=A4=8D=E7=94=A8=E6=88=96=E5=86=97=E4=BD=99=E6=83=85=E5=86=B5?= =?UTF-8?q?=E7=9A=84=E5=88=A0=E5=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/settings/_choose_course_group.html.erb | 2 +- app/views/layouts/base_courses.html.erb | 6 +++++- app/views/layouts/base_edu.html.erb | 3 ++- public/stylesheets/css/courses.css | 1 - public/stylesheets/educoder/edu-all.css | 6 ++++++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/courses/settings/_choose_course_group.html.erb b/app/views/courses/settings/_choose_course_group.html.erb index 71f60f90..b6b434e5 100644 --- a/app/views/courses/settings/_choose_course_group.html.erb +++ b/app/views/courses/settings/_choose_course_group.html.erb @@ -12,7 +12,7 @@ 请先选择一个分班 <% end %> -