Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

(no description)

File Size: 349 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: gradelib_test  - X-Ref

Unit tests for /lib/gradelib.php.

test_grade_update_mod_grades()   X-Ref
No description

test_remove_grade_letters()   X-Ref
Tests the function remove_grade_letters().


test_grade_course_category_delete()   X-Ref
Tests the function grade_course_category_delete().


test_grade_regrade_final_grades()   X-Ref
Tests the function grade_regrade_final_grades().


test_grade_get_date_for_user_grade(\stdClass $grade, \stdClass $user, ?int $expected)   X-Ref
Tests for the grade_get_date_for_user_grade function.

param: \stdClass $grade
param: \stdClass $user
param: int $expected

grade_get_date_for_user_grade_provider()   X-Ref
Data provider for tests of the grade_get_date_for_user_grade function.

return: array

test_get_grade_letters()   X-Ref
Test the caching of grade letters.


test_get_grade_letters_custom()   X-Ref
Test custom letters.


test_grade_get_grades_errors()   X-Ref
When getting a calculated grade containing an error, we mark grading finished and don't keep trying to regrade.

return: void