MDL-68388 grade: Tidy comments and whitespace

This commit is contained in:
Andrew Nicols
2020-05-26 10:19:09 +08:00
parent 074bdceb1f
commit 14cfb3dcbf
2 changed files with 3 additions and 6 deletions
+1 -3
View File
@@ -229,10 +229,8 @@ if (!$edit) {
}
}
// Cache the changed letters.
if (!empty($letters)) {
// For some reason, the cache saves it in the order in which they were entered
// but we really want to order them in descending order so we sort it here.
// Ensure that the letters are correctly sorted.
krsort($letters);
$cache->set($context->id, $letters);
}
+2 -3
View File
@@ -249,8 +249,7 @@ class core_gradelib_testcase extends advanced_testcase {
/**
* Test the caching of grade letters.
*/
public function test_get_grade_letters() {
public function test_get_grade_letters(): void {
$this->resetAfterTest();
$course = $this->getDataGenerator()->create_course();
@@ -273,7 +272,7 @@ class core_gradelib_testcase extends advanced_testcase {
/**
* Test custom letters.
*/
public function test_get_grade_letters_custom() {
public function test_get_grade_letters_custom(): void {
global $DB;
$this->resetAfterTest();