Qtype Multichoice Options Table Schema (qtype_multichoice_options)


Options for multiple choice questions

qtype_multichoice_options table columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
questionid BIGINT 19 0
question.id Implied Constraint R

Foreign key references question.id

layout SMALLINT 5 0

Not used. Was intended for a vertical/horizontal layout option. See MDL-18445.

single SMALLINT 5 0

If 0 it multiple response (checkboxes). Otherwise it is radio buttons.

shuffleanswers SMALLINT 5 1

Whether the choices can be randomly shuffled.

correctfeedback LONGTEXT 2147483647 null

Feedback shown for any correct response.

correctfeedbackformat TINYINT 3 0
partiallycorrectfeedback LONGTEXT 2147483647 null

Feedback shown for any partially correct response.

partiallycorrectfeedbackformat TINYINT 3 0
incorrectfeedback LONGTEXT 2147483647 null

Feedback shown for any incorrect response.

incorrectfeedbackformat TINYINT 3 0
answernumbering VARCHAR 10 abc

Indicates how and whether the choices should be numbered.

shownumcorrect TINYINT 3 0

If true, then when the user gets a multiple-response question partially correct, tell them how many choices they got correct alongside the feedback.

Table contained -1 rows

qtype_multichoice_options table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
qtypmultopti_que_uix Must be unique Asc questionid

qtype_multichoice_options table relationships