How to query for unaswered questions in a quiz??

How to query for unaswered questions in a quiz??

by Gary Flauder -
Number of replies: 2

Hi all,

I've been trying to figure out some logic to the database tables to write a view, but I'm going in circles with this one.

My thought is simply an outer join looking for questions in a quiz that don't have any answers recorded. Trying to figure out the relationships and what tables is proving challenging. I can't find documentation on the database anywhere (am I missing something) and I can easily decipher field names between tables..  quizid is fine, but contextid, questionusageid ?? No clue... 


So far i think  :

mdl_quiz
mdl_quiz_slots
mdl_question_attempts
mdl_quiz_attempts


The goal is to produce a a view that basically has the Quizid , count(Quesitons Answered), count(Quesitons UnAnswered) that I can tap into for building some custom grading on.

Many thanks for any assistance or guidance!

Garf

Average of ratings: -
In reply to Gary Flauder

Re: How to query for unaswered questions in a quiz??

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

Re: How to query for unaswered questions in a quiz??

by Gary Flauder -

Thanks Tim,

Sorry for the long delay, I didn't realize you had replied. I think this answers my question. I can certainly build from this.

Thanks again!

Gary