11 lines
526 B
Plaintext
11 lines
526 B
Plaintext
<%
|
|
id = "finish_course_#{project.id}"
|
|
display = (project.course_extra.teacher.id == User.current.id )
|
|
%>
|
|
|
|
<% if display && course_endTime_timeout?(project) #如果课程已结束%>
|
|
<%= link_to '重启课程', restartcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要重启课程?') %>
|
|
<% else %>
|
|
<%= link_to '关闭课程', finishcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要关闭课程?') %>
|
|
<% end %>
|