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 310 and 401] [Versions 39 and 401]

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