-
Notifications
You must be signed in to change notification settings - Fork 2
feat: implement enrollment audit #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements enrollment audit functionality to record state transitions for learning path enrollments and allowed enrollments. Key changes include the introduction of the LearningPathEnrollmentAudit model and associated audit record creation in signal receivers, modifications in factories and tests to support audit data, and updates to requirements and admin configurations.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| requirements/*.txt | Update of common constraints URL and dependency removals |
| learning_paths/models.py | Addition of the enrollment audit model |
| learning_paths/receivers.py | Enhancement of signal receivers to create audit records |
| learning_paths/tests/* | New and updated tests to verify audit record creation |
| learning_paths/api/v1/views.py | Bulk enrollment API now sets audit data for both enrollments and allowed enrollments |
| learning_paths/admin.py | New inline admin configurations for viewing audit records |
| migrations/* | Database migration for the audit model and removal of historical models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements an enrollment audit feature to track state transitions during learner enrollment and unenrollment, and extends bulk enrollment/unenrollment API endpoints to support audit logging. Key changes include updates to requirements files for common constraints, creation of a new LearningPathEnrollmentAudit model with supporting tests and admin inlines, and modifications to signal receivers and API views to create audit records.
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| requirements/* | Updated constraint references and removed legacy django-simple-history pinning |
| learning_paths/models.py | Introduced LearningPathEnrollmentAudit model and updated related models |
| learning_paths/receivers.py | Added signal receivers and helper functions for audit record creation |
| learning_paths/api/v1/views.py | Extended bulk enroll/unenroll API endpoints to incorporate audit logging |
| learning_paths/tests/* | Added extensive tests to validate enrollment audit functionality |
| learning_paths/admin.py | Configured new admin inlines and admin registration for audit models |
| Makefile, CHANGELOG.rst, .github/workflows/ci.yml | Updated build and versioning files reflecting the new feature |
Comments suppressed due to low confidence (1)
learning_paths/api/v1/views.py:392
- Consider using django.utils.timezone.now() instead of datetime.now(timezone.utc) to maintain consistency with Django's timezone handling throughout the project.
enrollment.enrolled_at = datetime.now(timezone.utc)
98794d5 to
5844d05
Compare
5844d05 to
cd9bde3
Compare
cd9bde3 to
30eec4f
Compare
1. Allow specifying any text for the LP duration. 2. Support displaying time commitments.
c1a728a to
c0552bc
Compare
|
Merging to unblock the certificate criteria work. |
Added
Changed