SQL query, which questions are used

SQL query, which questions are used

by Ivan Antonov -
Number of replies: 1

I am trying to found out which questions are used (in some Moodle courses).

Could someone help me pls?

Average of ratings: -
In reply to Ivan Antonov

Re: SQL query, which questions are used

by Nitin Jain -
Picture of Plugin developers

Hi,

You may create a join query using below table:

mdl_question - Gives you question ID

mdl_quiz - Give you Quiz ID and the course it is associated to

mdl_quiz_question_instances - Gives you quiz ID and Question ID association

So here you go:

first find out questions from "mdl_question"

then find out that this question is associated with which quiz from "mdl_quiz_question_instances"

and then find out that quiz is associated with which Course from "mdl_quiz"

Done..

Hope this helps.

thanks

Nitin

Average of ratings: Useful (1)