Skip to content

feat: build Intervention Tracking and Best Practices workflow with reassessment and worksheet linking - #149

Open
Ashishpatra0-0 wants to merge 6 commits into
vicharanashala:mainfrom
Ashishpatra0-0:feat/intervention-tracking-system
Open

feat: build Intervention Tracking and Best Practices workflow with reassessment and worksheet linking#149
Ashishpatra0-0 wants to merge 6 commits into
vicharanashala:mainfrom
Ashishpatra0-0:feat/intervention-tracking-system

Conversation

@Ashishpatra0-0

Copy link
Copy Markdown

What this PR does

The problem: The backend already had a fully-built Intervention Tracking and Best
Practices system (routes, database models, seed data, and automatic outcome detection)
but there was zero frontend integration. A misleading placeholder in the Teacher
Dashboard ("Use sidebar → Interventions") pointed to a sidebar link that didn't exist.

What I built:

Core Feature (frontend integration on top of existing backend)

  • Fixed the orphaned sidebar link and misleading dashboard placeholder
  • Built the full Intervention Tracking page: view interventions, create new plans,
    see auto-detected outcomes (improved/not improved with level before→after)
  • Built the Best Practices Repository page: search, filter by strategy, sort by
    level jump, browse proven strategies from other teachers
  • Added a "Promote to Best Practice" button connecting interventions to the
    repository
  • Added an editable Teacher Notes field for ongoing collaborative observations
  • Integrated an "Intervention Plan" tab into the Student Profile page

New backend features

  1. Reassessment Trigger - activates the previously-unused pending_review
    status. Calculates whether an intervention's planned duration has elapsed
    and allows the teacher to trigger a follow-up assessment once due, with a
    live countdown shown on each card.
  2. Worksheet Matching Engine - a new endpoint that scores and ranks existing
    worksheets by how well their questions match an intervention's weak
    competencies (not just a static list - real relevance scoring based on
    question topic/subtopic overlap).
  3. Worksheet Linking - teachers can link recommended worksheets to
    an intervention plan, with a persistent display and a modal to view full
    worksheet contents (including reconstructing full question text where the
    seed data had been truncated).
  4. Linked worksheets now carry through to promoted Best Practice entries.

Files changed

Backend:

  • backend/src/db.ts — added linkedWorksheetIds to Intervention and BestPractice
  • backend/src/index.ts — added /trigger-reassessment, /suggested-worksheets,
    /linked-worksheets, /notes, and /worksheets/:id/view routes

Frontend:

  • frontend/src/components/Layout.tsx — added Interventions + Best Practices
    navigation entries
  • frontend/src/components/RoleDashboards.tsx — fixed the orphaned placeholder
    banner to link to the real Interventions page
  • frontend/src/components/InterventionTracking.tsx — new component (main feature)
  • frontend/src/components/BestPractices.tsx — new component
  • frontend/src/components/PanelViews.tsx — added Intervention Plan tab to
    Student Profile

How I tested this

  • Verified via direct API calls (curl/PowerShell) that each new backend route
    works correctly before wiring up the frontend
  • Created test interventions, linked worksheets, verified match scoring against
    real worksheet data
  • Tested the reassessment countdown/trigger by adjusting test data timestamps
  • Confirmed role-based permissions (only owning teacher or admins can edit
    notes/worksheets)
  • Tested across Teacher and Superadmin accounts to confirm scoping works correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant