# 4. Discussion Forums

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

---

## 4. Discussion Forums

### 4.1 Subject-Wise Forum Management
**What it does:** Manages subject-wise forums: create/enable forums per subject, forum visibility (by grade/subscription), forum posting rules, and forum lifecycle.

**Sub-features:**
- Forum creation per subject
- Forum visibility (by grade, subscription tier, or all)
- Posting rules (login required, min reputation to post)
- Forum lifecycle: active, paused, archived
- Forum categorization (topic-based sub-forums)
- Available on web
- Event logging (action performed)
- Audit logging of forum management

**Super Admin User Journey:**
1. Super Admin opens Discussion Forums and creates a forum per subject.
2. Sets the forum visibility (by grade, subscription tier, or all).
3. Configures the posting rules (login required, min reputation to post).
4. Sets the forum lifecycle state (active, paused, archived) and topic-based sub-forums.
5. Saves; the forums are available per the configuration.
6. Reviews the forums list: subject, visibility, status.
7. Each forum action is event-logged and audit-logged.

**Rules & Edge Cases:**
- A paused forum accepts no new posts; existing threads remain readable.
- An archived forum is read-only; no new threads or replies.
- Posting rules are enforced: a user below the min reputation cannot post.
- Forum actions are audit-logged with the forum, the action, and the timestamp.

### 4.2 Thread Moderation
**What it does:** Moderates forum threads: thread reporting, thread locking/closing, thread moving between forums, and thread removal.

**Sub-features:**
- Thread reporting (by members)
- Thread locking/closing (no further replies)
- Thread moving between forums/sub-forums
- Thread removal (with reason)
- Moderation queue and action log
- Available on web
- Event logging (action performed)
- Audit logging of thread moderation

**Super Admin User Journey:**
1. Super Admin reviews the moderation queue of reported threads.
2. Takes action on a thread: lock/close, move, or remove with a reason.
3. Locks a resolved thread to prevent further replies.
4. Moves an off-topic thread to the correct forum/sub-forum.
5. Reviews the moderation action log: threads, actions, reasons.
6. Each moderation action is event-logged and audit-logged.

**Rules & Edge Cases:**
- A locked thread accepts no further replies; existing content remains readable.
- A moved thread preserves its replies and history at the new location.
- A removed thread is taken down; the removal is recorded with the reason.
- Moderation actions are audit-logged with the thread, the action, the reason, and the timestamp.

### 4.3 Pinned Discussions
**What it does:** Manages pinned discussions: pin important discussions to the top of a forum, pin ordering, pin expiry, and unpin.

**Sub-features:**
- Pin a discussion to a forum
- Pin ordering (multiple pins, ordered)
- Pin expiry (auto-unpin after a period)
- Unpin (manual)
- Pin visibility (forum-wide)
- Available on web
- Event logging (action performed)
- Audit logging of pinned discussions

**Super Admin User Journey:**
1. Super Admin opens a forum and pins an important discussion to the top.
2. Orders multiple pins and sets a pin expiry where applicable.
3. Unpins a discussion manually when it is no longer important.
4. Reviews the pinned discussions per forum: pins, order, expiry.
5. Each pin action is event-logged and audit-logged.

**Rules & Edge Cases:**
- A pinned discussion appears at the top of its forum in the defined order.
- A pin with an expiry auto-unpins when the period elapses.
- A removed discussion is automatically unpinned.
- Pin actions are audit-logged with the discussion, the forum, the action, and the timestamp.

### 4.4 Search Configuration
**What it does:** Configures forum search: search scope (all forums, per subject), search fields (title, body, author), search result ranking, and search indexing.

**Sub-features:**
- Search scope (all forums, per subject)
- Search fields (title, body, author)
- Result ranking (relevance, recency, upvotes)
- Search indexing (what is indexed, refresh frequency)
- Search result display (snippets, forum context)
- Available on web
- Event logging (action performed)
- Audit logging of search configuration

**Super Admin User Journey:**
1. Super Admin opens Discussion Forums → Search Configuration.
2. Sets the search scope (all forums or per subject) and the search fields.
3. Configures the result ranking (relevance, recency, upvotes).
4. Sets the search indexing scope and refresh frequency.
5. Saves; forum search behaves per the configuration.
6. Tests a search query and verifies the results and ranking.
7. Each configuration change is event-logged and audit-logged.

**Rules & Edge Cases:**
- Search respects forum visibility: a user cannot search into forums they cannot see.
- An archived forum's content is excluded from search by default.
- Ranking uses the defined weights; ties are broken by recency.
- Configuration changes are audit-logged with the change and the timestamp.
