Skip to content

Commit

Permalink
MDL-34866 - Make "course display" default a site configurable option
Browse files Browse the repository at this point in the history
* 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
rlorenzo committed Aug 14, 2012
1 parent 79e250d commit 1f09018
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions admin/settings/courses.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 0 additions & 3 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
6 changes: 6 additions & 0 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ////////////////////////////////////////////////////

/**
Expand Down

0 comments on commit 1f09018

Please sign in to comment.