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.

(no description)

File Size: 125 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

lib_test:: (3 methods):
  setUp()
  true_or_false()
  test_regrade_all_courses_if_needed()


Class: lib_test  - X-Ref

Overview grade report lib functions unit tests

setUp()   X-Ref
Require the library file we're about to test, and other requirements.


true_or_false()   X-Ref
Data provider for true or false value.

return: array Two options, one with true and one with false

test_regrade_all_courses_if_needed(bool $frontend)   X-Ref
Tests the regrade_all_courses_if_needed function, which is supposed to regrade all the
courses that the current user is enrolled on (if they need update).

This is tested with both frontend and backend - the frontend option should not actually
do the progress bar/continue button (which can't be tested from here because it calls exit)
because these courses are small.

param: bool $frontend True to use the front-end parameter to the function under test