← All tables
mdl_question_attempts
MIGRATEAssessment attempt state · 14 columnsProposed target
assessment_attempts
Migration rule
Preserve usage/slot/question links, attempt number, state and marks
Verification required
Must include question_usages, question_attempt_steps and step_data; validate resumability vs historical read-only needs.
Tracking
Sign in to update status, owner and notes.
| Column | Type | Null | Default | Target mapping | Risk |
|---|---|---|---|---|---|
| id | bigint | Not null | Preserve as legacy source ID; generate target PK unless target accepts stable legacy key. | High: verify semantics/relationship/security | |
| questionusageid | bigint | Not null | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| slot | bigint | Not null | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| behaviour | varchar(32) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| questionid | bigint | Not null | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| variant | bigint | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| maxmark | decimal(12,7) | Not null | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| minfraction | decimal(12,7) | Not null | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| maxfraction | decimal(12,7) | Not null | '1.0000000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| flagged | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| questionsummary | longtext | Nullable | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference | |
| rightanswer | longtext | Nullable | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference | |
| responsesummary | longtext | Nullable | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference | |
| timemodified | bigint | Not null | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference |