Skip to content

Commit

Permalink
Merge pull request #31529 from openedx/shahbaz/VAN-1236
Browse files Browse the repository at this point in the history
fix: Update enrollment email for master track learners
  • Loading branch information
shahbaz-shabbir05 authored Jan 16, 2023
2 parents 9a53e28 + 4797f2f commit b6a499e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion common/djangoapps/student/models/course_enrollment.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ def emit_event(self, event_name, enterprise_uuid=None):
self.course_overview.display_name,
self.course_overview.short_description,
self.course_overview.has_ended(),
course_pacing_type))
course_pacing_type,
self.mode))
segment_properties['email'] = self.user.email
# This next property is for an experiment, see method's comments for more information
segment_properties['external_course_updates'] = set_up_external_updates_for_enrollment(self.user,
Expand Down
3 changes: 2 additions & 1 deletion common/djangoapps/student/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@shared_task(bind=True, ignore_result=True)
def send_course_enrollment_email(
self, user_id, course_id, course_title, short_description, course_ended, pacing_type
self, user_id, course_id, course_title, short_description, course_ended, pacing_type, track_mode
):
"""
Send course enrollment email using Braze API.
Expand Down Expand Up @@ -69,6 +69,7 @@ def send_course_enrollment_email(
"learning_base_url": configuration_helpers.get_value(
"LEARNING_MICROFRONTEND_URL", settings.LEARNING_MICROFRONTEND_URL
),
"track_mode": track_mode
}

try:
Expand Down
2 changes: 2 additions & 0 deletions common/djangoapps/student/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def setUp(self):
"short_description": "Short description of course",
"course_ended": False,
"pacing_type": "self-paced",
"track_mode": "audit",
}

@staticmethod
Expand Down Expand Up @@ -129,6 +130,7 @@ def _get_canvas_properties(
"course_title": self.send_course_enrollment_email_kwargs["course_title"],
"short_description": self.send_course_enrollment_email_kwargs["short_description"],
"pacing_type": self.send_course_enrollment_email_kwargs["pacing_type"],
"track_mode": self.send_course_enrollment_email_kwargs["track_mode"],
}

if add_course_dates:
Expand Down

0 comments on commit b6a499e

Please sign in to comment.