2016-01-08 10:49:02 +08:00
|
|
|
|
<script type="text/javascript">
|
2016-02-26 17:44:46 +08:00
|
|
|
|
function submit_copy_course() {
|
2016-06-29 10:45:56 +08:00
|
|
|
|
if(regex_syllabus_option('new')&®ex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new'))
|
2016-02-26 17:44:46 +08:00
|
|
|
|
{
|
|
|
|
|
$("#new_course").submit();
|
|
|
|
|
document.getElementById("submit_copy_course").onclick = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-01-08 10:49:02 +08:00
|
|
|
|
$(document).ready(function(){
|
2016-05-25 14:57:46 +08:00
|
|
|
|
$("#new_time").change(function(){
|
|
|
|
|
document.getElementById("new_end_time").options[document.getElementById("new_time").selectedIndex].selected = true;
|
2016-01-08 10:49:02 +08:00
|
|
|
|
});
|
2016-05-25 14:57:46 +08:00
|
|
|
|
$("#new_term").change(function(){
|
|
|
|
|
document.getElementById("new_end_term").options[document.getElementById("new_term").selectedIndex].selected = true;
|
2016-01-08 10:49:02 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var popupHeight = $(".referenceResourcesPopup").outerHeight(true);
|
|
|
|
|
$(".referenceResourcesPopup").css("marginTop",-popupHeight/2);
|
|
|
|
|
$(".resourcePopupClose").click(function(){
|
|
|
|
|
hideModal();
|
|
|
|
|
});
|
|
|
|
|
$("#copyResource").click(function(){
|
|
|
|
|
if ($("#allResource").is(":checked")){
|
|
|
|
|
$("input[name='course_attachment_type[]']").attr("checked",true);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$("input[name='course_attachment_type[]']").attr("checked",false);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$("#copyResource2").click(function(){
|
|
|
|
|
if ($("input[name='course_attachment_type[]']:checked").length == 6){
|
|
|
|
|
$("#allResource").attr("checked",true);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$("#allResource").attr("checked",false);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<div class="referenceText">信息配置</div>
|
|
|
|
|
</div>
|
|
|
|
|
<ul class="mt10">
|
|
|
|
|
<%=labelled_form_for @new_course do |f| %>
|
|
|
|
|
<input name="copy_course" value="<%=@course.id %>" style="display: none"/>
|
2016-01-08 21:22:36 +08:00
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<a href="javascript:void(0)" class="upimg fl">
|
2016-01-29 22:09:16 +08:00
|
|
|
|
<%= image_tag(url_to_avatar(@course), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%>
|
2016-01-08 21:22:36 +08:00
|
|
|
|
</a> <!--<a href="javascript:void(0)" class="upbtn fl ml30" onclick="$('#upload_course_logo').click();">上传图片</a>-->
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<!--</span>-->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
2016-07-12 10:35:52 +08:00
|
|
|
|
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input"} %>
|
2016-09-05 14:14:25 +08:00
|
|
|
|
<span class="c_red" id="new_syllabus_notice">如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%>,然后【刷新】</span>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
</li>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<li class="ml45">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<input type="text" name="course[name]" id="new_course_name" class="courses_input grey_border" maxlength="100" onkeyup="regex_course_name('new');" value="<%=@course.name %>">
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空</span>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<li class="ml45">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<input type="text" name="class_period" id="new_class_period" class="hwork_input02 grey_border" onkeyup="regex_course_class_period('new');" maxlength="6" value="<%=@course.class_period %>">
|
|
|
|
|
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<%= select_tag :time,options_for_select(course_time_option(@new_course.time),@new_course.time), {:id=>"new_time"} %>
|
|
|
|
|
<%= select_tag :term,options_for_select(course_term_option,@new_course.term || cur_course_term),{:id=>"new_term"} %>
|
|
|
|
|
<span class="c_red" id="new_course_time_term_notice"></span>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> 结束学期 :</label>
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<%= select_tag :end_time,options_for_select(course_time_option(@new_course.end_time),@new_course.end_time), {:id=>"new_end_time"} %>
|
|
|
|
|
<%= select_tag :end_term,options_for_select(course_term_option,@new_course.end_term || cur_course_term),{:id=>"new_end_term"} %>
|
2016-07-01 17:47:35 +08:00
|
|
|
|
<span class="mr15 c_red">仅针对跨越多个学期的班级,否则与开始学期保持一致。</span>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
2016-06-24 15:33:45 +08:00
|
|
|
|
<!--<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> <%#= l(:label_new_course_password)%> :</label>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<input type="text" style="display: none;">
|
2016-06-24 15:33:45 +08:00
|
|
|
|
<input type="text" name="course[password]" id="new_course_course_password" class="hwork_input02 grey_border" onkeyup="regex_course_password('new');" value="<%#=@course.password %>">
|
|
|
|
|
<!–<a id="psw_btn" href="javascript:void(0)">显示明码</a>–>
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<span class="c_red" id="new_course_course_password_notice"></span>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<span class="ml95 c_red">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
|
2016-06-24 15:33:45 +08:00
|
|
|
|
</li>-->
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<li class="ml50">
|
|
|
|
|
<label class="fl" > <%= l(:label_new_course_description)%> :</label>
|
|
|
|
|
<textarea name="course[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl grey_border" ><%= @course.description.nil? ? "" : @course.description %></textarea>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class=" mb5 ml85">
|
|
|
|
|
<label >公开 :</label>
|
|
|
|
|
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox" value="<%=@course.is_public.to_i %>">
|
2016-07-01 16:41:13 +08:00
|
|
|
|
<span class="c_grey">(选中后对所有用户可见,否则仅对本班级成员可见)</span>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2016-02-26 11:16:12 +08:00
|
|
|
|
<li class="ml85">
|
2016-02-26 10:41:14 +08:00
|
|
|
|
<label class="fl">复制 :</label>
|
2016-02-26 11:16:12 +08:00
|
|
|
|
<ul class="fl" id="copyResource" style="width:544px;">
|
|
|
|
|
<li class="sendCourseName fl ml5">
|
|
|
|
|
<label class="fl">
|
2016-02-26 10:41:14 +08:00
|
|
|
|
<input name="course_content_type[]" type="checkbox" value="0" class="resourceCopy"/>
|
|
|
|
|
作业</label>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<span class="c_red ml5 fl mb10 w490">复制到新班级中的作业将在1个月后发布、2个月后提交截止,请您调整作业的发布时间、截止时间等时间节点。</span>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
</li>
|
2016-02-26 11:16:12 +08:00
|
|
|
|
<li class="sendCourseName fl ml5">
|
|
|
|
|
<label class="fl">
|
2016-02-26 10:41:14 +08:00
|
|
|
|
<input name="course_content_type[]" type="checkbox" value="1" class="resourceCopy"/>
|
|
|
|
|
资源</label>
|
2016-07-27 16:43:27 +08:00
|
|
|
|
<span class="c_red ml5 fl mb10">复制到新班级的资源将在1个月后发布,请您调整资源的发布时间,否则学生将看不到资源。</span>
|
2016-02-26 10:41:14 +08:00
|
|
|
|
</li>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
</ul>
|
2016-02-26 10:41:14 +08:00
|
|
|
|
<!--<ul class="fl" id="copyResource2">
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<li class="sendCourseName fl mr15">
|
|
|
|
|
<label>
|
|
|
|
|
<input name="course_attachment_type[]" type="checkbox" value="1" class="resourceCopy"/>
|
|
|
|
|
课件</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="sendCourseName fl mr15">
|
|
|
|
|
<label>
|
|
|
|
|
<input name="course_attachment_type[]" type="checkbox" value="2" class="resourceCopy"/>
|
|
|
|
|
软件</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="sendCourseName fl mr15">
|
|
|
|
|
<label>
|
|
|
|
|
<input name="course_attachment_type[]" type="checkbox" value="3" class="resourceCopy"/>
|
|
|
|
|
媒体</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="sendCourseName fl mr15">
|
|
|
|
|
<label>
|
|
|
|
|
<input name="course_attachment_type[]" type="checkbox" value="4" class="resourceCopy"/>
|
|
|
|
|
代码</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="sendCourseName fl mr15">
|
|
|
|
|
<label>
|
|
|
|
|
<input name="course_attachment_type[]" type="checkbox" value="6" class="resourceCopy"/>
|
|
|
|
|
论文</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="sendCourseName fl mr15">
|
|
|
|
|
<label>
|
|
|
|
|
<input name="course_attachment_type[]" type="checkbox" value="5" class="resourceCopy"/>
|
|
|
|
|
其它</label>
|
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</ul>
|
2016-02-26 10:41:14 +08:00
|
|
|
|
<span class="c_red ml5 fl mb10">您可以通过选择类型,将对应类型复制到新课程中。</span>-->
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
<div>
|
2016-02-26 17:44:46 +08:00
|
|
|
|
<a href="javascript:void(0);" class="greyBtn fr mr40 f12" id="submit_copy_course" onclick="submit_copy_course();">完成</a>
|
2016-01-08 10:49:02 +08:00
|
|
|
|
<a href="javascript:void(0);" class="greyBtn fr mr10 f12" onclick="hideResource();">取消</a>
|
|
|
|
|
</div>
|
2016-02-26 17:44:46 +08:00
|
|
|
|
<div class="cl"></div>
|