Permalink
Browse files

MDL-34866 - Make "course display" default a site configurable option

* Moved COURSE_DISPLAY_SINGLEPAGE and COURSE_DISPLAY_MULTIPAGE constants from courselib to moodlelib.php
* Using course display constants in course default admin setting page
  • Loading branch information...
1 parent 79e250d commit 1f09018af7e287cbe7b55d4da435c1d4718bbaec @rlorenzo rlorenzo committed Aug 14, 2012
Showing with 9 additions and 6 deletions.
  1. +3 −3 admin/settings/courses.php
  2. +0 −3 course/lib.php
  3. +6 −0 lib/moodlelib.php
@@ -48,9 +48,9 @@
}
$choices = array();
- $choices[0] = new lang_string('coursedisplay_single');
- $choices[1] = new lang_string('coursedisplay_multi');
- $temp->add(new admin_setting_configselect('moodlecourse/coursedisplay', new lang_string('coursedisplay'), new lang_string('coursedisplay_help'), 0, $choices));
+ $choices[COURSE_DISPLAY_SINGLEPAGE] = new lang_string('coursedisplay_single');
+ $choices[COURSE_DISPLAY_MULTIPAGE] = new lang_string('coursedisplay_multi');
+ $temp->add(new admin_setting_configselect('moodlecourse/coursedisplay', new lang_string('coursedisplay'), new lang_string('coursedisplay_help'), COURSE_DISPLAY_SINGLEPAGE, $choices));
$temp->add(new admin_setting_heading('groups', new lang_string('groups', 'group'), ''));
$choices = array();
View
@@ -47,9 +47,6 @@
define('MOD_CLASS_ACTIVITY', 0);
define('MOD_CLASS_RESOURCE', 1);
-define('COURSE_DISPLAY_SINGLEPAGE', 0); // display all sections on one page
-define('COURSE_DISPLAY_MULTIPAGE', 1); // split pages into a page per section
-
function make_log_url($module, $url) {
switch ($module) {
case 'course':
View
@@ -485,6 +485,12 @@
*/
define('USER_CAN_IGNORE_FILE_SIZE_LIMITS', -1);
+/**
+ * Course display settings
+ */
+define('COURSE_DISPLAY_SINGLEPAGE', 0); // display all sections on one page
+define('COURSE_DISPLAY_MULTIPAGE', 1); // split pages into a page per section
+
/// PARAMETER HANDLING ////////////////////////////////////////////////////
/**

0 comments on commit 1f09018

Please sign in to comment.