|
|
|
@ -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,:stop_anonymous_comment]
|
|
|
|
|
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
|
|
|
|
|
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
@ -120,7 +120,11 @@ class HomeworkCommonController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
|
|
|
|
|
|
if @homework.destroy
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html {redirect_to homework_common_index_path(:course => @course.id)}
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#开启匿评
|
|
|
|
|