Skip to content

Commit

Permalink
fix: unenrolled default intentions not realizable
Browse files Browse the repository at this point in the history
The default enrollment ``learner_status`` view now considers intended courses from which the requested user has unenrolled as no-longer realizable.
ENT-9839
  • Loading branch information
iloveagent57 committed Dec 10, 2024
1 parent 7ca0731 commit c9ad71e
Show file tree
Hide file tree
Showing 5 changed files with 756 additions and 694 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Unreleased
----------
* nothing unreleased

[5.4.1]
--------
* fix: The default enrollment ``learner_status`` view now considers intended courses
from which the requested user has unenrolled as no-longer realizable.

[5.4.0]
--------
* chore: Update python requirements.
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "5.4.0"
__version__ = "5.4.1"
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 c9ad71e

Please sign in to comment.