|
|
|
@ -13,6 +13,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
include ApplicationHelper
|
|
|
|
|
helper SyllabusesHelper
|
|
|
|
|
|
|
|
|
|
before_filter :local_exam, :except => [:show, :index]
|
|
|
|
|
# before_filter :auth_login1, :only => [:show, :course_activity, :feedback]
|
|
|
|
|
if Redmine::Configuration['gitlab_address'].include?("test")
|
|
|
|
|
skip_before_filter :verify_authenticity_token, :only => [:update_course_module, :join_course_multi_role]
|
|
|
|
@ -1617,6 +1618,8 @@ class CoursesController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def show
|
|
|
|
|
if LocalSetting.first.try(:exam) && !User.current.admin?
|
|
|
|
|
else
|
|
|
|
|
# 被删除的课程只有超级管理员才能看到,is_delete为1的时候,标记课程被删除
|
|
|
|
|
# if @course.is_delete == 1 && !User.current.admin?
|
|
|
|
|
# render_403
|
|
|
|
@ -1745,6 +1748,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
@left_nav_type = 1
|
|
|
|
|
@show_page = true
|
|
|
|
|
end
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.js
|
|
|
|
|
format.html{render :layout => 'base_courses'}
|
|
|
|
|