mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-34534 Backport activity chooser default setting to 2.3 stable
This commit is contained in:
parent
8d9dd85d97
commit
a11b507f50
4 changed files with 5 additions and 2 deletions
|
@ -185,6 +185,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||||
$setting = new admin_setting_configcheckbox('cachejs', new lang_string('cachejs', 'admin'), new lang_string('cachejs_help', 'admin'), 1);
|
$setting = new admin_setting_configcheckbox('cachejs', new lang_string('cachejs', 'admin'), new lang_string('cachejs_help', 'admin'), 1);
|
||||||
$setting->set_updatedcallback('js_reset_all_caches');
|
$setting->set_updatedcallback('js_reset_all_caches');
|
||||||
$temp->add($setting);
|
$temp->add($setting);
|
||||||
|
$temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1));
|
||||||
$ADMIN->add('appearance', $temp);
|
$ADMIN->add('appearance', $temp);
|
||||||
|
|
||||||
// link to tag management interface
|
// link to tag management interface
|
||||||
|
|
|
@ -1869,7 +1869,7 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,
|
||||||
$modchooser.= html_writer::end_tag('div');
|
$modchooser.= html_writer::end_tag('div');
|
||||||
|
|
||||||
// Wrap the normal output in a noscript div
|
// Wrap the normal output in a noscript div
|
||||||
$usemodchooser = get_user_preferences('usemodchooser', 1);
|
$usemodchooser = get_user_preferences('usemodchooser', $CFG->modchooserdefault);
|
||||||
if ($usemodchooser) {
|
if ($usemodchooser) {
|
||||||
$output = html_writer::tag('div', $output, array('class' => 'hiddenifjs addresourcedropdown'));
|
$output = html_writer::tag('div', $output, array('class' => 'hiddenifjs addresourcedropdown'));
|
||||||
$modchooser = html_writer::tag('div', $modchooser, array('class' => 'visibleifjs addresourcemodchooser'));
|
$modchooser = html_writer::tag('div', $modchooser, array('class' => 'visibleifjs addresourcemodchooser'));
|
||||||
|
|
|
@ -253,6 +253,7 @@ $string['configminpasswordlength'] = 'Passwords must be at least these many char
|
||||||
$string['configminpasswordlower'] = 'Passwords must have at least these many lower case letters.';
|
$string['configminpasswordlower'] = 'Passwords must have at least these many lower case letters.';
|
||||||
$string['configminpasswordnonalphanum'] = 'Passwords must have at least these many non-alphanumeric characters.';
|
$string['configminpasswordnonalphanum'] = 'Passwords must have at least these many non-alphanumeric characters.';
|
||||||
$string['configminpasswordupper'] = 'Passwords must have at least these many upper case letters.';
|
$string['configminpasswordupper'] = 'Passwords must have at least these many upper case letters.';
|
||||||
|
$string['configmodchooserdefault'] = 'Should the activity chooser be presented to users by default?';
|
||||||
$string['configmycoursesperpage'] = 'Maximum number of courses to display in any list of a user\'s own courses';
|
$string['configmycoursesperpage'] = 'Maximum number of courses to display in any list of a user\'s own courses';
|
||||||
$string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site navigation with /my';
|
$string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site navigation with /my';
|
||||||
$string['configmypagelocked'] = 'This setting prevents the default page from being edited by any non-admins';
|
$string['configmypagelocked'] = 'This setting prevents the default page from being edited by any non-admins';
|
||||||
|
@ -679,6 +680,7 @@ $string['mnetrestore_extusers_admin'] = '<strong>Note:</strong> This backup file
|
||||||
$string['mnetrestore_extusers_mismatch'] = '<strong>Note:</strong> This backup file apparently originates from a different Moodle installation and contains remote Moodle Network user accounts that may fail to restore. This operation is unsupported. If you are certain that it was created on this Moodle installation, or you can ensure that all the needed Moodle Network Hosts are configured, you may want to still try the restore.';
|
$string['mnetrestore_extusers_mismatch'] = '<strong>Note:</strong> This backup file apparently originates from a different Moodle installation and contains remote Moodle Network user accounts that may fail to restore. This operation is unsupported. If you are certain that it was created on this Moodle installation, or you can ensure that all the needed Moodle Network Hosts are configured, you may want to still try the restore.';
|
||||||
$string['mnetrestore_extusers_noadmin'] = '<strong>Note:</strong> This backup file seems to come from a different Moodle installation and contains remote Moodle Network user accounts. You are not allowed to execute this type of restore. Contact the administrator of the site or, alternatively, restore this course without any user information (modules, files...)';
|
$string['mnetrestore_extusers_noadmin'] = '<strong>Note:</strong> This backup file seems to come from a different Moodle installation and contains remote Moodle Network user accounts. You are not allowed to execute this type of restore. Contact the administrator of the site or, alternatively, restore this course without any user information (modules, files...)';
|
||||||
$string['mnetrestore_extusers_switchuserauth'] = 'Remote Moodle Network user {$a->username} (coming from {$a->mnethosturl}) switched to local {$a->auth} authenticated user.';
|
$string['mnetrestore_extusers_switchuserauth'] = 'Remote Moodle Network user {$a->username} (coming from {$a->mnethosturl}) switched to local {$a->auth} authenticated user.';
|
||||||
|
$string['modchooserdefault'] = 'Activity chooser default';
|
||||||
$string['modeditdefaults'] = 'Default values for activity settings';
|
$string['modeditdefaults'] = 'Default values for activity settings';
|
||||||
$string['modsettings'] = 'Manage activities';
|
$string['modsettings'] = 'Manage activities';
|
||||||
$string['modulesecurity'] = 'Module security';
|
$string['modulesecurity'] = 'Module security';
|
||||||
|
|
|
@ -3573,7 +3573,7 @@ class settings_navigation extends navigation_node {
|
||||||
// Add the module chooser toggle
|
// Add the module chooser toggle
|
||||||
$modchoosertoggleurl = clone($baseurl);
|
$modchoosertoggleurl = clone($baseurl);
|
||||||
if ($this->page->user_is_editing() && course_ajax_enabled($course)) {
|
if ($this->page->user_is_editing() && course_ajax_enabled($course)) {
|
||||||
if ($usemodchooser = get_user_preferences('usemodchooser', 1)) {
|
if ($usemodchooser = get_user_preferences('usemodchooser', $CFG->modchooserdefault)) {
|
||||||
$modchoosertogglestring = get_string('modchooserdisable', 'moodle');
|
$modchoosertogglestring = get_string('modchooserdisable', 'moodle');
|
||||||
$modchoosertoggleurl->param('modchooser', 'off');
|
$modchoosertoggleurl->param('modchooser', 'off');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue