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

programsRouter should support retrieval and updating of ParticipantActivities completion status #455

Closed rrabinovitch closed 1 year ago

rrabinovitch commented 1 year ago

Expected behaviour

There should be two programs router functions that return a participant activity's completed status and allow for the value of that attribute to be modified.

Details and resources

This ticket is associated with #454 and #457 in order to fulfill the product spec requirement for a user to be able to mark an activity as complete.

The two programsRouter functions should be something along the lines of:

The functions should take the following parameters: principal_id (corresponding to the user whose activity status is being tracked), program_id, and activity_id

__tests__/programsRouter.ts should also be updated to test these new router functions.

Checklist

rrabinovitch commented 1 year ago

Questions to discuss:

rrabinovitch commented 1 year ago

11/29 progress update: pseudocoded to plan code changes. will catch up on latest discussion in C4 channel tomorrow in order to further flesh out pseudocode and start translating it into code changes.

rrabinovitch commented 1 year ago

11/30 progress update: built out the getter function. tomorrow will continue with adding in necessary checks/error handling and following up with setter function

rrabinovitch commented 1 year ago

associated service function should only allow activities of type: assignment to have this attribute updated

per 12/1 discussion w @daveytech and @phoebehala, this check should only be taken care of on the webapp side (see #428)

rrabinovitch commented 1 year ago

12/1 progress update:

rrabinovitch commented 1 year ago

12/2 progress update:

seidior commented 1 year ago

Hi there! I've merged in the latest changes from main to bring this branch up to date, and I tried to answer as many questions as I could. I love the communication and coordination with the other tickets, and you've got a strong start so far!

I've also added a stub for the route to get a list of all program activities and their completed statuses, which should help with the feature y'all were proposing at the end of last week.

Sorry about any confusion in the miscommunication about which functions would be throwing errors versus returning differently-shaped values.

seidior commented 1 year ago

As per our discussion this morning, I've removed the stubs I added before to restrict scope for the backend tickets. Valuable feedback, thanks!

rrabinovitch commented 1 year ago

12/6 progress update:

rrabinovitch commented 1 year ago

12/7 progress update: