MDL-66633 quiz: allow to create attempts for different users
commit8dc015050e638887bce8d7e6827dcfe8c0ef1fd2
authorHuong Nguyen <huongnv13@gmail.com>
Mon, 9 Sep 2019 07:55:39 +0000 (9 14:55 +0700)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 18 Sep 2019 17:52:09 +0000 (18 19:52 +0200)
treedeef8ec6edb5c8739f0064953292e57804b522a6
parent74241346c06f4de29694cda14f8b66af0e33ba91
MDL-66633 quiz: allow to create attempts for different users

By adding a new optional param to quiz_prepare_and_start_new_attempt()
it can be used by the surrounding code to create an attempt for anybody
else (different from current $USER)

quiz attempt API should let you create an attempt for a different user
mod/quiz/locallib.php
mod/quiz/tests/attempt_test.php