2015-10-15 16:17:48 +08:00
|
|
|
|
<script type="text/javascript">
|
2015-09-28 15:52:30 +08:00
|
|
|
|
function reset_homework(){
|
|
|
|
|
$("#homework_name").val("");
|
2015-10-30 13:58:54 +08:00
|
|
|
|
$("#homework_publish_time").val("");
|
2015-09-28 15:52:30 +08:00
|
|
|
|
$("#homework_end_time").val("");
|
2015-12-25 15:57:30 +08:00
|
|
|
|
document.getElementById("anonymous_comment").checked = true;
|
2015-09-28 15:52:30 +08:00
|
|
|
|
$("#course_id").val($("#option_select").val());
|
2015-12-03 09:17:36 +08:00
|
|
|
|
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new,:has_program => true,:has_group => true})%>");
|
2016-02-02 15:50:28 +08:00
|
|
|
|
//homework_description_editor.html("");
|
|
|
|
|
$("#homework_name_span").text("");
|
|
|
|
|
$("#homework_end_time_span").text("");
|
|
|
|
|
$("#homework_end_time_span").text("");
|
|
|
|
|
$("#homework_course_id_span").text("");
|
2015-09-28 15:52:30 +08:00
|
|
|
|
$("#homework_editor").toggle();
|
|
|
|
|
}
|
2015-06-10 16:37:18 +08:00
|
|
|
|
|
2015-09-28 15:52:30 +08:00
|
|
|
|
$(function(){
|
|
|
|
|
$("#RSide").removeAttr("id");
|
|
|
|
|
$("#Container").css("width","1000px");
|
|
|
|
|
});
|
2015-09-29 10:48:50 +08:00
|
|
|
|
|
|
|
|
|
<% if @is_new%>
|
|
|
|
|
$(function(){
|
|
|
|
|
$("#homework_name").focus();
|
|
|
|
|
});
|
|
|
|
|
<%end%>
|
2015-09-28 15:52:30 +08:00
|
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
/*日历选择图*/
|
|
|
|
|
img.ui-datepicker-trigger {display:block;background:url(../images/public_icon.png) -31px 0 no-repeat;cursor: pointer;vertical-align: middle;width:16px;height:15px;float:left;margin: 7px;}
|
2015-09-29 10:38:14 +08:00
|
|
|
|
.description{display: none !important;}
|
|
|
|
|
.ispublic-label{display: none !important;}
|
|
|
|
|
.is_public_checkbox{display: none !important;}
|
|
|
|
|
.is_public{display: none !important;}
|
|
|
|
|
.link_file{ background:url(../images/pic_file.png) 0 5px no-repeat !important;}
|
|
|
|
|
#attachments_fields input.filename{ background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
|
2015-09-29 10:48:50 +08:00
|
|
|
|
.link_file_a{background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
|
2015-09-28 15:52:30 +08:00
|
|
|
|
</style>
|
2015-06-30 10:18:46 +08:00
|
|
|
|
|
2015-09-28 15:52:30 +08:00
|
|
|
|
<div class="homepageRight mt0 ml10">
|
|
|
|
|
<div class="homepageRightBanner mb10">
|
2016-04-13 11:20:38 +08:00
|
|
|
|
<!--<div class="NewsBannerName">作业</div>-->
|
|
|
|
|
<div id="menu_r" class="NewsBannerName" style="margin-bottom: -10px;">
|
|
|
|
|
<ul class="menu_r b_w" style="padding-left: 0px; margin-top: -5px;">
|
|
|
|
|
<li>
|
2016-04-13 14:23:24 +08:00
|
|
|
|
<a href="javascript:void(0);" class="menu_arrow" style="font-size:16px; color:#4b4b4b; font-weight: normal; padding-left: 0px;">作业</a>
|
2016-04-14 14:50:16 +08:00
|
|
|
|
<ul style="max-height:240px; overflow-y:auto; overflow-x:hidden;">
|
2016-06-24 11:20:48 +08:00
|
|
|
|
<% if @homework_commons.empty? %>
|
|
|
|
|
<li class="pr10" style="font-weight: normal; color: #888888; width: 120px; padding-left: 15px; padding-bottom: 5px;">目前尚未发布作业</li>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% @homework_commons.each_with_index do |homework_common,index |%>
|
|
|
|
|
<li class="pr10">
|
|
|
|
|
<%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%>
|
|
|
|
|
</li>
|
|
|
|
|
<% end%>
|
|
|
|
|
<% end %>
|
2016-04-13 11:20:38 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2016-01-29 15:37:03 +08:00
|
|
|
|
<div id="search_div" class="fr mr10">
|
|
|
|
|
<%= render :partial => 'homework_search_form',:locals => {:course=>@course} %>
|
|
|
|
|
</div>
|
2015-09-28 15:52:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-07-17 17:59:42 +08:00
|
|
|
|
|
2015-09-28 15:52:30 +08:00
|
|
|
|
<% if @is_teacher%>
|
|
|
|
|
<!-- 老师身份才可以发布作业 -->
|
2016-02-02 15:50:28 +08:00
|
|
|
|
<div class="HomeWork mb10" nhname='homework_common_form'>
|
2015-09-28 15:52:30 +08:00
|
|
|
|
<%= labelled_form_for @new_homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
|
|
|
|
|
<div id="HomeWorkCon">
|
|
|
|
|
<%= render :partial => 'users/user_homework_form', :locals => { :homework => @new_homework,:f => f,:edit_mode => false,:select_course => false } %>
|
2015-09-28 17:27:01 +08:00
|
|
|
|
<input type="hidden" name="is_in_course" value="1"/>
|
2015-07-24 15:19:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% end%>
|
2015-09-28 15:52:30 +08:00
|
|
|
|
</div><!----HomeWork end-->
|
|
|
|
|
<% end%>
|
2016-05-24 10:34:36 +08:00
|
|
|
|
<div id="homework_index_list">
|
|
|
|
|
<%= render :partial => 'homework_common/homework_index_list', :locals => {:homework_commons => @homeworks,:course_id => @course.id} %>
|
2016-05-19 13:50:45 +08:00
|
|
|
|
</div>
|
2015-09-28 15:52:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-05-19 17:12:43 +08:00
|
|
|
|
|