Skip to content

Commit

Permalink
fix: unenrolled defaults are now not enrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveagent57 committed Dec 10, 2024
1 parent 7ca0731 commit 61bb513
Show file tree
Hide file tree
Showing 3 changed files with 769 additions and 43 deletions.
6 changes: 6 additions & 0 deletions enterprise/api/v1/views/default_enterprise_enrollments.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ def _partition_default_enrollment_intentions_by_enrollment_status(
already_enrolled.append((intention, non_audit_enrollment))
continue

if non_audit_enrollment and non_audit_enrollment.unenrolled:
# Learner has un-enrolledin non-audit mode for this course run,
# so don't consider this as an enrollable intention
needs_enrollment_not_enrollable.append((intention, non_audit_enrollment))
continue

if not intention.is_course_run_enrollable:
# Course run is not enrollable
needs_enrollment_not_enrollable.append((intention, audit_enrollment))
Expand Down
Loading

0 comments on commit 61bb513

Please sign in to comment.