Skip to content

Taariq: Add Lesson Plan Builder UI and update routes#2098

Open
TaariqMansurie wants to merge 16 commits intodevelopmentfrom
taariq-feature-lesson-plan-builder-backend
Open

Taariq: Add Lesson Plan Builder UI and update routes#2098
TaariqMansurie wants to merge 16 commits intodevelopmentfrom
taariq-feature-lesson-plan-builder-backend

Conversation

@TaariqMansurie
Copy link
Contributor

Description

This PR implements the backend API and database schemas for the "Assign Lesson Plan" feature. It introduces the endpoints required to assign lesson plan tasks to eligible students and logs the assignment history.
Implements # (PRIORITY HIGH) Phase 4 - Assign Lesson Plan - Backend API (WIP Taariq)

Related PRS (if any):

This backend PR is related to the frontend PR for the UI integration.
To test this backend PR, you need to checkout the corresponding frontend PR.

Main changes explained:

  • Create models/educationTask.js for the schema defining assigned student tasks.
  • Create models/lessonPlanLog.js for the schema tracking assignment and edit history.
  • Create routes/educatorRouter.js for the /api/educator/assign-tasks endpoint (handles student eligibility and bulk task creation) and the /logs/:lessonPlanId endpoint.
  • Update routes.js to register the new /api/educator routes.

How to test:

  1. check into current branch
  2. do yarn install or npm install and start the local server
  3. log in as an admin or educator user on the frontend (using the related frontend branch)
  4. go to the Lesson Plan Builder page and trigger an assignment (manual or auto)
  5. verify the API returns a 200 success response with the correct assigned/skipped counts
  6. verify in the database (MongoDB) that new documents are created in the educationtasks and lessonplanlogs collections.

Screenshots or videos of changes:

Note:

Include the information the reviewers need to know.

@sonarqubecloud
Copy link

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