Development:Quiz database structure: Difference between revisions
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
Note that information about the attempter's interaction with each question is stored by the question engine. See [[Development:Question_database_structure]] for details. | Note that information about the attempter's interaction with each question is stored by the question engine. See [[Development:Question_database_structure]] for details. | ||
[[Image:Quiz_database.png]] | [[Image:Quiz_database.png|560px]] | ||
==Quiz report tables overview== | ==Quiz report tables overview== | ||
[[Image:Quiz_reports_database.png]] | [[Image:Quiz_reports_database.png|740px]] | ||
==Common field types== | ==Common field types== |
Revision as of 11:11, 5 March 2009
This page documents the database tables use by the quiz module.
Quiz settings and runtime overview
It is helpful to distinguish between quiz settings, which is where we store information about how the teacher has set up the quiz, and 'runtime' (not a great name) where we store information about people's attempts at the quiz.
Note that information about the attempter's interaction with each question is stored by the question engine. See Development:Question_database_structure for details.
Quiz report tables overview
Common field types
- Fields that hold an overall score, like quiz.grade, should be NUMBER(10,5).
- Fields that hold an individual question score, like quiz_question_instances.grade, should be NUMBER(12,7).
Rough change-log
Moodle 2.0
- New field quiz.showuserpicture. See MDL-3156.
- All the quiz report tables are new. See Development:Quiz_report_enhancements
- All fields that store grades were reviewed and set to the recommended types mentioned above.
- Never used quiz_question_versions table was removed.
Moodle 1.9
- Time limit field changed to int(10).
Moodle 1.7
- New table quiz_feedback.
Detailed table descriptions
In Moodle 2.0 dev, you can get these by going to Administration -> Development -> XMLDB and clicking on the [Doc] link next in any of the relevant rows (mod/quiz/db, mod/quiz/report/xxx/db). Looking directly there is much more likely to be up-to-date than relying on information that has been copied here.
(Wouldn't it be nice if that documentation was automatically build and available online.)