Programmatically querying the question bank and its tags...

Programmatically querying the question bank and its tags...

by Ben Girard -
Number of replies: 2

Hello all,

We're really new to Moodle, so my apologies if those questions appear stupid.

We must automatically provision 300 Moodle instances with quizzes and questions from the question bank.  The bank has thousands of questions sitting in the bank all tagged with specific tags to keep them organized.

Questions

  1. I don't see any APIs in the documentation to list the question bank.  
  • If true, is Moodle flexible enough where we could create our own APIs to do list the questions stored in the bank?
  • if false, are the question tags exposed in the API so we can filter the query accordingly?
I don't see any APIs in the documentation to add questions programmatically to a Quiz?
  • Could we build our own API to do so?

Average of ratings: -
In reply to Ben Girard

Re: Programmatically querying the question bank and its tags...

by Darko Miletić -
Here is the available documentation https://docs.moodle.org/dev/Question_API
Especially https://docs.moodle.org/dev/Using_the_question_engine_from_module
For anything else the only source of truth is the source code.

An example of use of question engine is the mod_quiz so again observe it's source code and ask Tim Hunt who is the author of most of that code anyways.
Average of ratings: Useful (2)