Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

Question database structure

De MoodleDocs
La revisió el 12:11, 5 març 2009 per Tim Hunt (discussió | contribucions) (New page: This page documents the database tables use by the question bank and question engine. The distinction between the question bank and the question engine is that the question bank stores th...)
(dif.) ← Versió més antiga | Versió actual (dif.) | Versió més nova → (dif.)
Salta a:navegació, cerca

This page documents the database tables use by the question bank and question engine.

The distinction between the question bank and the question engine is that the question bank stores the question definitions, organised into categories, while the question engine stores the information a user's attempts at a question or questions.

Overview

Fitxer:Question database.dia Dia file, should you wish to have a copy of this diagram in an editable format.

Common field types

  • Fields that hold a question score, like question.defaultgrade or question_answers.fraction, should be NUMBER(12,7).
  • Question text, feedback, etc. should be TEXT(short).

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.)

Individual question types

The following core question types have their own database tables:

Rough change-log

Moodle 2.0

  • New field question_sessions.flagged.
  • All fields that store grades were reviewed and set to the recommended types mentioned above.

Moodle 1.9

  • New question bank:
    • New fields question.timecreated, timemodified, createdby and modifiedby.
    • question_category.course changed to question_category.contextid.
    • Removed field question_category.published.

Moodle 1.7

  • question_sessions.comment renamed to manualcomment (reserved word).
  • new column question.generalfeedback.

TODO, check CVS history for more.

See also