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 311 and 402]

Unit tests for the class component_gradeitem.

Copyright: 2021 Mark Nelson <marknelson@catalyst-au.net>
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 267 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


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