# 4. Content Editing & Versioning

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 4. Content Editing & Versioning

### 4.1 Edit Content Metadata
**What it does:** Manages the editing of a content item's metadata: the Super Administrator updates the descriptive and organizational attributes of a content item (title, description, topic, subject, difficulty, completion time, tags) without changing the underlying media, so the content's presentation and placement stay accurate as it evolves. Metadata edits are lightweight and do not require re-uploading the media.

**Sub-features:**
- Metadata fields: title, description, topic, subject, difficulty, completion time, tags
- Edit in place: the metadata updated without re-uploading the media
- Validation: the metadata fields checked (required fields, valid values)
- Immediate effect: the updated metadata reflected where the content is shown
- Edit history: the metadata changes tracked (what changed, when)
- Bulk metadata correction: correcting a common error across multiple items
- Audit logging of metadata edits

**Super Administrator User Journey:**
1. A content item's title is unclear (an internal working name). Super Admin edits the metadata: a clear, learner-facing title and description.
2. Updates the organizational attributes where needed (the topic, the difficulty tag) so the placement and level are accurate.
3. Saves; the validation passes (required fields present, values valid), and the updated metadata is reflected where the content is shown.
4. For a completion time that no longer matches (a re-cut video), Super Admin updates the completion time to the actual duration.
5. For a common error found across several items (a wrong topic tag on a batch), Super Admin runs a bulk metadata correction, fixing the set at once.
6. Reviews the edit history: the metadata changes tracked (what changed, when), so the content's evolution is auditable.
7. Confirms the effect: the content now presents correctly (the title, the placement, the level) in the learner's view.
8. The metadata edits are audit-logged with the content, the fields changed, and the timestamp.

**Rules & Edge Cases:**
- Metadata edits change the descriptive/organizational attributes, not the media; no re-upload is needed.
- The fields are validated (required present, values valid); an invalid edit is rejected with the reason.
- The update takes effect immediately where the content is shown; there is no stale presentation.
- A bulk correction fixes a common error across a set; the scope of the bulk change is explicit.
- The edit history tracks the changes (what, when); the content's evolution is auditable.
- Metadata edits are audit-logged with the content, fields, and timestamp.

### 4.2 Maintain Content Version History
**What it does:** Keeps a version history for each content item: every significant change to a content item (a new media version, a metadata revision) is recorded as a version, so the content's history is preserved and a prior version can be reviewed or restored. The Super Administrator maintains the version history so content changes are traceable and reversible.

**Sub-features:**
- Version creation: a new version recorded when the content changes significantly
- Version record: the version's content, the change, the actor, and the timestamp
- Version list: the versions of a content item in order
- Version comparison: reviewing what changed between versions
- Restore: reverting a content item to a prior version
- Version retention: the history retained per the platform's policy
- Audit logging of version create/restore

**Super Administrator User Journey:**
1. A content item is updated (a revised lesson). Super Admin saves the change; the platform records a new version (the change, the actor, the timestamp).
2. Reviews the version list: the versions of the content item in order, so the history is visible.
3. For a change that introduced an error (a bad edit), Super Admin compares the versions (what changed between the current and the prior) to confirm the issue.
4. Restores the content item to the prior version; the content reverts, and the restore is recorded as a new version (the history is not destroyed).
5. Reviews the version retention: the history is retained per the platform's policy (the older versions available for the retention period).
6. For a content item with a long history, Super Admin reviews the key versions (the significant changes) to understand its evolution.
7. Confirms the traceability: every significant change is a version, and the current state is the latest version.
8. The version create and restore events are audit-logged with the content, the version, and the timestamp.

**Rules & Edge Cases:**
- A version is recorded on a significant change; the version captures the change, the actor, and the timestamp.
- A restore reverts to a prior version but is itself recorded (the history is append-only, not destroyed).
- The version list shows the history in order; the current state is the latest version.
- Version comparison shows what changed between versions; it supports a confident restore.
- The retention is per the platform's policy; older versions are available for the retention period.
- Version create/restore is audit-logged with the content, version, and timestamp.

### 4.3 Replace or Update Content
**What it does:** Replaces or updates the content of a content item: the Super Administrator swaps in a new media version (a re-recorded video, a corrected audio) or updates the content in place, so learners see the current, correct material. The replacement is handled with the version history (the prior version preserved) and the impact on learners (those mid-consumption) considered.

**Sub-features:**
- Content replacement: a new media version swapped in for the content item
- In-place update: the content updated without changing its identity/placement
- Version linkage: the replacement recorded as a new version (the prior preserved)
- Learner impact: learners mid-consumption handled (their progress on the prior version)
- Replacement validation: the new media validated (format, quality) before it goes live
- Rollback: reverting to the prior version if the replacement is faulty
- Audit logging of replacement/update

**Super Administrator User Journey:**
1. A video needs a correction (an error in the lesson). Super Admin prepares the re-recorded version and initiates the replacement.
2. The new media is validated (format, quality) before it goes live; a failing file is rejected and corrected.
3. Confirms the learner impact: learners who were mid-consumption of the prior version — their progress is handled (carried over or reset, per the replacement's setting).
4. Saves; the replacement goes live as a new version. Learners now see the corrected material, and the prior version is preserved in the history.
5. For a faulty replacement (the new version has an issue), Super Admin rolls back to the prior version; the rollback is recorded.
6. Reviews the version linkage: the replacement is a new version, the prior is preserved, and the current state is the corrected material.
7. Confirms the learners see the current material: a spot-check that the replacement is live and correct.
8. The replacement/update is audit-logged with the content, the version, the learner-impact handling, and the timestamp.

**Rules & Edge Cases:**
- A replacement swaps in new media; it is validated (format, quality) before going live.
- The replacement is recorded as a new version; the prior version is preserved (not destroyed).
- The learner impact is handled explicitly (progress carried over or reset); it is not silently dropped.
- A rollback reverts to the prior version if the replacement is faulty; the rollback is recorded.
- The replacement keeps the content's identity and placement; only the media/content changes.
- Replacement/update is audit-logged with the content, version, impact handling, and timestamp.
