Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Class: component_gradeitem_test  - X-Ref

Unit tests for the class component_gradeitem.

test_get_formatted_grade_for_user_with_points()   X-Ref
Test get_formatted_grade_for_user with points.


test_get_formatted_grade_for_user_with_letters()   X-Ref
Test get_formatted_grade_for_user with letters.


test_get_formatted_grade_for_user_with_percentage()   X-Ref
Test get_formatted_grade_for_user with percentage.


test_get_formatted_grade_for_user_with_points_letter()   X-Ref
Test get_formatted_grade_for_user with points and letter.


test_get_formatted_grade_for_user_with_scales()   X-Ref
Test get_formatted_grade_for_user with scales.


test_get_formatted_grade_for_user_with_rubric()   X-Ref
Test get_formatted_grade_for_user with rubric.


test_get_formatted_grade_for_user_with_marking_guide()   X-Ref
Test get_formatted_grade_for_user with a marking guide.


initialise_test_and_get_grade_item(int $gradeforum, int $gradegiven, int $displaytype = null)   X-Ref
Initialise test and returns the grade item.

param: int $gradeforum The grade_forum value for the forum.
param: int $gradegiven The grade given by the teacher.
param: int|null $displaytype The display type of the grade.
return: \stdClass|null

get_forum_instance(array $config = [])   X-Ref
Get a forum instance.

param: array $config
return: forum_entity