← All tables
mdl_lesson
MIGRATECore learning content / activity / progress / assessment · 42 columnsProposed target
Transform into target course, module, attempt, grade, completion, credential and content models
Migration rule
Preserve history and relationships; retain original IDs in legacy_id fields
Verification required
Plugin behavior, attempt state, grading rules, file references and completion logic require application-level verification
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 | |
| course | bigint | Not null | '0' | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security |
| name | varchar(255) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| intro | longtext | Nullable | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference | |
| introformat | smallint | Not null | '0' | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference |
| practice | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| modattempts | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| usepassword | smallint | Not null | '0' | EXCLUDE from app migration; credential/secret handling requires security review. | High: verify semantics/relationship/security |
| password | varchar(32) | Not null | '' | EXCLUDE from app migration; credential/secret handling requires security review. | High: verify semantics/relationship/security |
| dependency | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| conditions | longtext | Not null | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| grade | bigint | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | High: verify semantics/relationship/security |
| custom | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| ongoing | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| usemaxgrade | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| maxanswers | smallint | Not null | '4' | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference |
| maxattempts | smallint | Not null | '5' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| review | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| nextpagedefault | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| feedback | smallint | Not null | '1' | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference |
| minquestions | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| maxpages | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| timelimit | bigint | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference |
| retake | smallint | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| activitylink | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| mediafile | varchar(255) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| mediaheight | bigint | Not null | '100' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| mediawidth | bigint | Not null | '650' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| mediaclose | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| slideshow | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| width | bigint | Not null | '640' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| height | bigint | Not null | '480' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| bgcolor | varchar(7) | Not null | '#FFFFFF' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| displayleft | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| displayleftif | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| progressbar | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| available | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| deadline | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| timemodified | bigint | Not null | '0' | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference |
| completionendreached | tinyint(1) | Nullable | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| completiontimespent | bigint | Nullable | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| allowofflineattempts | tinyint(1) | Nullable | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |