feat: add more verbose logging around force_enrollment

After testing the enterprise bulk enrollment flow with
force_enrollment=True, I'm finding that the enrollment is still not
forced. This extra logging will hopefully help shed light on where this
boolean might be accidentally ignored.
This commit is contained in:
Troy Sankey
2024-04-15 08:21:35 -07:00
parent 0270809808
commit f30ae71c23
2 changed files with 5 additions and 3 deletions

View File

@@ -133,12 +133,13 @@ def lms_update_or_create_enrollment(
except (CourseEnrollmentError, CourseEnrollmentNotUpdatableError) as error:
log.exception(
"Raising error [%s] for user "
"[%s]: course run = [%s], enterprise_uuid = [%s], is_active = [%s], ",
"[%s]: course run = [%s], enterprise_uuid = [%s], is_active = [%s], force_enrollment = [%s], ",
error,
username,
course_id,
str(enterprise_uuid),
is_active,
force_enrollment,
)
raise error
finally: