删除课程过滤器中没有的方法,增加删除课程的action
This commit is contained in:
parent
ce17cb1da0
commit
b781d22a62
|
@ -20,11 +20,10 @@ class CoursesController < ApplicationController
|
|||
menu_item l(:label_sort_by_influence), :only => :index
|
||||
|
||||
before_filter :can_show_course, :except => []
|
||||
before_filter :logged_user_by_apptoken,:only => [:show,:new_homework,:feedback]
|
||||
before_filter :find_course, :except => [ :index, :search,:list, :new,:join,:unjoin, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_private_courses]
|
||||
before_filter :authorize_course, :only => [:show, :settings, :edit, :update, :modules, :close, :reopen, :view_homework_attaches, :course]
|
||||
before_filter :authorize_course_global, :only => [:view_homework_attaches, :new,:create]
|
||||
before_filter :require_admin, :only => [:copy, :archive, :unarchive, :destroy, :calendar]
|
||||
before_filter :logged_user_by_apptoken,:only => [:show,:feedback]
|
||||
before_filter :find_course, :except => [ :index, :search, :new,:join,:unjoin, :create, :new_join, :course,:join_private_courses]
|
||||
before_filter :authorize_course, :only => [:show, :settings, :update, :course]
|
||||
before_filter :authorize_course_global, :only => [:new,:create]
|
||||
before_filter :toggleCourse, :only => [:finishcourse, :restartcourse]
|
||||
|
||||
before_filter :require_login, :only => [:join, :unjoin]
|
||||
|
@ -809,6 +808,12 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#删除课程
|
||||
#删除课程只是将课程的is_delete状态改为false,is_delete为false状态的课程只有管理员可以看到
|
||||
def destroy
|
||||
|
||||
end
|
||||
|
||||
private
|
||||
def allow_join course
|
||||
if course_endTime_timeout? course
|
||||
|
|
|
@ -15,6 +15,7 @@ a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; h
|
|||
.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_delete{ display:block; background:url(../images/leftside.png) -1px -157px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;}
|
||||
a:hover.pr_info_name{ color:#3ca5c6;}
|
||||
.pr_info_score{ font-size:14px; color:#3e4040; }
|
||||
|
|
Loading…
Reference in New Issue