Question Usages Table Schema (question_usages)


Description

This table's main purpose it to assign a unique id to each attempt at a set of questions by some part of Moodle. A question usage is made up of a number of question_attempts.

question_usages table columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
question_attempts.questionusageid quesatte_que4_fk R
contextid BIGINT 19 null
context.id quesusag_con2_fk R

Every question usage must be associated with some context.

component VARCHAR 255

The plugin this attempt belongs to, e.g. 'mod_quiz', 'block_questionoftheday', 'filter_embedquestion'.

preferredbehaviour VARCHAR 32

The archetypal behaviour that should be used for question attempts in this usage.

Table contained -1 rows

question_usages table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
quesusag_con_ix Performance Asc contextid

question_usages table relationships