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.

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.