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.

(no description)

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

Defines 1 class


Class: test_quiz_statistics_report  - X-Ref

Tests for statistics report

setUpBeforeClass()   X-Ref
Create a lock factory with a second database session.

This allows us to create a lock in our test code that will block a lock request
on the same key in code under test.

return: void

tearDownAfterClass()   X-Ref
Dispose of the extra DB connection and lock factory.

return: void

create_and_attempt_quiz()   X-Ref
Return a generated quiz

return: \stdClass

test_get_all_stats_and_analysis_locking()   X-Ref
Test locking the calculation process.

When there is a lock on the hash code, test_get_all_stats_and_analysis() should wait until the lock timeout, then throw an
exception.

When there is no lock (or the lock has been released), it should return a result.

return: void

test_get_all_stats_and_analysis_locking_no_calculation()   X-Ref
Test locking when the current page does not require calculations.

When there is a lock on the hash code, test_get_all_stats_and_analysis() should return a null result immediately,
with no exception thrown.

return: void