Skip to content

feat: Implement Automated Engagement Scoring based on Platform Activity (#3919)#3949

Open
knoxiboy wants to merge 3 commits into
Premshaw23:masterfrom
knoxiboy:3919-feat-engagement-scoring
Open

feat: Implement Automated Engagement Scoring based on Platform Activity (#3919)#3949
knoxiboy wants to merge 3 commits into
Premshaw23:masterfrom
knoxiboy:3919-feat-engagement-scoring

Conversation

@knoxiboy

@knoxiboy knoxiboy commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Is your feature request related to a problem? Please describe.

Student engagement is currently a subjective metric, making it hard for teachers to track performance dynamically. (Resolves #3919)

Describe the solution you'd like

I have implemented the daily engagement scoring engine:

  1. Created a Vercel cron API route at \�pp/api/cron/engagement/route.js\ to run nightly.
  2. The cron job queries all active students, calculates their metrics (Attendance, Activity, Assignment, Academic) over a rolling 28-day window, normalizes the values, scales them using customizable institute settings weights, and upserts them to the \engagement_scores\ collection.
  3. Added unit tests covering the scoring calculations, weight normalization, categories, and trend logic.

Describe alternatives you've considered

An alternative was running the calculations on-the-fly during page visits, but calculating it asynchronously via a daily cron job reduces MongoDB load and speeds up dashboard load times.

Additional Context

All unit tests have been successfully verified locally via Vitest.

Copilot AI review requested due to automatic review settings July 2, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@knoxiboy knoxiboy force-pushed the 3919-feat-engagement-scoring branch from 4ab7062 to 3b210e2 Compare July 2, 2026 14:20
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.

[Feature] Implement Automated Engagement Scoring based on Platform Activity

2 participants