Merge branch 'MDL-79093-master' of https://github.com/sarjona/moodle

This commit is contained in:
Jun Pataleta 2023-08-28 10:17:35 +08:00
commit 08fd13f79f
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7
2 changed files with 12 additions and 0 deletions

View File

@ -234,6 +234,12 @@ class manager {
$module->completionstatus = $this->get_completion_detail($defaults);
}
}
// Order modules by displayed name.
$modules = (array) $data->modules;
usort($modules, function($a, $b) {
return strcmp($a->formattedname, $b->formattedname);
});
$data->modules = $modules;
return $data;
}

View File

@ -207,3 +207,9 @@ Feature: Allow teachers to edit the default activity completion rules in a cours
And I click on "Save changes" "button" in the "[data-region='activitycompletion-assign']" "css_element"
Then I should see "When you select automatic completion, you must also enable at least one requirement (below)."
And I should not see "Changes saved"
Scenario: Activities in Default activity completion are ordered alphabetically
Given I am on the "Course 1" course page logged in as teacher1
When I navigate to "Course completion" in current page administration
And I set the field "Course completion tertiary navigation" to "Default activity completion"
Then "Survey" "text" should appear before "Text and media area" "text"