# 5. Content Lifecycle

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

---

## 5. Content Lifecycle

### 5.1 Publish, Unpublish, and Archive Content
**What it does:** Controls a content item's lifecycle status: publish (live and available to learners), unpublish (taken offline, not available), and archive (retired, no longer in active use). The Super Administrator moves content through these statuses so only ready, current content is live, and retired content is cleanly taken down while its history is preserved.

**Sub-features:**
- Content statuses: published (live), unpublished (offline), archived (retired)
- Publish: the content made available to learners (in its assigned context)
- Unpublish: the content taken offline (not available), without losing its data
- Archive: the content retired (no longer in active use), preserved for history
- Status transition: the moves between the statuses, with the impact reviewed
- Reversibility: an unpublished/archived content can be re-published
- Learner impact: learners with the content in their progress handled on unpublish/archive
- Audit logging of status transitions

**Super Administrator User Journey:**
1. A content item is ready (uploaded, organized, metadata set). Super Admin publishes it; it becomes available to the learners in its assigned context.
2. For content that needs a correction but should not be seen in its current state, Super Admin unpublishes it: it is taken offline (not available), but its data and placement are preserved.
3. Reviews the learner impact of the unpublish: learners who had the content in their progress — their state is handled (the content is unavailable to them until re-published).
4. Makes the correction and re-publishes the content; it is available again, and the learners' access is restored.
5. For content that is retired (a topic no longer taught), Super Admin archives it: it is no longer in active use, but it is preserved for history (not deleted).
6. For an archived item that is needed again (a topic revived), Super Admin re-publishes it; the archive is reversible.
7. Reviews the content statuses across the catalog: the live, offline, and retired content, so the lifecycle state is clear.
8. Each status transition is audit-logged with the content, the from/to status, and the timestamp.

**Rules & Edge Cases:**
- A published content item is live and available in its assigned context; an unpublished one is offline (data preserved).
- An archived content item is retired (not in active use) but preserved for history; it is not deleted.
- Transitions are reversible where sensible: unpublished → published, archived → published.
- The learner impact is reviewed on unpublish/archive; learners' state is handled, not silently broken.
- A status transition is a single, recorded event; there is no ambiguous intermediate state.
- Status transitions are audit-logged with the content, from/to status, and timestamp.

### 5.2 Content Deletion
**What it does:** Deletes a content item permanently, with the safeguards that make deletion a deliberate, last-resort action: the Super Administrator can delete content only after the dependency and impact checks pass (no active learners, no references), and the deletion is recorded. Deletion is distinct from archive — it removes the content, not just takes it offline.

**Sub-features:**
- Content deletion: the permanent removal of a content item
- Dependency check: the content's references (courses, topics, learner progress) checked before delete
- Impact review: the learners affected by the deletion reviewed
- Deletion guard: deletion blocked where dependencies exist (with the reason)
- Irreversibility: a deletion is permanent (the content is not recoverable)
- Distinction from archive: delete removes; archive preserves
- Audit logging of deletion (the content, the actor, the timestamp)

**Super Administrator User Journey:**
1. A content item is to be removed (a duplicate, or an item that was uploaded in error). Super Admin initiates the deletion.
2. The platform runs the dependency check: the content's references (the courses/topics it is assigned to, any learner progress on it).
3. If dependencies exist (learners have progress, or it is assigned to a live course), the deletion is blocked with the specific reason; Super Admin must archive instead, or resolve the dependencies first.
4. For a content item with no dependencies (an orphaned duplicate), the check passes; Super Admin reviews the impact (none) and confirms the deletion.
5. The content is deleted permanently; it is removed from the catalog and is not recoverable.
6. For a content item that should be kept for history, Super Admin archives it instead of deleting; the archive preserves it.
7. Reviews the deletion: the content is gone, and the deletion is recorded (the content, the actor, the timestamp).
8. The deletion is audit-logged with the content, the actor, and the timestamp.

**Rules & Edge Cases:**
- Deletion is permanent and irreversible; the content is not recoverable once deleted.
- The dependency check runs before delete and blocks it where references exist (with the specific reason).
- Deletion is a last resort; archive is the default for retiring content (it preserves history).
- The impact (affected learners) is reviewed before a delete is confirmed.
- A deletion is a single, recorded event; it is auditable.
- Deletion is audit-logged with the content, actor, and timestamp.
