Skip to content

Conversation

@shashank-madan
Copy link
Contributor

@shashank-madan shashank-madan commented Nov 2, 2025

Description

image

Related PRS (if any):

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

Main changes explained:

  • Created new endpoints for assign-atoms
  • Added endpoint to get list of all atoms
  • Added studentAtoms model
  • Created necessary routers and controllers for new API routes

How to test:

  1. check into current branch
  2. do npm install, npm run build and npm start to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. go to http://localhost:5173/educationportal/assignatoms
  6. Click the Assign Atoms button
  7. Type in your user or select any user from the dropdown for student
  8. Select any number of atoms to be assigned to that student
  9. Add an optional note
  10. Click on submit and verify that you receive a success toast message.
  11. Additionally, the api endpont can also be tested through postman. Send a POST request to http://localhost:4500/api/educator/assign-atoms with body:
    {
    "studentId": "",
    "atomTypes": [""],
    "note": ""
    }

Screenshots or videos of changes:

assign_atoms.mp4

Note:

If testing using postman, make sure to add authorization with your access token. Also add valid atom ids and student ids in the body while sending the request.

@shashank-madan shashank-madan added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Nov 2, 2025
@shashank-madan shashank-madan changed the title Shashank madan assign atoms backend Shashank Madan – Assign Atoms Earned by Students (Backend) #1877 Nov 25, 2025
Anusha-Gali

This comment was marked as resolved.

Copy link

@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 Shashank,

I have reviewed your PR locally and the API responses do work as per requirement.
Screenshot 2026-01-21 at 6 17 49 PM
Screenshot 2026-01-21 at 6 18 00 PM

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

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants