Skip to content

Commit

Permalink
Merge branch 'MDL-34866' of git://github.com/rlorenzo/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Aug 21, 2012
2 parents dd12051 + 1f09018 commit 1f0f592
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions admin/settings/courses.php
Expand Up @@ -47,6 +47,11 @@
$temp->add(new admin_setting_configselect('moodlecourse/legacyfiles', new lang_string('courselegacyfiles'), new lang_string('courselegacyfiles_help'), key($choices), $choices));
}

$choices = array();
$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();
$choices[NOGROUPS] = new lang_string('groupsnone', 'group');
Expand Down
2 changes: 1 addition & 1 deletion course/edit_form.php
Expand Up @@ -124,7 +124,7 @@ function definition() {
array(COURSE_DISPLAY_SINGLEPAGE => get_string('coursedisplay_single'),
COURSE_DISPLAY_MULTIPAGE => get_string('coursedisplay_multi')));
$mform->addHelpButton('coursedisplay', 'coursedisplay');
$mform->setDefault('coursedisplay', COURSE_DISPLAY_SINGLEPAGE);
$mform->setDefault('coursedisplay', $courseconfig->coursedisplay);

for ($i = 0; $i <= $courseconfig->maxsections; $i++) {
$sectionmenu[$i] = "$i";
Expand Down
3 changes: 0 additions & 3 deletions course/lib.php
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
Expand Up @@ -487,6 +487,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 1f0f592

Please sign in to comment.