23 lines
1.5 KiB
Plaintext
23 lines
1.5 KiB
Plaintext
<% if @statue == 1%>
|
|
alert('启动成功');
|
|
<% 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 %>
|
|
$("#evaluation_start_time_<%=@user_activity_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 %>_start_anonymous_comment").replaceWith('<%#= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>');*/
|
|
<% elsif @statue == 2 %>
|
|
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
|
|
<% elsif @statue == 3%>
|
|
alert("已开启匿评,请务重复开启");
|
|
<% elsif @statue == 4%>
|
|
alert("您没有权限开启匿评");
|
|
<% elsif @statue == 5%>
|
|
alert("作业提交截止之后才能启动匿评");
|
|
<% end %> |