Merge branch 'MDL-87761-501' of https://github.com/sarjona/moodle into MOODLE_501_STABLE

This commit is contained in:
cescobedo
2026-02-02 11:16:10 +01:00
3 changed files with 18 additions and 1 deletions
+12 -1
View File
@@ -39,7 +39,18 @@ class editsection_form extends moodleform {
$mform->setDefault('name', $sectioninfo->name);
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
/// Prepare course and the editor
// Prepare course and the editor.
if ($sectioninfo->is_delegated()) {
// Show a warning that subsection descriptions will be discontinued.
$warning = $OUTPUT->notification(
message: get_string('subsectiondescriptionwarning', 'course'),
type: \core\output\notification::NOTIFY_WARNING,
closebutton: false,
titleicon: 'i/circleinfo',
);
$mform->addElement('static', 'subsectionwarning', '', $warning);
}
$mform->addElement('editor', 'summary_editor', get_string('description'), null, $this->_customdata['editoroptions']);
$mform->setType('summary_editor', PARAM_RAW);
+1
View File
@@ -153,6 +153,7 @@ $string['searchresults'] = 'Search results: {$a}';
$string['sectionlink'] = 'Permalink';
$string['showstartedcoursestask'] = 'Show courses on start date';
$string['submitsearch'] = 'Submit search';
$string['subsectiondescriptionwarning'] = '<strong>Subsection descriptions will be discontinued in Moodle 5.2</strong>. To add a description, use a <strong>Text and media area</strong> instead.';
$string['supports'] = 'This activity supports';
$string['studentsatriskincourse'] = 'Students at risk in {$a} course';
$string['studentsatriskinfomessage'] = 'Hi {$a->userfirstname},
@@ -103,12 +103,17 @@ Feature: The module menu replaces the delegated section menu
And I click on "Edit" "button" in the "[data-region='header-actions-container']" "css_element"
And I choose "Edit settings" in the open action menu
And the field "Section name" matches value "Subsection1"
And I should see "Subsection descriptions will be discontinued in Moodle 5.2"
And I click on "Cancel" "button"
And I am on the "C1 > Section 1" "course > section" page
# Section page. Open Subsection1 module action menu.
And I open "Subsection1" actions menu
And I choose "Edit settings" in the open action menu
And the field "Section name" matches value "Subsection1"
# But subsection description warning is not shown in section edit form.
And I am on "Course 1" course homepage
And I edit the section "0"
And I should not see "Subsection descriptions will be discontinued in Moodle 5.2"
@javascript
Scenario: Permalink option in subsection action menu