[drupal-devel] Request for input on Quiz module data structure [long]

Robert Douglass rob at robshouse.net
Thu Oct 13 06:22:31 UTC 2005


Now that I'm looking at the ER diagram of the SOLUTION, I think you're 
ok for the time being, as long as all of the logic for querying the 
quiz_question_answer and quiz_question_results tables are delegated to 
the question types.

The reason for this is; quiz_question_answer and quiz_question_results 
are really supposed to be handled polymorphically. Each question type is 
supposed to know how to ask the question, how to receive the answer, and 
how to calculate points based on it. If the question type were an 
accent_reduction type that played and audio clip of a native speaker 
saying a phrase, and the answer were the digital recording of the user 
repeating it back, and the points were awarded on how well certain 
accent indicators were matched, then these text fields are clearly 
inadequate.

So whether or not this db schema will serve as the starting point for a 
really robust, polymorphic quiz module depends on whether or not the 
polymorphism is enforced at the code level.

-Robert



More information about the drupal-devel mailing list