Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 311 and 401]

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