From a2984aba789c0fc820a52a7409c90e7a5458da62 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 16 May 2019 10:51:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/_homework_index_list.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/homework_common/_homework_index_list.html.erb b/app/views/homework_common/_homework_index_list.html.erb index 73c06e7e..ff79278e 100755 --- a/app/views/homework_common/_homework_index_list.html.erb +++ b/app/views/homework_common/_homework_index_list.html.erb @@ -112,13 +112,13 @@ <%= link_to "修改作品", edit_student_work_path(work), :class => 'white-btn orange-btn fr mr20 mt8', :target => "_blank" %> <% elsif work.present? && work.try(:work_status) != 0 %> <%= link_to "查看作品", student_work_path(work), :class => 'white-btn orange-btn fr mr20 mt8', :target => "_blank" %> - <% elsif ((work.present? && work.try(:work_status) == 0) || work.nil?) && setting_time.end_time > Time.now %> + <% elsif ((work.present? && work.try(:work_status) == 0) || work.nil?) && setting_time.end_time && setting_time.end_time > Time.now %> <% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 && (work.project_id.nil? || work.project_id == 0 || work.project_id == -1) %> <%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => homework_common.id, :user_activity_id=> homework_common.id, :hw_status => 1), :remote => true, :class=> 'white-btn orange-btn fr mr20 mt8', :title=> '请各组长关联作业项目' %> <% else %> <%= link_to "提交作品", new_student_work_path(:homework => homework_common.id), :class => 'white-btn orange-btn fr mr20 mt8', :target => "_blank" %> <% end %> - <% elsif ((work.present? && work.try(:work_status) == 0) || work.nil?) && setting_time.end_time <= Time.now && homework_common.allow_late %> + <% elsif ((work.present? && work.try(:work_status) == 0) || work.nil?) && setting_time.end_time && setting_time.end_time <= Time.now && homework_common.allow_late %> <% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 && (work.project_id.nil? || work.project_id == 0 || work.project_id == -1) %> <%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => homework_common.id, :user_activity_id=> homework_common.id, :hw_status => 1), :remote => true, :class=> 'white-btn orange-btn fr mr20 mt8', :title=> '请各组长关联作业项目' %> <% else %>