diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb index 8d8f591c4..510a743b1 100644 --- a/app/views/organizations/_org_course_homework.html.erb +++ b/app/views/organizations/_org_course_homework.html.erb @@ -71,7 +71,7 @@ <%= user_for_homework_common activity,is_teacher %> <% work = cur_user_works_for_homework activity %> - <% if activity.end_time < Date.today && !is_teacher && !work.nil? %> + <% if activity.end_time < Date.today && !is_teacher && !work.nil? && work.user == User.current %>
<%=link_to "追加附件", student_work_index_url_in_org(activity.id, 1), :class => 'c_blue', :title => "可追加作品修订附件" %>
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index cf8e782e6..cb53ce4db 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -69,7 +69,7 @@ <%= user_for_homework_common activity,is_teacher %> <% work = cur_user_works_for_homework activity %> - <% if activity.end_time < Date.today && !is_teacher && !work.nil? %> + <% if activity.end_time < Date.today && !is_teacher && !work.nil? && work.user == User.current %>
<%=link_to "追加附件", student_work_index_url_in_org(activity.id, 1), :class => 'c_blue', :title => "可追加作品修订附件" %>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index e7cd740f7..5ee5c50f3 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -76,7 +76,7 @@ <%= user_for_homework_common homework_common,is_teacher %> <% work = cur_user_works_for_homework homework_common %> - <% if !is_teacher && !work.nil? && homework_common.end_time < Date.today %> + <% if !is_teacher && !work.nil? && homework_common.end_time < Date.today && work.user == User.current %>
<%=link_to "追加附件", student_work_index_url_in_org(homework_common.id, 1), :class => 'c_blue', :title => "可追加作品修订附件" %>