MDL-68388 grade: Tidy comments and whitespace

This commit is contained in:
Andrew Nicols 2020-05-26 10:15:52 +08:00
parent a7aaf91855
commit 17238ab079
2 changed files with 3 additions and 7 deletions

View File

@ -229,11 +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);
}

View File

@ -250,8 +250,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();
// Setup some basics.
@ -275,7 +274,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();