Finding which quizzes a question is in?

Finding which quizzes a question is in?

by Kieran Briggs -
Number of replies: 2

So we use the site-wide question bank quite a bit.  Is there a report or a way to find out which questions are in which quiz.  For example, I would like to be able to look at Question x23 and to see a list of which quizzes contain that question.

Is this possible?

 

Thanks

Kieran

Average of ratings: -
In reply to Kieran Briggs

Re: Finding which quizzes a question is in?

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

There is not currently a way to do this in the Moodle UI.

It is not too hard to get this information from the database:

SELECT DISTINCT quiz
FROM mdl_quiz_question_instances
WHERE question = 19

UNION

SELECT DISTINCT quiza.quiz
FROM mdl_quiz_attempts quiza
JOIN mdl_question_attempts qa ON qa.questionusageid = quiza.uniqueid
WHERE qa.questionid = 19

Replace 19 with the id of the question you are interested in (in two places).

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

Re: Finding which quizzes a question is in?

by Kieran Briggs -

Cheers Tim,

Yeah I've been using sql queries to do this but was hoping that there was an easier way.

Thanks

 

Kieran