Skip to content

Conversation

@Agrendalath
Copy link
Member

@Agrendalath Agrendalath commented May 27, 2025

Added

  • Bulk unenrollment API.
  • Enrollment audit model that tracks the enrollment state transitions.
  • Allow specifying time commitment.
  • Allow duplicating Learning Paths in the Django admin interface.

Changed

  • The Learning Paths API includes start and end dates for its steps.
  • Return enrollment date in the API instead of a boolean.
  • Allow specifying any text for the duration.
  • Make the skill level optional.

@Agrendalath Agrendalath requested a review from Copilot May 27, 2025 11:54
@Agrendalath Agrendalath self-assigned this May 27, 2025
Copy link

Copilot AI left a 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

@Agrendalath Agrendalath requested a review from Copilot May 28, 2025 01:41
Copy link

Copilot AI left a 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)

@Agrendalath Agrendalath force-pushed the agrendalath/enrollment-audit branch from 98794d5 to 5844d05 Compare June 12, 2025 17:59
@Agrendalath Agrendalath force-pushed the agrendalath/enrollment-audit branch from 5844d05 to cd9bde3 Compare July 7, 2025 12:40
@Agrendalath Agrendalath force-pushed the agrendalath/enrollment-audit branch from cd9bde3 to 30eec4f Compare July 14, 2025 13:00
@Agrendalath Agrendalath force-pushed the agrendalath/enrollment-audit branch from c1a728a to c0552bc Compare August 2, 2025 21:38
@Agrendalath
Copy link
Member Author

Merging to unblock the certificate criteria work.

@Agrendalath Agrendalath merged commit 1c3ead7 into main Aug 2, 2025
14 checks passed
@Agrendalath Agrendalath deleted the agrendalath/enrollment-audit branch August 2, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants