2015-08-28 11:32:57 +08:00
|
|
|
//$("#HomeWorkCon").replaceWith("<%#= escape_javascript(render :partial => 'users/user_homework_form', :locals => { :homework => @homework,:edit_mode => true })%>");
|
|
|
|
hideModal('#coursesChoosePopup');
|
|
|
|
$("#homework_name").val("<%= @homework.name%>");
|
|
|
|
$("#homework_end_time").val("<%= @homework.end_time%>");
|
2015-09-29 18:02:11 +08:00
|
|
|
<% if @select_course == "0"%>
|
|
|
|
$("#course_id").val("<%= @homework.course_id%>");
|
|
|
|
<% end%>
|
2016-01-28 16:27:46 +08:00
|
|
|
$("#ref_homework_id").val("<%= @ref_homework.id%>");
|
2015-12-17 10:38:14 +08:00
|
|
|
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework,:has_program => true,:has_group => true,:show_member=>true})%>");
|
2015-08-28 11:32:57 +08:00
|
|
|
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
|
2016-02-03 12:17:45 +08:00
|
|
|
//$("input[name='homework_type']").val("<%#= @homework.homework_type%>");
|
|
|
|
<% if @homework_detail_programing %>
|
2016-09-13 16:18:57 +08:00
|
|
|
$("#homeworkSetting").removeClass("undis");
|
|
|
|
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_programing_attr', :locals => {:edit_mode => true, :homework=>@homework, :not_allow_select => false}) %>");
|
2016-02-03 12:17:45 +08:00
|
|
|
<% elsif @homework_detail_group %>
|
2016-09-13 16:18:57 +08:00
|
|
|
$("#homeworkSetting").removeClass("undis");
|
|
|
|
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_group_attr', :locals => {:edit_mode => true, :homework=>@homework, :not_allow_select => false}) %>");
|
2015-12-17 10:38:14 +08:00
|
|
|
<% end %>
|
2016-11-18 10:43:49 +08:00
|
|
|
document.getElementById("homework_type_option").options[<%=@homework.homework_type %>].selected = true;
|
|
|
|
$("#select_type_nitice").hide();
|
2015-09-02 10:25:22 +08:00
|
|
|
$("#homework_editor").show();
|