Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 39 and 400]

Unit tests for grading evaluation method "best"

Copyright: 2009 David Mudrak <david.mudrak@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 344 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes


Class: lib_test  - X-Ref

Unit tests for grading evaluation lib.php

setUp()   X-Ref
Setup testing environment


tearDown()   X-Ref
No description

test_normalize_grades()   X-Ref
No description

test_normalize_grades_max_equals_min()   X-Ref
No description

test_average_assessment_same_weights()   X-Ref
No description

test_average_assessment_different_weights()   X-Ref
No description

test_average_assessment_noweight()   X-Ref
No description

test_weighted_variance()   X-Ref
No description

test_assessments_distance_zero()   X-Ref
No description

test_assessments_distance_equals()   X-Ref
No description

test_assessments_distance_zero_variance()   X-Ref
No description

Class: testable_workshop_best_evaluation  - X-Ref

Test subclass that makes all the protected methods we want to test public.

normalize_grades(array $assessments, array $diminfo)   X-Ref
No description

average_assessment(array $assessments)   X-Ref
No description

weighted_variance(array $assessments)   X-Ref
No description

assessments_distance(\stdClass $assessment, \stdClass $referential, array $diminfo, \stdClass $settings)   X-Ref
No description