学生身份隐藏新建课堂入口

openi_sso
cxt 6 years ago
parent 3e44fe368b
commit a3230075ab

@ -1481,14 +1481,14 @@ class CoursesController < ApplicationController
def new
if User.current.login?
@course_type = params[:course_type] ||= params[:course]
@issue_custom_fields = IssueCustomField.sorted.all
@trackers = Tracker.sorted.all
@course = Course.new
@course.safe_attributes = params[:course]
@syllabus = Syllabus.where("id = #{params[:syllabus_id].to_i}").first if params[:syllabus_id]
# month = Time.now.month
render :layout => 'base_edu'
if User.current.user_extensions.try(:identity) == 1
render_403
else
@course = Course.new
@course.safe_attributes = params[:course]
# month = Time.now.month
render :layout => 'base_edu'
end
else
redirect_to signin_url
end

Loading…
Cancel
Save