← All tables
mdl_course_modules
MIGRATECourse activity instances · 24 columnsProposed target
learning_activities
Migration rule
Map module type + instance reference + section + order + visibility
Verification required
Requires mdl_modules and activity-specific tables; confirm unsupported plugins and module IDs.
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 |
| module | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| instance | bigint | Not null | '0' | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | Schema-only inference |
| section | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| idnumber | varchar(100) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| added | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| score | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| indent | mediumint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| visible | tinyint(1) | Not null | '1' | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference |
| visibleoncoursepage | tinyint(1) | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| visibleold | tinyint(1) | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| groupmode | smallint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| groupingid | 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 |
| completion | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| completiongradeitemnumber | bigint | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| completionview | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| completionexpected | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| completionpassgrade | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| showdescription | tinyint(1) | Not null | '0' | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference |
| availability | longtext | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| deletioninprogress | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| downloadcontent | tinyint(1) | Nullable | '1' | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | High: verify semantics/relationship/security |
| lang | varchar(30) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |