From b781d22a6292a2788cfe985e518e147e137afe6d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 23 Jul 2015 16:17:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=AF=BE=E7=A8=8B=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8=E4=B8=AD=E6=B2=A1=E6=9C=89=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=9A=84action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 15 ++++++++++----- public/stylesheets/leftside.css | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a0a61786c..b6a961239 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -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 diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index 50b47fff4..990c02d54 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -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; }