# 1. Student Report Automation

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

---

## 1. Student Report Automation

### 1.1 Weekly Progress Report Scheduling
**What it does:** Configures the automated weekly progress report for students: the Super Administrator defines the schedule (day, time, timezone), the report contents (hours studied, videos completed, assessments taken and scores, streak status, areas of strength and improvement), and the audience, so every enrolled student receives a consistent weekly progress digest without manual effort.

**Sub-features:**
- Schedule definition: the weekly cadence (day of week, time, timezone)
- Report content selection: hours studied, videos completed, assessments taken and scores, streak status, areas of strength and improvement
- Audience scoping: which student segments receive the weekly report (all, by plan, by course, by cohort)
- Enable/disable per segment: the weekly report toggled on or off per audience
- Preview: a sample weekly report rendered before activation
- available on web
- event logging (action performed)
- Audit logging of weekly report scheduling

**Super Admin User Journey:**
1. Super Admin opens Student Report Automation and selects Weekly Progress Report.
2. Sets the schedule: day of week, time, and timezone.
3. Selects the report content blocks (hours studied, videos completed, assessments and scores, streak status, strengths and improvement areas).
4. Scopes the audience (all students, or by plan/course/cohort) and enables the report for that segment.
5. Renders a preview to confirm the layout and data.
6. Saves; the platform queues the weekly report on the defined cadence.
7. The scheduling change is audit-logged with the actor and timestamp.

**Rules & Edge Cases:**
- The schedule is timezone-aware; a student in a different timezone receives the report at the configured local-equivalent time.
- A student with no activity in the week still receives the report, showing zero/empty values rather than being skipped.
- Content blocks can be toggled individually; a report with no blocks selected is rejected.
- Audience scoping is mutually consistent; a student in multiple segments receives the report once, not duplicated.
- Scheduling changes take effect from the next scheduled run, not mid-run.
- Scheduling changes are audit-logged with the actor and timestamp.

### 1.2 Monthly Performance Report Generation
**What it does:** Generates the automated monthly performance report: the Super Administrator configures the monthly report that includes subject-wise detailed analysis, comparison with the previous month, goal achievement status, predicted scores for upcoming exams, and personalized recommendations, delivered at the start of each month.

**Sub-features:**
- Monthly cadence: the generation day and time (e.g., 1st of the month)
- Subject-wise detailed analysis: per-subject performance breakdown
- Month-over-month comparison: performance delta vs. the previous month
- Goal achievement status: progress against the student's set goals
- Predicted scores: predicted scores for upcoming exams
- Personalized recommendations: AI-generated next-step recommendations
- Generation status: the batch generation state (queued, running, complete, failed)
- available on web
- event logging (action performed)
- Audit logging of monthly report generation

**Super Admin User Journey:**
1. Super Admin configures the monthly performance report cadence (day and time).
2. Selects the analysis blocks: subject-wise analysis, month-over-month comparison, goal achievement, predicted scores, personalized recommendations.
3. Saves; the platform schedules the monthly batch generation.
4. On the scheduled day, the platform generates the report per student; the generation status shows queued, running, complete, or failed.
5. For a failed generation (e.g., a data dependency unavailable), Super Admin sees the failure and can re-run the batch.
6. Reviews a sample generated report to confirm accuracy.
7. The generation configuration is audit-logged with the actor and timestamp.

**Rules & Edge Cases:**
- The month-over-month comparison requires at least one prior month of data; a new student's first report shows "no prior data" rather than a false delta.
- Predicted scores are only shown when an upcoming exam is on the student's calendar; otherwise the block is omitted.
- A failed batch is retriable; partial failures do not block the rest of the cohort.
- Generation is idempotent per period; re-running does not duplicate delivered reports.
- Generation configuration changes are audit-logged with the actor and timestamp.

### 1.3 Pre-Exam Summary Triggers
**What it does:** Triggers an automated pre-exam summary: the Super Administrator defines the trigger window (e.g., 7 days before an exam) so the platform automatically generates and delivers a pre-exam summary containing a readiness assessment, topics needing urgent revision, recommended study focus, and a confidence score per topic.

**Sub-features:**
- Trigger window: the number of days before an exam that triggers the summary
- Readiness assessment: an overall exam readiness score
- Urgent revision topics: topics flagged for urgent revision
- Recommended study focus: the suggested focus areas
- Confidence score per topic: per-topic confidence estimates
- Exam source: exams pulled from the student's exam calendar
- available on web
- event logging (action performed)
- Audit logging of pre-exam summary triggers

**Super Admin User Journey:**
1. Super Admin sets the pre-exam trigger window (e.g., 7 days before exam).
2. Selects the summary contents: readiness assessment, urgent revision topics, recommended study focus, confidence score per topic.
3. Saves; the platform monitors the exam calendar for exams entering the trigger window.
4. When an exam enters the window, the platform generates and delivers the pre-exam summary to the student.
5. For a student with no exam in the window, no summary is generated.
6. Reviews a sample pre-exam summary to confirm the readiness and confidence data.
7. The trigger configuration is audit-logged with the actor and timestamp.

**Rules & Edge Cases:**
- The trigger fires once per exam; it does not re-fire on each day within the window.
- A student with multiple exams in the window receives one summary per exam.
- Confidence scores are computed only for topics with sufficient assessment data; thin-data topics are marked "insufficient data".
- Exams added to the calendar after the window has passed do not retroactively trigger a summary.
- Trigger configuration changes are audit-logged with the actor and timestamp.

### 1.4 Report Delivery Channels
**What it does:** Manages how automated student reports are delivered: the Super Administrator configures the delivery channels (email, in-app, PDF) and the per-report channel assignment, so each report type reaches the student through the appropriate channel(s).

**Sub-features:**
- Channel enablement: email, in-app, and PDF channels toggled on/off
- Per-report channel assignment: which channels each report type uses
- PDF generation: reports rendered as downloadable PDF attachments
- In-app delivery: reports surfaced in the student's in-app report center
- Email delivery: reports sent to the student's registered email
- Delivery status: per-report delivery state (sent, delivered, failed, bounced)
- available on web
- event logging (action performed)
- Audit logging of delivery channel configuration

**Super Admin User Journey:**
1. Super Admin opens Report Delivery Channels and enables the required channels (email, in-app, PDF).
2. Assigns channels per report type (e.g., weekly = in-app + email; monthly = PDF + email).
3. Saves; the platform delivers each report through its assigned channels.
4. Reviews the delivery status per report: sent, delivered, failed, or bounced.
5. For a failed or bounced delivery, Super Admin sees the reason and the affected recipients.
6. Confirms a sample report arrives correctly in each enabled channel.
7. The channel configuration is audit-logged with the actor and timestamp.

**Rules & Edge Cases:**
- A report with no enabled channel is not delivered and is flagged as misconfigured.
- PDF generation failure does not block in-app or email delivery of the same report.
- A bounced email is recorded and the in-app copy remains available as a fallback.
- Channel assignment is per report type; changing it affects future reports, not already-delivered ones.
- Channel configuration changes are audit-logged with the actor and timestamp.
