2016-10-24 17:21:09 +08:00
|
|
|
|
<div class="project_r_h02" style="width: 980px;">
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<h2 class="project_h2"><%= l(:permission_new_course)%></h2>
|
|
|
|
|
</div>
|
2016-10-24 17:21:09 +08:00
|
|
|
|
<div class="hwork_new pr">
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<ul>
|
|
|
|
|
<%= labelled_form_for @course do |f| %>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<li class="mt5 ml45 mb10">
|
2016-06-28 15:13:04 +08:00
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
|
|
|
|
<% if @syllabus.nil? %>
|
2017-02-14 15:22:12 +08:00
|
|
|
|
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input w300 h28", :onchange => "change_course_name();"} %>
|
2016-06-28 15:13:04 +08:00
|
|
|
|
<% else %>
|
2016-11-18 15:34:53 +08:00
|
|
|
|
<span id="course_syllabus_title"><%=@syllabus.title %></span>
|
2016-06-28 15:13:04 +08:00
|
|
|
|
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
|
|
|
|
|
<% end %>
|
2016-10-28 18:36:35 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<span class="c_red ml80" id="new_course_syllabus_notice" style="display: none;">请先选择课程</span>
|
2016-06-28 15:13:04 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<li class="mt10 ml45">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
2016-11-11 15:19:22 +08:00
|
|
|
|
<input type="text" name="course[name]" id="new_course_name" class="courses_input w289" maxlength="100" placeholder="例如:软件工程计算机系2016秋季A班" onkeyup="regex_course_name('new');">
|
2016-10-28 18:36:35 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<span class="c_red ml80" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
</li>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<div class="cl"></div>
|
2016-11-11 15:19:22 +08:00
|
|
|
|
<li class="ml125 mb5 fontGrey3"><span class="success-icon mr25">正确示例:软件工程计算机系2016秋季A班</span></li>
|
|
|
|
|
<li class="ml125 mb10 fontGrey3"><span class="error-icon">错误示例:计算机系2016秋季A班</span></li>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<!--<li class="ml125 mt10 mb10 fontGrey2" style="max-width: 544px;">班级是一个由教师、助教(教辅)和学生组成的临时的教学群体,在规定的时间内(如一个学期)完成一门课程规定的教学任务。本质上,一门课程就是一个教学计划。</li>-->
|
|
|
|
|
<li class="mt10 ml45">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<input type="text" name="class_period" id="new_class_period" class="hwork_input02 w289" onkeyup="regex_course_class_period('new');" placeholder="例如:54" maxlength="6">
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
</li>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<div class="cl"></div>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<li class="mt10 ml45 mb10">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<%= select_tag :time,options_for_select(course_time_option(@course.time),Time.now.year), {:id=>"new_time", :class => "h28 w145 mr8"} %>
|
|
|
|
|
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"new_term", :class => "h28 w145"} %>
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<span class="c_red" id="new_course_time_term_notice"></span>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
</li>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<div class="cl"></div>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<li class="mt5 ml45 mb10">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<label><span class="c_red">*</span> 结束学期 :</label>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),Time.now.year), {:id=>"new_end_time", :class => "h28 w145 mr8"} %>
|
|
|
|
|
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"new_end_term", :class => "h28 w145"} %>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
</li>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<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>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<input type="text" style="display: none;">
|
2016-05-25 14:57:46 +08:00
|
|
|
|
<input type="password" name="course[password]" id="new_course_course_password" class="hwork_input02" onkeyup="regex_course_password('new');">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<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>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<span class="ml80 c_red">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
|
2016-06-24 15:33:45 +08:00
|
|
|
|
</li>-->
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<!--<li class="ml45">-->
|
|
|
|
|
<!--<label class="fl" > <%#= l(:label_new_course_description)%> :</label>-->
|
|
|
|
|
<!--<textarea name="course[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" ></textarea>-->
|
|
|
|
|
<!--<div class="cl"></div>-->
|
|
|
|
|
<!--</li>-->
|
|
|
|
|
<li class="mt10 mb5 ml78">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<label >公开 :</label>
|
|
|
|
|
<input id="course_is_public" name="course[is_public]" type="checkbox" value="1">
|
2016-07-01 16:41:13 +08:00
|
|
|
|
<span class="c_grey">(选中后对所有用户可见,否则仅对本班级成员可见)</span>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<li class="mt5 mb5 ml30">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<label >学生列表公开 :</label>
|
|
|
|
|
<input id="course_open_student" name="course[open_student]" type="checkbox" value="1">
|
2016-07-01 16:41:13 +08:00
|
|
|
|
<span class="c_grey">(选中后对所有用户可见,否则仅对本班级成员可见)</span>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<li class="mt5 mb5 ml30">
|
2015-11-19 15:13:34 +08:00
|
|
|
|
<label >学生上传资源 :</label>
|
|
|
|
|
<input <%= @course.publish_resource == 1 ? 'checked' : ''%> id="course_publish_resource" name="course[publish_resource]" type="checkbox" />
|
2016-07-01 11:11:53 +08:00
|
|
|
|
<span class="c_grey">(选中后允许学生上传班级资源,否则不允许)</span>
|
2015-11-19 15:13:34 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
</li>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<li class="mt10 ml30" >
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_course();" >提交</a>
|
2016-07-07 15:08:34 +08:00
|
|
|
|
<%= link_to "取消",user_activities_path(User.current.id),:class => "grey_btn fl c_white ml10"%>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<% end%>
|
|
|
|
|
</ul>
|
2016-10-25 13:21:01 +08:00
|
|
|
|
<div class="ye_tips_box_inner" style="left: 460px; top: 0px; text-align: left;">
|
|
|
|
|
<em style="top: 5px;"></em>
|
|
|
|
|
<span style="top: 5px;"></span>
|
|
|
|
|
<p>
|
|
|
|
|
如果列表中没有对应的课程,请您先<%=link_to '创建课程', new_syllabus_path(),:target => '_blank', :class => 'ml5 green_btn_share c_white'%>,然后【刷新】
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ye_tips_box_inner" style="left: 460px; top: 40px; text-align: left;">
|
|
|
|
|
<em style="top: 10px;"></em>
|
|
|
|
|
<span style="top: 10px;"></span>
|
|
|
|
|
<p>
|
|
|
|
|
班级是一个由教师、助教(教辅)和学生组成的临时的教学群体,在规定的时间内(如一个<br/>学期)完成一门课程规定的教学任务。本质上,一门课程就是一个教学计划。<br/><br/>
|
|
|
|
|
<font class="c_red">特别注意:</font>如果您同时开设了教学内容完全同步的多个班级,强烈建议您:只需创建一个班<br/>级,然后在这个班级中新建多个小班,这样您发布的所有信息就能够在不同小班中共享了。
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ye_tips_box_inner" style="left: 460px; top: 223px; text-align: left;">
|
|
|
|
|
<em style="top: 5px;"></em>
|
|
|
|
|
<span style="top: 5px;"></span>
|
|
|
|
|
<p>
|
|
|
|
|
仅针对跨越多个学期的班级,否则与开始学期保持一致。
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
</div><!--talknew end-->
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<script>
|
|
|
|
|
$(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;
|
2015-12-31 11:12:09 +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;
|
2015-12-31 11:12:09 +08:00
|
|
|
|
});
|
|
|
|
|
});
|
2017-02-14 15:22:12 +08:00
|
|
|
|
function change_course_name(){
|
|
|
|
|
if($("#new_syllabus_id").val() != '0') {
|
|
|
|
|
$("#new_course_name").val($("#new_syllabus_id").find("option:selected").text());
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-12-31 11:12:09 +08:00
|
|
|
|
</script>
|