Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311]

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