feat: sync Last Attended Date with Canvas via API #193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sync Last Attended Date with Canvas via API
Many institutions, including mine, are required to track the Last Attended Date for reasons such as Census reporting, Financial Aid compliance, and tracking withdrawals or drops. Currently, the only way to retrieve this information from Roll Call is by generating a report.
This update automates the process by allowing the Last Attended Date field in Canvas to be updated in real-time via the API as instructors record attendance in the Roll Call Attendance app.
Changes Include:
StudentCourseStatsto calculate the last attended date and include it in thestatsmethod.last_attended_datemethod to calculate the last attended date.StatusesControllerto sync the Last Attended Date with Canvas automatically when attendance is recorded:handle_last_attended_datemethod to process attendance status changes and determine when updates are required.update_last_attended_datemethod to calculate and submit the most recent attendance date.submit_last_attended_datemethod to make a Canvas API call and update the Last Attended Date field.This enhancement allows institutions using the Roll Call Attendance app to automate the retrieval of the Last Attended Date using the Canvas API (
GET /api/v1/courses/:course_id/enrollments).Benefits:
Testing:
As a Canvas LMS Administrator and wannabe web developer, I see this as a valuable enhancement for schools looking to automate attendance tracking. This is my first-ever pull request, so I'm happy to make any adjustments based on feedback!