2015-03-26 16:01:25 +08:00
|
|
|
|
<div class="project_r_h02">
|
|
|
|
|
<h2 class="project_h2"><%= l(:permission_new_course)%></h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="hwork_new">
|
|
|
|
|
<ul>
|
|
|
|
|
<%= labelled_form_for @course do |f| %>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<li class="ml45">
|
|
|
|
|
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
|
|
|
|
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
|
|
|
|
<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" maxlength="100" onkeyup="regex_course_name('new');">
|
|
|
|
|
<span class="c_red" 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>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<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" onkeyup="regex_course_class_period('new');" maxlength="6">
|
|
|
|
|
<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>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<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(@course.time),@course.time), {:id=>"new_time"} %>
|
|
|
|
|
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"new_term"} %>
|
|
|
|
|
<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>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<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(@course.end_time),@course.end_time), {:id=>"new_end_time"} %>
|
|
|
|
|
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"new_end_term"} %>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<span class="mr15 c_red">仅针对跨越多个学期的班级,否则不用修改。</span>
|
|
|
|
|
</li>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_new_course_password)%> :</label>
|
|
|
|
|
<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>
|
|
|
|
|
</li>
|
|
|
|
|
<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=" mb5 ml80">
|
|
|
|
|
<label >公开 :</label>
|
|
|
|
|
<input id="course_is_public" name="course[is_public]" type="checkbox" value="1">
|
|
|
|
|
<span class="c_grey">(选中后课外用户可见该课程,否则仅对课内成员可见)</span>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class=" mb5 ml30">
|
|
|
|
|
<label >学生列表公开 :</label>
|
|
|
|
|
<input id="course_open_student" name="course[open_student]" type="checkbox" value="1">
|
|
|
|
|
<span class="c_grey">(选中后课外用户可见学生列表,否则仅对课内成员可见)</span>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class=" 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" />
|
2015-12-31 11:12:09 +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>
|
|
|
|
|
<li class=" ml90" >
|
|
|
|
|
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_course();" >提交</a>
|
|
|
|
|
<%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2015-03-26 16:01:25 +08:00
|
|
|
|
<% end%>
|
|
|
|
|
</ul>
|
|
|
|
|
</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
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|