Mock Data Audit
Mock Data Audit — March 2026
This document records the findings and fixes from a comprehensive audit of the QuranFlow Admin mockup's mock data. The audit was motivated by staff walkthrough confusion — contradictory student states made the mockup unreliable for demonstrating workflows.
Audit Scope
Every file in src/data/ was read and cross-referenced. The audit checked:
- Student status vs. subscription vs. enrollment consistency
- Submission counts in
students.tsvs. actual records insubmissions.ts - Student group
memberCountvs. students actually assigned to each group - Scholarship discount % vs. payment amounts in
billing.ts - Dashboard alert tile counts vs. the data they claim to summarize
- Deferment status vs. student active/inactive status
- Family group
allActiveflags vs. member subscription statuses - Appointment and calendar event cross-references
Student Story Matrix
Each of the 20 mock students must tell a coherent story across all data files. Here is the canonical narrative for each:
| # | Name | Level | Status | Subscription | Story |
|---|---|---|---|---|---|
| 1 | Sarah Ahmed | L0 | Active | Active | Model student. Family plan (Ahmed Family). On track, 5 submissions. Resolved a content issue (week 5 video). |
| 2 | Zainab Patel | L0 | Active | Active | Full scholarship recipient (100%). Solid progress, 4 submissions. UK-based. |
| 3 | Ali Rahman | L0 | Active | Incomplete | Struggling. Payment setup never completed (card fails). Partial scholarship (50%) approved but Stripe coupon not applied yet. App crashes on upload. At Risk. |
| 4 | Fatima Hassan | L1 | Active | Active | Strong student on installment plan. Ahmed Family member. 6 submissions, on track. |
| 5 | Omar Syed | L1 | Active | Active | Good student. Planning to cancel at period end (cancelAtPeriodEnd: true). Push notification issue filed. |
| 6 | Mariam Khan | L1 | Active | Past Due | Payment problems cascading. Card declined repeatedly. Behind on submissions (3/6). Filed high-priority payment issue. Khan Family primary contact. |
| 7 | Hassan Ali | L1 | Active | Active | Partial scholarship (50%). Steady progress, 5 submissions. Khan Family member. |
| 8 | Amina Osman | L2 | Active | Active | Top performer. Annual plan. Ahmed Family member. 6 submissions, highest consistency. |
| 9 | Yusuf Bakr | L2 | Active | Active | Solid student. Found a typo in week 4 resource (resolved). 6 submissions. |
| 10 | Khadijah Noor | L2 | Inactive | Cancelled | Returned from travel deferment (completed Dec-Feb). Couldn't keep up — only 1 submission, no-show appointment. Cancelled 2/20, refunded. Filed issue requesting reactivation. Noor Family. |
| 11 | Ibrahim Sharif | L2 | Active | Active | Full scholarship recipient (100%). Good progress, 5 submissions. |
| 12 | Layla Mahmoud | L2 | Inactive | Cancelled | Withdrew. Originally requested deferment (personal reasons), but upgraded to full withdrawal. 0 submissions. Refunded. Deferment marked completed. |
| 13 | Aisha Yilmaz | L3 | Active | Active | Requesting TA change (in progress). Otherwise strong — 6 submissions, top grades. Khan Family member. |
| 14 | Bilal Hussain | L3 | Active | Unpaid | Payment failed after retries. Content locked. Behind on submissions (4/6, skipped week 4). No-show on last appointment. Filed issue about content access. Useful edge case for admin workflow demos. |
| 15 | Maryam Farouk | L3 | Active | Active | Strong student. Noor Family member. 6 submissions, on track. |
| 16 | Noor Abdullah | L4 | Active | Active | Top Level 4 student. Annual plan. Perfect grades (avg 4.7). 6 submissions. |
| 17 | Hamza Qureshi | L4 | Active | Active | Advanced student. Had a timezone display bug (resolved). 6 submissions. |
| 18 | Hafsa Rizvi | L4 | Active | Paused | On medical leave (deferment: Mar 6 - Apr 6). 5 submissions before deferment. Excused from "Behind" status — reporting shows "On Track". |
| 19 | Sumaya Jaber | Y2 | Active | Active | Year 2 star. Full scholarship (expiring). 6 submissions, highest avg grade (4.9). |
| 20 | Tariq Mansoor | Y2 | Active | Active | Year 2. Flagged that elective content is incomplete (3/6 weeks uploaded). 6 submissions. |
Detailed Student Narratives
Exemplary Students (5): Sarah Ahmed (L0) is the model student on a family plan with 5 on-time submissions. Fatima Hassan (L1) shows the installment billing workflow with 6 submissions. Amina Osman (L2) is the top performer on an annual plan. Noor Abdullah (L4) has near-perfect grades across 6 submissions. Sumaya Jaber (Y2) has the highest average grade (4.9) on a full scholarship that's expiring.
Scholarship Students (3): Zainab Patel (L0, 100% scholarship) and Ibrahim Sharif (L2, 100% scholarship) show $0 payments with "Scholarship Full" plan name. Hassan Ali (L1, 50% scholarship) shows a $100 payment with "Semester Standard (50% Scholarship)" plan name. These demonstrate how scholarship discounts appear in the billing screens.
Payment Problems (3 — escalating severity): Ali Rahman (L0, Incomplete) is the mildest case — his payment setup never completed, his partial scholarship coupon couldn't be applied, and he's At Risk with only 2 submissions. Mariam Khan (L1, Past Due) has three failed installment retries in March, is behind on submissions (3/6), cancelled an appointment, and filed a high-priority payment issue. Bilal Hussain (L3, Unpaid) is the worst active case — subscription exhausted all Stripe retries, content is locked, he skipped week 4 entirely, no-showed his appointment, and filed an issue about content access. Together they show the full payment failure cascade an admin would encounter.
Inactive Students (2): Khadijah Noor (L2) returned from a travel deferment but couldn't keep up — 1 submission, grade 2.1, no-show appointment, cancelled and refunded. Now requesting reactivation via the Issue Queue. Layla Mahmoud (L2) has zero submissions and withdrew entirely after originally requesting a deferment.
Deferment (1): Hafsa Rizvi (L4) was active with 5 submissions through week 5, then went on medical leave (March 6). Subscription correctly paused, reporting correctly shows "On Track" (excused), and no action needed until her return date of April 6.
Steady with Minor Issues (4): Omar Syed (L1) plans to cancel at period end — a retention signal. Yusuf Bakr (L2) found a content typo. Aisha Yilmaz (L3) is requesting a TA change. Hamza Qureshi (L4) had a timezone bug that's been resolved.
Year 2 (2): Sumaya (covered above) tracks elective Tajweed Advanced at Practice Tier 2. Tariq Mansoor flagged that his Tafsir Basics elective only has 3 of 6 weeks of content uploaded — a high-priority content gap the admin would escalate.
Issues Found and Fixed
Category 1: Student Status Contradictions
| Student | Was | Fixed To | Rationale |
|---|---|---|---|
| Khadijah Noor (#10) | Active / Enrolled / Cancelled | Inactive / Fail / Cancelled | Can't be Active with a Cancelled subscription. Her reactivation request issue only makes sense if she's Inactive. |
| Layla Mahmoud (#12) deferment | Deferment status: "Active" | Deferment status: "Completed" | She's Inactive/Fail/Cancelled — an active deferment contradicts withdrawal. Deferment was ended by the cancellation. |
| Hafsa Rizvi (#18) reporting | Report status: "Behind" | Report status: "On Track" | She's on approved medical deferment. Being Behind would be unfair — she's excused. |
| Hafsa Rizvi (#18) deferment | Deferment starts: 2026-03-01 | Deferment starts: 2026-03-06 | Had an appointment on 3/5 — deferment can't predate that. |
Category 2: Submission Data Gaps
Before: 40 submission records. 14 of 20 students had fewer submissions than their submissionCount field claimed.
After: 94 submission records. Every student's submissionCount now matches the actual records in submissions.ts.
Added 54 records with:
- Correct assessment IDs and titles matching
assessments.ts - Dates following the weekly submission cadence (week 1 = ~Feb 8, week 6 = ~Mar 10)
- Grades calibrated to approximate each student's
avgGradeinreporting.ts - Reviewer matching the student's assigned TA
- Latest submissions marked "Under Review" for on-track students
Category 3: Group Member Counts
| Group | Was | Fixed To | Actual Students |
|---|---|---|---|
| Sisters A (#1) | 5 | 4 | Sarah, Fatima, Amina, Layla |
| Sisters Advanced (#2) | 3 | 2 | Noor, Sumaya |
| Brothers A (#5) | 3 | 2 | Ali, Ibrahim |
| Brothers Advanced (#8) | 2 | 1 | Hamza |
Category 4: Scholarship-Billing Mismatch
Three students with 100% scholarships were showing $199 payments:
| Student | Was | Fixed To |
|---|---|---|
| Zainab Patel (#2) | $199, "Semester Standard" | $0, "Scholarship Full" |
| Ibrahim Sharif (#11) | $199, "Semester Standard" | $0, "Scholarship Full" |
| Sumaya Jaber (#19) | $199, "Semester Standard" | $0, "Scholarship Full" |
| Hassan Ali (#7) | $199, "Semester Standard" | $100, "Semester Standard (50% Scholarship)" |
Category 5: Dashboard Accuracy
- Students Behind tile: Changed from 3 to 2 (Mariam Khan + Bilal Hussain). Ali Rahman is "At Risk" (separate category). Hafsa Rizvi is on deferment (excused). Khadijah Noor is Inactive (not counted).
- Y2 Appointments tile: Changed from "2/10 booked" to "1/2 booked" (only Tariq has an upcoming appointment in the current week).
- Dashboard comments: Rewritten to accurately explain the derivation of each count.
Not Changed (Validated as Correct)
- Bilal Hussain (#14): Active / Enrolled / Unpaid is intentionally a realistic edge case. His issue "Cannot access level 3 content" makes sense — content is locked because subscription is unpaid. Useful for admin workflow demos.
- Family group
allActiveflags: Khan Family (false) and Noor Family (false) are correct — each has at least one non-Active member. - Expired coupons: Coupons with past expiry dates are shown as-is. Archiving is a UI concern.
- Ali Rahman (#3) scholarship:
stripeCouponApplied: falseis correct — his subscription never completed, so the coupon couldn't be applied.
Cross-Reference Rules (for future data changes)
When modifying mock data, these rules must hold:
- Student status coherence: If
subscriptionStatusis Cancelled, studentstatusmust be Inactive andenrollmentStatusmust be Fail. - Submission counts:
student.submissionCountmust equalsubmissions.filter(s => s.studentId === student.id).length. - Group member counts:
group.memberCountmust equalstudents.filter(s => s.groupId === group.id).length. - Scholarship payments: Students with 100% scholarships should have $0 payment records with "Scholarship Full" plan name.
- Deferment consistency: If a student has an Active deferment, their subscription should be Paused. If they've withdrawn (Inactive/Cancelled), deferment should be Completed.
- Dashboard derivation: Alert tile counts must be derivable from actual data. Document the derivation in comments.
- TA reviewer match:
submission.reviewedByshould match the student's assigned TA name. - Family
allActive:familyGroup.allActiveis false if any member has a non-Active subscription status. - Reporting exclusions: Students on approved deferment should not be marked "Behind" in reporting.
Files Modified
| File | Changes |
|---|---|
src/data/students.ts |
Khadijah Noor: Active → Inactive, Enrolled → Fail |
src/data/submissions.ts |
Added 54 records (40 → 94 total). Reorganized by student with section comments. |
src/data/student-groups.ts |
Fixed memberCount for groups 1, 2, 5, 8 |
src/data/scholarships.ts |
Layla deferment → Completed. Hafsa deferment start → 3/06. |
src/data/billing.ts |
Scholarship student payments → $0. Hassan Ali → $100 (50% discount). |
src/data/dashboard.ts |
Students Behind: 3 → 2. Y2 Appointments: 2/10 → 1/2. Updated all comments. |
src/data/reporting.ts |
Hafsa Rizvi: Behind → On Track |
docs/IMPLEMENTATION-PLAN.md |
Updated Phase 0.5 with audit notes and cross-reference rules |