17 lines
969 B
Plaintext
17 lines
969 B
Plaintext
|
<% if @status == 1 %>
|
||
|
notice_box("该作业已发布");
|
||
|
<% elsif @status == 2 %>
|
||
|
notice_box("您还没有设置截止时间<br/>请先编辑作业并设置截止时间和发布时间");
|
||
|
<% else %>
|
||
|
notice_box("发布成功");
|
||
|
<% if @hw_status == 5 %>
|
||
|
$("#homework_post_brief").html("<%= escape_javascript(render :partial => 'student_work/homework_post_brief', :locals => {:homework => @homework, :is_teacher => @is_teacher}) %>");
|
||
|
<% else %>
|
||
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:hw_status=>@hw_status}) %>");
|
||
|
<% end %>
|
||
|
<% if @user_activity_id != @homework.id %>
|
||
|
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity");
|
||
|
<% else %>
|
||
|
sd_create_editor_from_data(<%= @homework.id%>,"","100%", "<%=@homework.class.to_s%>");
|
||
|
<% end %>
|
||
|
<% end %>
|