# 5. Social Learning Analytics — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: social_learning_analytics.md — every feature, sub-feature, and rule covered

## Test Execution Policy

- Zero tolerance: any deviation from the documented behavior is a defect.
- Every failed test is logged with a Bug ID, the feature, the sub-feature, the expected vs actual result, and the severity; 100% of bugs are fixed before the group passes.
- 100% pass rate is required for the group to be marked complete.

## Coverage Matrix

| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 5.1 Engagement Metrics | Active participants and posts/replies volume | TC-SA-SL-17-001 |
| 5.1 Engagement Metrics | Group activity (sessions, chat, shared resources) | TC-SA-SL-17-002 |
| 5.1 Engagement Metrics | Forum activity and engagement trend | TC-SA-SL-17-003 |
| 5.1 Engagement Metrics | Rule: zero-activity period reports zero, not error | TC-SA-SL-17-004 |
| 5.1 Engagement Metrics | Audit logging of engagement data access | TC-SA-SL-17-005 |
| 5.2 Participation Rates | Participation rate by grade and subject | TC-SA-SL-18-001 |
| 5.2 Participation Rates | Feature-wise participation (groups, forums, Q&A, tutor) | TC-SA-SL-18-002 |
| 5.2 Participation Rates | Non-participant identification and benchmark | TC-SA-SL-18-003 |
| 5.2 Participation Rates | Rule: zero-eligible segment has no rate | TC-SA-SL-18-004 |
| 5.2 Participation Rates | Audit logging of participation data access | TC-SA-SL-18-005 |
| 5.3 Content Quality Scores | Answer quality score (upvotes, acceptance, flags) | TC-SA-SL-19-001 |
| 5.3 Content Quality Scores | Shared resource and thread quality scores | TC-SA-SL-19-002 |
| 5.3 Content Quality Scores | Quality distribution per subject and low-quality flagging | TC-SA-SL-19-003 |
| 5.3 Content Quality Scores | Rule: removed item excluded from averages | TC-SA-SL-19-004 |
| 5.3 Content Quality Scores | Audit logging of quality score access | TC-SA-SL-19-005 |
| 5.4 Moderation Action Logs | Moderation action log (action, item, actor, reason, timestamp) | TC-SA-SL-20-001 |
| 5.4 Moderation Action Logs | Filtering by feature, action type, actor, date | TC-SA-SL-20-002 |
| 5.4 Moderation Action Logs | Moderation volume, trend, and moderator performance | TC-SA-SL-20-003 |
| 5.4 Moderation Action Logs | Rule: log entry immutable | TC-SA-SL-20-004 |
| 5.4 Moderation Action Logs | Rule: overturned action recorded as separate entry | TC-SA-SL-20-005 |
| 5.4 Moderation Action Logs | Audit logging of moderation log access | TC-SA-SL-20-006 |

## 5.1 Engagement Metrics

### TC-SA-SL-17-001 — Active participants and posts/replies volume
**Type:** Positive
**Covers:** 5.1 → Active participants and volume
**Preconditions:** A Super Admin account is active; social activity exists.
**Steps:**
1. As a Super Admin, open Social Learning Analytics → Engagement.
2. Verify the active participants and posts/replies volume per period are shown.
**Expected Result:** Active participants and posts/replies volume — delivered exactly as documented.
**Priority:** Critical

### TC-SA-SL-17-002 — Group activity (sessions, chat, shared resources)
**Type:** Positive
**Covers:** 5.1 → Group activity
**Preconditions:** Study groups have activity.
**Steps:**
1. View the group activity: sessions, chat messages, shared resources.
2. Verify the figures match the underlying activity.
**Expected Result:** Group activity — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-17-003 — Forum activity and engagement trend
**Type:** Positive
**Covers:** 5.1 → Forum activity and trend
**Preconditions:** Forums have activity over time.
**Steps:**
1. View the forum activity: threads, replies, pins.
2. Track the engagement trend over time.
**Expected Result:** Forum activity and engagement trend — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-17-004 — Rule: zero-activity period reports zero, not error
**Type:** Edge
**Covers:** 5.1 → Rule: zero-activity handling
**Preconditions:** A period has no social activity.
**Steps:**
1. View the engagement for the zero-activity period.
2. Verify zero is reported, not an error.
**Expected Result:** A period with zero activity reports zero, not an error — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-17-005 — Audit logging of engagement data access
**Type:** Positive
**Covers:** 5.1 → Audit logging
**Preconditions:** Engagement analytics have been accessed.
**Steps:**
1. Open the audit trail and filter by engagement data access.
2. Verify entries show the actor, the scope, and the timestamp.
**Expected Result:** Audit logging of engagement data access — delivered exactly as documented.
**Priority:** Critical

## 5.2 Participation Rates

### TC-SA-SL-18-001 — Participation rate by grade and subject
**Type:** Positive
**Covers:** 5.2 → Participation rate
**Preconditions:** Social activity exists across grades and subjects.
**Steps:**
1. Open Social Learning Analytics → Participation.
2. Verify the participation rate by grade and subject is shown.
**Expected Result:** Participation rate by grade and subject — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-18-002 — Feature-wise participation (groups, forums, Q&A, tutor)
**Type:** Positive
**Covers:** 5.2 → Feature-wise participation
**Preconditions:** Students participate in multiple social features.
**Steps:**
1. View the feature-wise participation: groups, forums, Q&A, tutor mode.
2. Verify each feature's participation is reported.
**Expected Result:** Feature-wise participation — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-18-003 — Non-participant identification and benchmark
**Type:** Positive
**Covers:** 5.2 → Non-participants and benchmark
**Preconditions:** Eligible students exist, some inactive.
**Steps:**
1. Identify non-participants (eligible but inactive).
2. Compare the participation rate against the benchmark (target rate).
**Expected Result:** Non-participant identification and benchmark — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-18-004 — Rule: zero-eligible segment has no rate
**Type:** Edge
**Covers:** 5.2 → Rule: zero-eligible handling
**Preconditions:** A segment has zero eligible students.
**Steps:**
1. View the participation rate for the segment.
2. Verify no rate is computed (no division by zero).
**Expected Result:** A segment with zero eligible has no rate — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-18-005 — Audit logging of participation data access
**Type:** Positive
**Covers:** 5.2 → Audit logging
**Preconditions:** Participation analytics have been accessed.
**Steps:**
1. Open the audit trail and filter by participation data access.
2. Verify entries show the actor, the scope, and the timestamp.
**Expected Result:** Audit logging of participation data access — delivered exactly as documented.
**Priority:** Critical

## 5.3 Content Quality Scores

### TC-SA-SL-19-001 — Answer quality score (upvotes, acceptance, flags)
**Type:** Positive
**Covers:** 5.3 → Answer quality score
**Preconditions:** Answers exist with upvotes, acceptance, and flags.
**Steps:**
1. Open Social Learning Analytics → Content Quality.
2. Verify the answer quality score reflects upvotes, acceptance, and flags.
**Expected Result:** Answer quality score — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-19-002 — Shared resource and thread quality scores
**Type:** Positive
**Covers:** 5.3 → Resource and thread quality
**Preconditions:** Shared resources and threads exist with signals.
**Steps:**
1. Verify the shared resource quality score (views, helpful ratings, flags).
2. Verify the thread quality score (replies, upvotes, resolution).
**Expected Result:** Shared resource and thread quality scores — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-19-003 — Quality distribution per subject and low-quality flagging
**Type:** Positive
**Covers:** 5.3 → Distribution and flagging
**Preconditions:** Content quality scores exist per subject.
**Steps:**
1. View the quality distribution per subject.
2. Verify low-quality items (below threshold) are flagged for review.
**Expected Result:** Quality distribution per subject and low-quality flagging — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-19-004 — Rule: removed item excluded from averages
**Type:** Negative
**Covers:** 5.3 → Rule: removed item exclusion
**Preconditions:** A content item is removed.
**Steps:**
1. Remove a content item.
2. Verify it is excluded from the quality averages.
**Expected Result:** A removed item is excluded from averages — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-19-005 — Audit logging of quality score access
**Type:** Positive
**Covers:** 5.3 → Audit logging
**Preconditions:** Content quality analytics have been accessed.
**Steps:**
1. Open the audit trail and filter by quality score access.
2. Verify entries show the actor, the scope, and the timestamp.
**Expected Result:** Audit logging of quality score access — delivered exactly as documented.
**Priority:** Critical

## 5.4 Moderation Action Logs

### TC-SA-SL-20-001 — Moderation action log (action, item, actor, reason, timestamp)
**Type:** Positive
**Covers:** 5.4 → Moderation action log
**Preconditions:** Moderation actions have occurred across social features.
**Steps:**
1. As a Super Admin, open Social Learning Analytics → Moderation Logs.
2. Verify each entry shows the action, item, actor, reason, and timestamp.
**Expected Result:** Moderation action log — delivered exactly as documented.
**Priority:** Critical

### TC-SA-SL-20-002 — Filtering by feature, action type, actor, date
**Type:** Positive
**Covers:** 5.4 → Filtering
**Preconditions:** Moderation logs exist across features and dates.
**Steps:**
1. Filter by feature (groups, Q&A, forums), action type, actor, and date range.
2. Verify the filtered results match the criteria.
**Expected Result:** Filtering — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-20-003 — Moderation volume, trend, and moderator performance
**Type:** Positive
**Covers:** 5.4 → Volume, trend, performance
**Preconditions:** Moderation logs exist over time.
**Steps:**
1. Review the moderation volume and trend.
2. Review moderator performance (actions per moderator, overturn rate).
**Expected Result:** Moderation volume, trend, and moderator performance — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-20-004 — Rule: log entry immutable
**Type:** Negative
**Covers:** 5.4 → Rule: immutability
**Preconditions:** A moderation log entry exists.
**Steps:**
1. Attempt to edit or delete the log entry.
2. Verify the entry cannot be edited or deleted.
**Expected Result:** A moderation log entry is immutable — delivered exactly as documented.
**Priority:** Critical

### TC-SA-SL-20-005 — Rule: overturned action recorded as separate entry
**Type:** Negative
**Covers:** 5.4 → Rule: overturn recording
**Preconditions:** A moderation action is overturned.
**Steps:**
1. Overturn a moderation action.
2. Verify it is recorded as a separate entry referencing the original.
**Expected Result:** An overturned moderation action is recorded as a separate entry referencing the original — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-20-006 — Audit logging of moderation log access
**Type:** Positive
**Covers:** 5.4 → Audit logging
**Preconditions:** Moderation logs have been accessed.
**Steps:**
1. Open the audit trail and filter by moderation log access.
2. Verify entries show the actor, the scope, and the timestamp.
**Expected Result:** Audit logging of moderation log access — delivered exactly as documented.
**Priority:** Critical
