Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 400 and 403] [Versions 401 and 403] [Versions 402 and 403]

(no description)

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

Defines 1 class


Class: helper_test  - X-Ref

Helper test.

setup()   X-Ref
Test setup.


attempt_quiz()   X-Ref
Record a quiz attempt.

return: void

test_get_question_attempts_count_in_quiz()   X-Ref
Test question attempt count.


test_get_question_entry_usage_count()   X-Ref
Test test usage data.


test_get_random_question_attempts_usage_count()   X-Ref
If a question has been included via a random question attempt, this should be counted as a usage.

return: void

test_edited_question_usage_counts()   X-Ref
When a question referenced directly is edited, the usage count of all versions remains the same.

When checking usage of separate versions, the new version should show usages but the original version should not.

return: void

test_edited_attempted_question_usage_counts()   X-Ref
When a question referenced directly with attempts is edited, the usage count of all versions remains the same.

When checking usage of separate versions, both versions should show usage.

return: void

test_edited_attempted_random_question_usage_count()   X-Ref
When a random question with attempts is edited, it should still have the same usage count.

When checking usage of separate versions, the original version should still show usage but the new version should not.

return: void