Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 1f09018af7e287cbe7b55d4da435c1d4718bbaec 1 parent 79e250d
Rex Lorenzo rlorenzo authored
6 admin/settings/courses.php
@@ -48,9 +48,9 @@
48 48 }
49 49
50 50 $choices = array();
51   - $choices[0] = new lang_string('coursedisplay_single');
52   - $choices[1] = new lang_string('coursedisplay_multi');
53   - $temp->add(new admin_setting_configselect('moodlecourse/coursedisplay', new lang_string('coursedisplay'), new lang_string('coursedisplay_help'), 0, $choices));
  51 + $choices[COURSE_DISPLAY_SINGLEPAGE] = new lang_string('coursedisplay_single');
  52 + $choices[COURSE_DISPLAY_MULTIPAGE] = new lang_string('coursedisplay_multi');
  53 + $temp->add(new admin_setting_configselect('moodlecourse/coursedisplay', new lang_string('coursedisplay'), new lang_string('coursedisplay_help'), COURSE_DISPLAY_SINGLEPAGE, $choices));
54 54
55 55 $temp->add(new admin_setting_heading('groups', new lang_string('groups', 'group'), ''));
56 56 $choices = array();
3  course/lib.php
@@ -47,9 +47,6 @@
47 47 define('MOD_CLASS_ACTIVITY', 0);
48 48 define('MOD_CLASS_RESOURCE', 1);
49 49
50   -define('COURSE_DISPLAY_SINGLEPAGE', 0); // display all sections on one page
51   -define('COURSE_DISPLAY_MULTIPAGE', 1); // split pages into a page per section
52   -
53 50 function make_log_url($module, $url) {
54 51 switch ($module) {
55 52 case 'course':
6 lib/moodlelib.php
@@ -485,6 +485,12 @@
485 485 */
486 486 define('USER_CAN_IGNORE_FILE_SIZE_LIMITS', -1);
487 487
  488 +/**
  489 + * Course display settings
  490 + */
  491 +define('COURSE_DISPLAY_SINGLEPAGE', 0); // display all sections on one page
  492 +define('COURSE_DISPLAY_MULTIPAGE', 1); // split pages into a page per section
  493 +
488 494 /// PARAMETER HANDLING ////////////////////////////////////////////////////
489 495
490 496 /**

0 comments on commit 1f09018

Please sign in to comment.
Something went wrong with that request. Please try again.