| Línea 1... | Línea 1... | 
          
            | 1 | <?php
 | 1 | <?php
 | 
          
            | Línea 2... | Línea 2... | 
          
            | 2 |  
 | 2 |  
 | 
          
            | Línea -... | Línea 3... | 
          
            | - |   | 3 | // This file defines settingpages and externalpages under the "appearance" category
 | 
          
            | - |   | 4 |  
 | 
          
            | 3 | // This file defines settingpages and externalpages under the "appearance" category
 | 5 | $ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
 | 
          
            | 4 |  
 | 6 |  
 | 
          
            | 5 | $capabilities = array(
 | 7 | $capabilities = array(
 | 
          
            | 6 |     'moodle/my:configsyspages',
 | 8 |     'moodle/my:configsyspages',
 | 
          
            | Línea 150... | Línea 152... | 
          
            | 150 |     if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
 | 152 |     if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
 | 
          
            | 151 |         $choices[HOMEPAGE_MY] = new lang_string('mymoodle', 'admin');
 | 153 |         $choices[HOMEPAGE_MY] = new lang_string('mymoodle', 'admin');
 | 
          
            | 152 |     }
 | 154 |     }
 | 
          
            | 153 |     $choices[HOMEPAGE_MYCOURSES] = new lang_string('mycourses', 'admin');
 | 155 |     $choices[HOMEPAGE_MYCOURSES] = new lang_string('mycourses', 'admin');
 | 
          
            | 154 |     $choices[HOMEPAGE_USER] = new lang_string('userpreference', 'admin');
 | 156 |     $choices[HOMEPAGE_USER] = new lang_string('userpreference', 'admin');
 | 
          
            | - |   | 157 |  
 | 
          
            | - |   | 158 |     // Allow hook callbacks to extend options.
 | 
          
            | - |   | 159 |     $hook = new \core_user\hook\extend_default_homepage();
 | 
          
            | - |   | 160 |     \core\di::get(\core\hook\manager::class)->dispatch($hook);
 | 
          
            | - |   | 161 |     $choices += $hook->get_options();
 | 
          
            | - |   | 162 |  
 | 
          
            | 155 |     $temp->add(new admin_setting_configselect('defaulthomepage', new lang_string('defaulthomepage', 'admin'),
 | 163 |     $temp->add(new admin_setting_configselect('defaulthomepage', new lang_string('defaulthomepage', 'admin'),
 | 
          
            | 156 |             new lang_string('configdefaulthomepage', 'admin'), get_default_home_page(), $choices));
 | 164 |             new lang_string('configdefaulthomepage', 'admin'), get_default_home_page(), $choices));
 | 
          
            | 157 |     if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
 | 165 |     if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
 | 
          
            | 158 |         $temp->add(new admin_setting_configcheckbox(
 | 166 |         $temp->add(new admin_setting_configcheckbox(
 | 
          
            | 159 |             'allowguestmymoodle',
 | 167 |             'allowguestmymoodle',
 | 
          
            | Línea 322... | Línea 330... | 
          
            | 322 |         new lang_string('langmenuinsecurelayout', 'admin'),
 | 330 |         new lang_string('langmenuinsecurelayout', 'admin'),
 | 
          
            | 323 |         new lang_string('langmenuinsecurelayout_desc', 'admin'), 0));
 | 331 |         new lang_string('langmenuinsecurelayout_desc', 'admin'), 0));
 | 
          
            | 324 |     $temp->add(new admin_setting_configcheckbox('logininfoinsecurelayout',
 | 332 |     $temp->add(new admin_setting_configcheckbox('logininfoinsecurelayout',
 | 
          
            | 325 |         new lang_string('logininfoinsecurelayout', 'admin'),
 | 333 |         new lang_string('logininfoinsecurelayout', 'admin'),
 | 
          
            | 326 |         new lang_string('logininfoinsecurelayout_desc', 'admin'), 0));
 | 334 |         new lang_string('logininfoinsecurelayout_desc', 'admin'), 0));
 | 
          
            | - |   | 335 |     // Process primary navigation (custom menu) through Moodle filters.
 | 
          
            | - |   | 336 |     $temp->add(new admin_setting_configcheckbox('navfilter',
 | 
          
            | - |   | 337 |         new lang_string('navfilter', 'admin'),
 | 
          
            | - |   | 338 |         new lang_string('navfilter_desc', 'admin'), 0));
 | 
          
            | 327 |     $temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
 | 339 |     $temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
 | 
          
            | 328 |         new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
 | 340 |         new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
 | 
          
            | 329 |     $defaultsettingcustomusermenuitems = [
 | 341 |     $defaultsettingcustomusermenuitems = [
 | 
          
            | 330 |         'profile,moodle|/user/profile.php',
 | 342 |         'profile,moodle|/user/profile.php',
 | 
          
            | 331 |         'grades,grades|/grade/report/mygrades.php',
 | 343 |         'grades,grades|/grade/report/mygrades.php',
 | 
          
            | Línea 347... | Línea 359... | 
          
            | 347 |     // Theme selector page.
 | 359 |     // Theme selector page.
 | 
          
            | 348 |     $ADMIN->add('appearance', new admin_externalpage('themeselector',
 | 360 |     $ADMIN->add('appearance', new admin_externalpage('themeselector',
 | 
          
            | 349 |         new lang_string('themeselector', 'admin'), $CFG->wwwroot . '/admin/themeselector.php'));
 | 361 |         new lang_string('themeselector', 'admin'), $CFG->wwwroot . '/admin/themeselector.php'));
 | 
          
            | Línea 350... | Línea 362... | 
          
            | 350 |  
 | 362 |  
 | 
          
            | 351 |     // Settings page for each theme.
 | - |   | 
          
            | 352 |     $ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
 | 363 |     // Settings page for each theme.
 | 
          
            | 353 |     foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
 | 364 |     foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
 | 
          
            | 354 |         $settingspath = "$themedir/settings.php";
 | 365 |         $settingspath = "$themedir/settings.php";
 | 
          
            | 355 |         if (file_exists($settingspath)) {
 | 366 |         if (file_exists($settingspath)) {
 | 
          
            | 356 |             $settings = new admin_settingpage("themesetting$theme", new lang_string('pluginname', "theme_$theme"),
 | 367 |             $settings = new admin_settingpage("themesetting$theme", new lang_string('pluginname', "theme_$theme"),
 |