MDL-79986 course: Remove $CFG->linkcoursesections setting

Currently, the $CFG->linkcoursesections setting was only used
for the Classic theme, to let admins decide whether the section
names in the Navigation block would be linked or not.

Now that the course/section.php page has been created to display
the content of any single section, and a link to this section page
has been added from the main course page to help users to focus
on the section content, it has been decided to remove the setting
$CFG->linkcoursesections because it's not required anymore.
This commit is contained in:
Sara Arjona 2023-11-10 15:54:47 +01:00
parent 6792a40924
commit dd723bae71
No known key found for this signature in database
6 changed files with 15 additions and 4 deletions

View File

@ -181,7 +181,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
new lang_string('confignavcourselimit', 'admin'), 10, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('usesitenameforsitepages', new lang_string('usesitenameforsitepages', 'admin'), new lang_string('configusesitenameforsitepages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('linkadmincategories', new lang_string('linkadmincategories', 'admin'), new lang_string('linkadmincategories_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('linkcoursesections', new lang_string('linkcoursesections', 'admin'), new lang_string('linkcoursesections_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navshowfrontpagemods', new lang_string('navshowfrontpagemods', 'admin'), new lang_string('navshowfrontpagemods_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navadduserpostslinks', new lang_string('navadduserpostslinks', 'admin'), new lang_string('navadduserpostslinks_help', 'admin'), 1));

View File

@ -7,6 +7,8 @@ Overview of this plugin type at https://moodledev.io/docs/apis/plugintypes/forma
valid section move mutation.
* The state action core_courseformat\stateactions::section_move is deprecated and
replaced by core_courseformat\stateactions::section_move_after.
* $CFG->linkcoursesections setting has been completely removed because it's not required anymore. From now on, sections will be
always linked because a new page, section.php, has been created to display any single section.
=== 4.3 ===
* New core_courseformat\output\activitybadge class that can be extended by any module to display content near the activity name.

View File

@ -793,8 +793,6 @@ $string['libcurlwarning'] = 'It has been detected that libcurl doesn\'t have CUR
$string['licensesettings'] = 'Licence settings';
$string['linkadmincategories'] = 'Link admin categories';
$string['linkadmincategories_help'] = 'If enabled admin setting categories will be displayed as links in the navigation and will lead to the admin category pages.';
$string['linkcoursesections'] = 'Always link course sections';
$string['linkcoursesections_help'] = 'Always try to provide a link for course sections. Course sections are usually only shown as links if the course format displays a single section per page. If this setting is enabled a link will always be provided.';
$string['loading'] = 'Loading';
$string['localetext'] = 'Sitewide locale';
$string['localstringcustomization'] = 'Local string customization';
@ -1638,3 +1636,5 @@ $string['unsettheme'] = 'Unset theme';
// Deprecated since Moodle 4.4.
$string['taskdeletecachetext'] = 'Delete old text cache records';
$string['themesettings'] = 'Theme settings';
$string['linkcoursesections'] = 'Always link course sections';
$string['linkcoursesections_help'] = 'Always try to provide a link for course sections. Course sections are usually only shown as links if the course format displays a single section per page. If this setting is enabled a link will always be provided.';

View File

@ -115,3 +115,5 @@ taskdeletecachetext,core_admin
themesettings,core_admin
copycourseheading,core_backup
backupcourse,core_backup
linkcoursesections,core_admin
linkcoursesections_help,core_admin

View File

@ -856,5 +856,13 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2023110900.00);
}
if ($oldversion < 2023120100.01) {
// The $CFG->linkcoursesections setting has been removed because it's not required anymore.
// From now, sections will be always linked because a new page, section.php, has been created to display a single section.
unset_config('linkcoursesections');
upgrade_main_savepoint(true, 2023120100.01);
}
return true;
}

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2023120100.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2023120100.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.4dev (Build: 20231201)'; // Human-friendly version name