修改课程教师就具有开启、关闭匿评、修改作业的权限
This commit is contained in:
parent
21c4caa7a6
commit
6fd68806d5
|
@ -570,6 +570,9 @@ class HomeworkAttachController < ApplicationController
|
||||||
|
|
||||||
#获取课程的老师列表
|
#获取课程的老师列表
|
||||||
def find_course_teachers course
|
def find_course_teachers course
|
||||||
|
t = []
|
||||||
|
course.members.map{|m| t << m.user_id if m.user.allowed_to?(:as_teacher,course)}
|
||||||
|
|
||||||
teachers = "("
|
teachers = "("
|
||||||
teacher_members = searchTeacherAndAssistant(course)
|
teacher_members = searchTeacherAndAssistant(course)
|
||||||
teacher_members.each do |member|
|
teacher_members.each do |member|
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (User.current.admin?||User.current.id==bid.author_id) %>
|
<% if (User.current.admin?||User.current.allowed_to?(:as_teacher,@course)) %>
|
||||||
<% if bid.open_anonymous_evaluation == 1 && bid.homeworks.count >= 2%>
|
<% if bid.open_anonymous_evaluation == 1 && bid.homeworks.count >= 2%>
|
||||||
<span id="<%=bid.id %>_anonymous_comment" class="span_wping">
|
<span id="<%=bid.id %>_anonymous_comment" class="span_wping">
|
||||||
<% case bid.comment_status %>
|
<% case bid.comment_status %>
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
|
|
||||||
<div class="inf_user_image">
|
<div class="inf_user_image">
|
||||||
<table>
|
<table>
|
||||||
<% if (User.current.admin?||User.current.id==@bid.author_id) %>
|
<% if (User.current.admin?||User.current.allowed_to?(:as_teacher,course)) %>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2">
|
<td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2">
|
||||||
<% if @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2%>
|
<% if @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2%>
|
||||||
|
|
Loading…
Reference in New Issue