diff --git a/conf/defaults.config b/conf/defaults.config index 88ba64f2f9..4b79d48620 100644 --- a/conf/defaults.config +++ b/conf/defaults.config @@ -682,6 +682,10 @@ $courseFiles{logs}{activity_log} = ''; # to the new course being created. $siteDefaults{default_templates_course} ="modelCourse"; +# Provide a list of model courses which are not real courses, but from which +# the templates for a new course can be copied. +$modelCoursesForCopy = [ "modelCourse" ]; + ################################################################################ # Authentication system ################################################################################ diff --git a/conf/localOverrides.conf.dist b/conf/localOverrides.conf.dist index da1c93399b..d476d61231 100644 --- a/conf/localOverrides.conf.dist +++ b/conf/localOverrides.conf.dist @@ -122,6 +122,13 @@ $mail{feedbackRecipients} = [ #$webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg"; #$webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg"; +################################################################################ +# Settings for the admin course +################################################################################ + +# Provide a list of model courses which are not real courses, but from which +# the templates for a new course can be copied. +#$modelCoursesForCopy = [ "modelCourse", "anotherModelCourse", "aThirdOne" ]; ################################################################################ # OpenProblemLibrary diff --git a/lib/WeBWorK/ContentGenerator/CourseAdmin.pm b/lib/WeBWorK/ContentGenerator/CourseAdmin.pm index 28d588e974..b6a9f2e38d 100644 --- a/lib/WeBWorK/ContentGenerator/CourseAdmin.pm +++ b/lib/WeBWorK/ContentGenerator/CourseAdmin.pm @@ -484,8 +484,8 @@ sub add_course_form { #}); my @existingCourses = listCourses($ce); - push @existingCourses, 'modelCourse'; @existingCourses = sort { lc($a) cmp lc ($b) } @existingCourses; #make sort case insensitive + unshift( @existingCourses, @{$ce->{modelCoursesForCopy}}); print CGI::h2($r->maketext("Add Course"));