2015-05-26 10:22:16 +08:00
|
|
|
<% if @statue == 1%>
|
2015-11-06 14:57:39 +08:00
|
|
|
alert('启动成功');
|
|
|
|
<% if @user_activity_id == -1 %>
|
|
|
|
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>");
|
2015-12-18 21:34:31 +08:00
|
|
|
$("#evaluation_start_time_<%=@homework.id %>").html("匿评开启时间:<%=format_time(Time.now) %>");
|
2016-01-29 16:55:07 +08:00
|
|
|
sd_create_editor_from_data(<%= @homework.id%>,"","100%", "<%=@homework.class.to_s%>");
|
2015-11-06 14:57:39 +08:00
|
|
|
<% else %>
|
|
|
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>");
|
2015-12-18 21:34:31 +08:00
|
|
|
$("#evaluation_start_time_<%=@user_activity_id %>").html("匿评开启时间:<%=format_time(Time.now) %>");
|
2016-01-29 16:55:07 +08:00
|
|
|
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity");
|
2015-11-06 14:57:39 +08:00
|
|
|
<% 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")%>');*/
|
2015-05-26 10:22:16 +08:00
|
|
|
<% elsif @statue == 2 %>
|
2015-11-06 14:57:39 +08:00
|
|
|
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
|
2015-05-26 10:22:16 +08:00
|
|
|
<% elsif @statue == 3%>
|
2015-11-06 14:57:39 +08:00
|
|
|
alert("已开启匿评,请务重复开启");
|
2015-06-29 10:59:39 +08:00
|
|
|
<% elsif @statue == 4%>
|
2015-11-06 14:57:39 +08:00
|
|
|
alert("您没有权限开启匿评");
|
2015-06-29 10:59:39 +08:00
|
|
|
<% elsif @statue == 5%>
|
2015-11-06 14:57:39 +08:00
|
|
|
alert("作业提交截止之后才能启动匿评");
|
2015-05-26 10:22:16 +08:00
|
|
|
<% end %>
|