Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Class: attempt_walkthrough_test  - X-Ref

Quiz attempt walk through.

test_quiz_attempt_walkthrough()   X-Ref
Create a quiz with questions and walk through a quiz attempt.


create_quiz_with_one_question()   X-Ref
Create a quiz containing one question and a close time.

The question is the standard shortanswer test question.
The quiz is set to close 1 hour from now.
The quiz is set to use a grade period of 1 hour once time expires.

return: \stdClass the quiz that was created.

test_quiz_attempt_walkthrough_submit_time_recorded_correctly_when_overdue()   X-Ref
No description

test_quiz_attempt_walkthrough_close_time_extended_at_last_minute()   X-Ref
No description

test_quiz_with_random_question_attempt_walkthrough()   X-Ref
Create a quiz with a random as well as other questions and walk through quiz attempts.


get_correct_response_for_variants()   X-Ref
No description

test_quiz_with_question_with_variants_attempt_walkthrough($variantno, $correctresponse, $done = false)   X-Ref
Create a quiz with a single question with variants and walk through quiz attempts.