MDL-75210 mod_quiz: fix sequential quiz access
commit4cb39164fa3b28e64422464ba86fda001444c5e3
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:50 +0000 (18 08:08 +0400)
tree347839f7e86d60d51726d5538a9e537301d97610
parentd5e85610118084bc9367f2e9916678514bb2b24d
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 [new file with mode: 0644]
mod/quiz/upgrade.txt