MDL-75210 mod_quiz: fix sequential quiz access
commit00e3145a6129737b0de2fd8e1a80a634156a6fad
authorLaurent David <laurent.david@moodle.com>
Wed, 20 Jul 2022 17:00:18 +0000 (20 13:00 -0400)
committerIlya Tregubov <ilya@moodle.com>
Thu, 18 Aug 2022 04:08:00 +0000 (18 08:08 +0400)
treeb0d0445d9705510fd37eccf737ac4c6194e77019
parentdfb88179989ef3dacd1ab59450f66b98e7c567b0
MDL-75210 mod_quiz: fix sequential quiz access

* As a student I should only be able to access the next question or the current question
* The API should not show more than the current question
* Once the quiz is previewed we can see the question in any order (existing behaviour)
* Related to ticket MDL-71728

Co-authored-by: Rajneel Totaram <rjnlfj@yahoo.com>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
mod/quiz/attemptlib.php
mod/quiz/classes/external.php
mod/quiz/tests/attempt_test.php
mod/quiz/tests/behat/attempt_sequential.feature [new file with mode: 0644]
mod/quiz/tests/behat/behat_mod_quiz.php
mod/quiz/tests/external/external_test.php
mod/quiz/upgrade.txt