2015-04-09 09:22:09 +08:00
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<h2 class="project_h2"><%= l(:label_course_modify_settings)%></h2>
|
|
|
|
|
</div>
|
2015-12-04 16:21:48 +08:00
|
|
|
|
<script>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
$(function(){
|
|
|
|
|
<% if @select_tab == 'member'%>
|
|
|
|
|
$("#tb_2").click();
|
|
|
|
|
<% end %>
|
|
|
|
|
})
|
2015-12-04 16:21:48 +08:00
|
|
|
|
</script>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
<div class="hwork_new">
|
|
|
|
|
<div id="tb_" class="hwork_tb_">
|
|
|
|
|
<ul>
|
|
|
|
|
<li id="tb_1" class="hwork_hovertab" onclick="course_setting(1);" >
|
|
|
|
|
基本信息
|
|
|
|
|
</li>
|
|
|
|
|
<li id="tb_2" class="hwork_normaltab" onclick="course_setting(2);">
|
|
|
|
|
成员
|
|
|
|
|
</li>
|
2015-11-17 17:34:50 +08:00
|
|
|
|
<li id="tb_3" class="hwork_normaltab" onclick="course_setting(3);">
|
|
|
|
|
组织
|
|
|
|
|
</li>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
|
|
|
|
|
<ul>
|
|
|
|
|
<%= labelled_form_for @course do |f| %>
|
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ml45">
|
2015-09-16 12:39:08 +08:00
|
|
|
|
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
|
|
|
|
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
2015-04-09 09:22:09 +08:00
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
|
|
|
|
<input type="text" name="course[name]" id="course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name();" value="<%= @course.name%>">
|
|
|
|
|
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空</span>
|
2015-05-15 16:02:33 +08:00
|
|
|
|
<input type="password" style="top: -100000px;position: fixed;">
|
2015-04-09 09:22:09 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<li class="ml45">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
|
|
|
|
<input type="text" name="class_period" id="class_period" class="hwork_input02" onkeyup="regex_course_class_period();" maxlength="6" value="<%= @course.class_period%>">
|
|
|
|
|
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
|
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
2016-01-22 15:17:11 +08:00
|
|
|
|
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"time"} %>
|
|
|
|
|
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"term"} %>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> 结束学期 :</label>
|
2016-01-22 15:17:11 +08:00
|
|
|
|
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"end_time"} %>
|
|
|
|
|
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"end_term"} %>
|
|
|
|
|
<span class="c_red" id="course_time_term_notice"></span>
|
2015-12-31 11:12:09 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
<li class="ml45 mb10">
|
|
|
|
|
<label><span class="c_red">*</span> <%= l(:label_new_course_password)%> :</label>
|
2015-04-17 15:07:01 +08:00
|
|
|
|
<input type="password" name="course[password]" id="course_course_password" class="hwork_input02" value="<%= @course.password%>" onkeyup="regex_course_password();">
|
2015-04-16 10:26:03 +08:00
|
|
|
|
<a id="psw_btn" href="javascript:void(0)">显示明码</a>
|
2015-04-17 15:07:01 +08:00
|
|
|
|
<span class="c_red" id="course_course_password_notice"></span>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<span class=" ml80 c_orange">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</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" maxlength="6000"><%= @course.description%></textarea>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class=" mb5 ml80">
|
|
|
|
|
<label >公开 :</label>
|
|
|
|
|
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox">
|
2015-12-29 16:31:19 +08:00
|
|
|
|
<span class="c_grey">(选中后课外用户可见该课程,否则仅对课内成员可见)</span>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class=" mb5 ml30">
|
|
|
|
|
<label >学生列表公开 :</label>
|
|
|
|
|
<input <%= @course.open_student == 1 ? 'checked' : ''%> id="course_open_student" name="course[open_student]" type="checkbox" style="margin-left: 1px;"/>
|
2015-12-29 10:15:53 +08:00
|
|
|
|
<span class="c_grey">(选中后课外用户可见学生列表,否则仅对课内成员可见)</span>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2015-11-17 16:43:50 +08:00
|
|
|
|
<li class=" mb5 ml30">
|
|
|
|
|
<label >学生上传资源 :</label>
|
|
|
|
|
<input <%= @course.publish_resource == 1 ? 'checked' : ''%> id="course_publish_resource" name="course[publish_resource]" type="checkbox" style="margin-left: 1px;"/>
|
2015-12-29 10:15:53 +08:00
|
|
|
|
<span class="c_grey">(选中后允许学生上传课程资源,否则不允许)</span>
|
2015-11-17 16:43:50 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
<li class=" ml90" >
|
|
|
|
|
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_edit_course(<%= @course.id%>);" >提交</a>
|
|
|
|
|
<%= link_to l(:button_cancel), course_path(@course), :class => "blue_btn grey_btn fl c_white" %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
2015-12-10 17:26:03 +08:00
|
|
|
|
<% if @course.is_delete == 1 %>
|
2015-12-11 15:39:38 +08:00
|
|
|
|
<div class="mt30"><%=link_to "恢复该课程", renew_course_path(@course) %></div>
|
2015-12-10 17:26:03 +08:00
|
|
|
|
<% else %>
|
2015-12-10 18:59:54 +08:00
|
|
|
|
<div class="mt30">
|
|
|
|
|
<img src="/images/pic_del.gif" class="mr5"><%=link_to "删除该课程", course_path(@course), :method => :delete, :confirm=>"确认要删除该课程吗?" %>
|
|
|
|
|
<span>(友情提示:删除该课程后如果您想恢复该课程,请联系系统管理员!)</span>
|
|
|
|
|
</div>
|
2015-12-10 17:26:03 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
|
2015-04-09 09:22:09 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="hwork_undis" id="tbc_02">
|
2015-04-17 16:38:25 +08:00
|
|
|
|
<div class="search_course fl">
|
|
|
|
|
<%= form_tag(search_member_course_path,:id => "course_member_search_form", :method => :get, :class => "search_form_course",:remote => true) do %>
|
|
|
|
|
<!-- , :onkeyup => "regexQ('#{l(:label_search_conditions_not_null)}');" -->
|
2016-01-22 17:27:21 +08:00
|
|
|
|
<%= text_field_tag 'name', params[:name], :placeholder => "登录名、学号、姓名搜索", :class => "search_text fl" %>
|
2015-04-17 16:38:25 +08:00
|
|
|
|
<a href="javascript:void(0)" onclick="submitMemberSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white ml10" >
|
|
|
|
|
<%= l(:label_search)%>
|
|
|
|
|
</a>
|
|
|
|
|
<br />
|
|
|
|
|
<span id="course_member_name_span" style="float: left"></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="course_members_setting">
|
|
|
|
|
<%= render :partial => "course_members" %>
|
|
|
|
|
</div>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
</div><!---成员结束-->
|
2015-11-17 17:34:50 +08:00
|
|
|
|
|
|
|
|
|
<div class="hwork_undis" id="tbc_03">
|
|
|
|
|
<%= render :partial => 'courses/settings/join_org' %>
|
|
|
|
|
</div>
|
2015-04-09 09:22:09 +08:00
|
|
|
|
</div><!--talknew end-->
|
2015-11-10 14:18:39 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<script type="text/javascript">
|
2015-12-31 11:12:09 +08:00
|
|
|
|
function select() {
|
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'courses/term_select') %>');
|
|
|
|
|
showModal('ajax-modal', '500px');
|
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
2016-01-20 16:03:28 +08:00
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
|
2015-12-31 11:12:09 +08:00
|
|
|
|
$('#ajax-modal').parent().addClass("anonymos");
|
|
|
|
|
}
|
2016-02-22 15:09:07 +08:00
|
|
|
|
//$("#time").click(select);
|
|
|
|
|
//$("#term").click(select);
|
2015-12-04 16:21:48 +08:00
|
|
|
|
</script>
|