Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'MDL-34866_23' of git://github.com/rlorenzo/moodle into …

…MOODLE_23_STABLE
  • Loading branch information...
commit 0547143fad270d28c983e0599046b310afcd812b 2 parents 864ca7d + 90c510c
Eloy Lafuente (stronk7) authored
5  admin/settings/courses.php
@@ -47,6 +47,11 @@
47 47
         $temp->add(new admin_setting_configselect('moodlecourse/legacyfiles', new lang_string('courselegacyfiles'), new lang_string('courselegacyfiles_help'), key($choices), $choices));
48 48
     }
49 49
 
  50
+    $choices = array();
  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
+    
50 55
     $temp->add(new admin_setting_heading('groups', new lang_string('groups', 'group'), ''));
51 56
     $choices = array();
52 57
     $choices[NOGROUPS] = new lang_string('groupsnone', 'group');
2  course/edit_form.php
@@ -124,7 +124,7 @@ function definition() {
124 124
             array(COURSE_DISPLAY_SINGLEPAGE => get_string('coursedisplay_single'),
125 125
                 COURSE_DISPLAY_MULTIPAGE => get_string('coursedisplay_multi')));
126 126
         $mform->addHelpButton('coursedisplay', 'coursedisplay');
127  
-        $mform->setDefault('coursedisplay', COURSE_DISPLAY_SINGLEPAGE);
  127
+        $mform->setDefault('coursedisplay', $courseconfig->coursedisplay);
128 128
 
129 129
         for ($i = 0; $i <= $courseconfig->maxsections; $i++) {
130 130
             $sectionmenu[$i] = "$i";
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
@@ -480,6 +480,12 @@
480 480
  */
481 481
 define('USER_CAN_IGNORE_FILE_SIZE_LIMITS', -1);
482 482
 
  483
+/**
  484
+ * Course display settings
  485
+ */
  486
+define('COURSE_DISPLAY_SINGLEPAGE', 0); // display all sections on one page
  487
+define('COURSE_DISPLAY_MULTIPAGE', 1); // split pages into a page per section
  488
+
483 489
 /// PARAMETER HANDLING ////////////////////////////////////////////////////
484 490
 
485 491
 /**

0 notes on commit 0547143

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