导入作业之后显示所有的作业信息

This commit is contained in:
sw 2015-09-02 10:25:22 +08:00
parent b0060fc03b
commit e42b6d65db
2 changed files with 7 additions and 15 deletions

View File

@ -12,16 +12,15 @@
}
</script>
<div class="resources mb10">
<div class="homepageRightBanner">
<div class="NewsBannerName">作业</div>
</div>
</div>
<div class="cl"></div>
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
<!-- 老师身份才可以发布作业 -->
<div class="resources mb10">
<div class="homepageRightBanner">
<div class="NewsBannerName">发布作业</div>
</div>
</div>
<div class="cl"></div>
<div class="HomeWork mb10">
<% homework = HomeworkCommon.new %>
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
@ -30,14 +29,6 @@
</div>
<% end%>
</div><!----HomeWork end-->
<%else%>
<div class="resources mb10">
<div class="homepageRightBanner">
<div class="NewsBannerName">作业</div>
</div>
</div>
<div class="cl"></div>
<% end%>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>

View File

@ -5,3 +5,4 @@ $("#homework_end_time").val("<%= @homework.end_time%>");
$("#course_id").val("<%= @homework.course_id%>");
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework })%>");
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
$("#homework_editor").show();