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.

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(string $overduehandling = 'graceperiod')   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.

param: string $overduehandling value for the overduehandling quiz setting.
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.


test_quiz_attempt_walkthrough_abandoned_attempt_reopened_with_timelimit_override()   X-Ref
No description

test_quiz_attempt_walkthrough_abandoned_attempt_reopened_after_close_time()   X-Ref
No description