socialforge/app/views/homework_common/stop_anonymous_comment.js.erb

15 lines
783 B
Plaintext

alert('关闭成功');
<% if @hw_status == 5 %>
window.location.href = '<%=student_work_index_url(:homework => @homework.id) %>';
<% 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 %>
$("#evaluation_end_time_<%=@homework.id %>").html("匿评关闭时间:<%=format_time(Time.now) %>");
<% 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 %>
/*
$("#<%#= @homework.id %>_stop_anonymous_comment").replaceWith('');*/