REST API for Quiz-Password

REST API for Quiz-Password

by Ananth Tipparaju -
Number of replies: 5

Hi,

 

Is there any way we can get the Quiz Password through the REST API call. We are trying to integrate our system with Moodle and found that we are not getting the Password (access_code) from Moodle. Is it expected or do we have to use any other methods/functions to get this data?

 

Thank you.

Ananth

Average of ratings: -
In reply to Ananth Tipparaju

Re: REST API for Quiz-Password

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't think there are any quiz web services yet. You would need a file like mod/forum/externallib.php, only for quiz.Specifically, it is a method like get_forums_by_courses that is needed.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: REST API for Quiz-Password

by Ananth Tipparaju -

Hi Tim,

Thank you for the response. We need to get the quiz/assignment password as part of our integration. Is there any way we can get it or at least a workaround. I am particularly looking to get Start Date, End Date, acces_code/password of the quiz/assignment.

Any help would be highly appreciated.

Thank you.

Ananth

In reply to Ananth Tipparaju

Re: REST API for Quiz-Password

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well, the data is in the database in the mdl_quiz and mdl_assign tables. Getting data out of a database is not a hard problem.

(Choosing the best way might be.)

Coding a basic get quiz and get assign web service, following teh forum example, and contributing it to Moodle core would probably be a good way.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: REST API for Quiz-Password

by Ananth Tipparaju -

Thank you Tim. I will try that and let you know.

Thanks

Ananth

In reply to Ananth Tipparaju

Re: REST API for Quiz-Password

by Abbis Cse -
I am also having the same problem.

But I am not getting, how to change the code..

Could you please give me step by step instructions, if possible code also!!!

Thanking