<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
发布作业
<% homework = HomeworkCommon.new %> <%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %> <%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %> <% end%>
<%else%>
作业
<% end%> <%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>