Skip to content

Sphurthy merged 1813 2098#2145

Open
sphurthy wants to merge 26 commits intodevelopmentfrom
sphurthy-merged-1813-2098
Open

Sphurthy merged 1813 2098#2145
sphurthy wants to merge 26 commits intodevelopmentfrom
sphurthy-merged-1813-2098

Conversation

@sphurthy
Copy link
Copy Markdown

@sphurthy sphurthy commented Apr 1, 2026

Description

This PR is a merged PR of #1813 and #2098

Related PRS (if any):

To test this backend PR you need to checkout the #4978 frontend PR.

Main changes explained:

  • POST /api/educator/assign-tasks: Bulk-creates student work from a lesson plan’s sub-tasks for eligible profiles, supports manual vs auto-assignment flags, writes LessonPlanLog entries, and returns assignment/skip counts (educatorRouter + EducationTask / LessonPlan as applicable).
  • GET /api/educator/logs/:lessonPlanId: Returns assignment/edit history for a lesson plan, with editor populated for display.
  • POST /api/educator/assign-atoms: Maps to the atom-based assignment handler in educatorController (activities → atom task templates, enrolled students, prerequisite checks, EducationTask + Progress updates inside a MongoDB session/transaction). Request body uses snake_case fields such as lesson_plan_id, assignment_date, deadline_offset_days.

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. Log in as admin/educator; open /educationportal/LessonPlans.
  5. Manual assign: “Assign Lesson Plan” → confirm → check notifications and network POST …/educator/assign-tasks (200 + counts).
  6. Auto assign: “Save Lesson Plan” → confirm auto-assigned status text and successful API call.
  7. Confirm log table refreshes from GET …/educator/logs/:lessonPlanId.

Screenshots or videos of changes:

1

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Sphurthy,

I have reviewed your PR locally and the API's work as per requirement. However please have a look in the frontend as there are many UI issues mentioned : OneCommunityGlobal/HighestGoodNetworkApp#4978 (review)

Image Image Image Image Image

@sonarqubecloud
Copy link
Copy Markdown

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.

3 participants