OpenTree-Education / rhizone-lms

A learning management system focused on self-reflection.
https://rhi.zone
BSD 3-Clause Clear License
14 stars 7 forks source link

Implement functionality for the POST/assessments/curriculum route and accompanying service file functions #570

Closed Awatanka closed 1 year ago

Awatanka commented 1 year ago

Describe the Feature / Enhancement

The POST assessments/curriculum route needs to be implemented and fully tested. ThePOST /assessments/curriculum creates a new CurriculumAssessment in the curriculum_assessments table, linked with a given curriculum activity.

There needs to be a test coverage for POST assessments/curriculum route and the service file functions it needs. We need to test this route to ensure the code written for the test will behave as expected by the protocol we previously defined.

This issue continues the work from issue #515

Additional Details and Resources

This route requires the principal ID (the user ID) from the session information. The only person with a Facilitator role should be able to create a curriculum assessment.

Facilitator res.status(201).json(itemEnvelope(curriculumAssessment)

Participant This should return an UnauthorizedError. Participants shouldn't have access to this route.

Correct Project Selected

Labels

Awatanka commented 1 year ago

EOD: wrote and improved the function for post route; tested route with Postman;

Plan for tomorrow: write a test for the service function and the route (I will try to finish before the morning stand-up);