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: diferència entre les revisions

De MoodleDocs
Salta a:navegació, cerca
Cap resum de modificació
Cap resum de modificació
Línia 1: Línia 1:
{{Template:Question development}}
{{Question development}}


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

Revisió del 12:33, 5 març 2009

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