增加访问作业显示列表的权限

This commit is contained in:
sw 2014-06-26 14:58:59 +08:00
parent dbd5c49246
commit 392dc0c365
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ class BidsController < ApplicationController
#Added by young
menu_item l(:label_homework), :only => [:edit, :udpate]
menu_item :respond
menu_item :course, :only => :show_courseEx
menu_item :project, :only => [:show_project,:show_results, :new_submit_homework]
menu_item :homework_respond, :only => :homework_respond
menu_item :homework_statistics, :only => :homework_statistics

View File

@ -216,7 +216,7 @@
<% if User.current.logged? && course && (!Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.roles&Role.where('id = ? or id = ? or id =?', 5, 10, 7)).size >0) %>
<%= link_to l(:label_homework_commit), course_for_bid_path, :class => link_class(:course) %>
<% else %>
<%#= link_to l(:label_homework_info), course_for_bid_path, :class => link_class(:course) %>
<%= link_to l(:label_homework_info), course_for_bid_path, :class => link_class(:course) %>
<% end %>
</li>
<% end %>