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