关闭匿评功能
This commit is contained in:
parent
96354a1c00
commit
f3246b99c9
|
@ -1,7 +1,7 @@
|
|||
class HomeworkCommonController < ApplicationController
|
||||
layout "base_courses"
|
||||
before_filter :find_course, :only => [:index,:new,:create]
|
||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment]
|
||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment]
|
||||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
|
||||
|
||||
def index
|
||||
|
@ -152,7 +152,10 @@ class HomeworkCommonController < ApplicationController
|
|||
|
||||
#关闭匿评
|
||||
def stop_anonymous_comment
|
||||
|
||||
@homework_detail_manual.update_column('comment_status', 3)
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
#提示
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('<span class="fr pr_join_span mr10" title="匿评结束">匿评结束</span>');
|
||||
alert('关闭成功');
|
Loading…
Reference in New Issue