助教也可在个人首页关闭课程

This commit is contained in:
sw 2015-06-10 16:58:48 +08:00
parent a5d7c50fe3
commit 5d5159f4c7
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<%
id = "finish_course_#{course.id}"
display = (course.teacher.id == User.current.id || User.current.admin?)
display = (User.current.allowed_to?(:as_teacher,course) || User.current.admin?)
%>
<% if display #如果课程已结束%>