Web Service

Web Service

by Nirav Vaghasia -
Number of replies: 1

I have created external web service in moodle 3.6.1 and added one function mod_quiz_start_attempt in external service.

But this service access by only admin when any other user try to access this service they got following error.

{

    "exception": "moodle_quiz_exception",

    "errorcode": "notyourattempt",

    "message": "This is not your attempt!"

}

As a admin if I want to allow other users to attempt the quiz using web service API then is there any possible ways to do this? 

Average of ratings: -
In reply to Nirav Vaghasia

Re: Web Service

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Nirav,
you need to authenticate the actual user willing to attend the attempt: you cannot start an attempt as an admin since it will be the attempt of that user.

HTH,
Matteo