Mobile API to get quiz data ?

Mobile API to get quiz data ?

од Ravi Kant -
Број на одговори: 5

Is there any moodle api to get all the questions data for a given quiz

Просек на рејтинзи: -
Во одговорот до Ravi Kant

Re: Mobile API to get quiz data ?

од Tim Hunt -
Слика од Core developers Слика од Documentation writers Слика од Particularly helpful Moodlers Слика од Peer reviewers Слика од Plugin developers
Во одговорот до Tim Hunt

Re: Mobile API to get quiz data ?

од Ravi Kant -
Thanks, can you please suggest me the API name.
Во одговорот до Ravi Kant

Re: Mobile API to get quiz data ?

од Tim Hunt -
Слика од Core developers Слика од Documentation writers Слика од Particularly helpful Moodlers Слика од Peer reviewers Слика од Plugin developers

If you have to ask us every time you need to know the name of a function in an API, your development will go very slowly. You need to be able to find this out yourself. There are at least to places you can look:

In the Moodle UI, in the admin menu, is the place where you can configure web services. That has a list of all the functions.

Or, you can look in the code, in mod/quiz/db/services.php.

Во одговорот до Tim Hunt

Re: Mobile API to get quiz data ?

од Ravi Kant -

Thanks a lot, is there any API to fetch Question data for a Quiz?

Во одговорот до Ravi Kant

Re: Mobile API to get quiz data ?

од Tim Hunt -
Слика од Core developers Слика од Documentation writers Слика од Particularly helpful Moodlers Слика од Peer reviewers Слика од Plugin developers
'mod_quiz_get_attempt_review' => array(
'classname' => 'mod_quiz_external',
'methodname' => 'get_attempt_review',
'description' => 'Returns review information for the given finished attempt, can be used by users or teachers.',
'type' => 'read',
'capabilities' => 'mod/quiz:reviewmyattempts',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

https://github.com/moodle/moodle/blob/master/mod/quiz/classes/external.php#L1384

https://github.com/moodle/moodle/blob/master/mod/quiz/classes/external.php#L865 shows that the return value includes question data.