def _get_course_email_context(course):
 course_id = course.id.to_deprecated_string()
 course_title = course.display_name
 course_end_date = get_default_time_display(course.end)
 course_root = reverse('course_root', kwargs={'course_id': course_id})
 course_url = '{}{}'.format(settings.LMS_ROOT_URL, course_root)
 image_url = u'{}{}'.format(settings.LMS_ROOT_URL, course_image_url(course))
 email_context = {'course_title': course_title, 'course_root': course_root, 'course_url': course_url, 'course_image_url': image_url, 'course_end_date': course_end_date, 'account_settings_url': '{}{}'.format(settings.LMS_ROOT_URL, reverse('account_settings')), 'email_settings_url': '{}{}'.format(settings.LMS_ROOT_URL, reverse('dashboard')), 'platform_name': configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME)}
 return email_context

def _get_course_email_context ( course ) : course_id = course . id . to_deprecated_string ( ) course_title = course . display_name course_end_date = get_default_time_display ( course . end ) course_root = reverse ( 'course_root' , kwargs = { 'course_id' : course_id } ) course_url = '{}{}' . format ( settings . LMS_ROOT_URL , course_root ) image_url = u'{}{}' . format ( settings . LMS_ROOT_URL , course_image_url ( course ) ) email_context = { 'course_title' : course_title , 'course_root' : course_root , 'course_url' : course_url , 'course_image_url' : image_url , 'course_end_date' : course_end_date , 'account_settings_url' : '{}{}' . format ( settings . LMS_ROOT_URL , reverse ( 'account_settings' ) ) , 'email_settings_url' : '{}{}' . format ( settings . LMS_ROOT_URL , reverse ( 'dashboard' ) ) , 'platform_name' : configuration_helpers . get_value ( 'PLATFORM_NAME' , settings . PLATFORM_NAME ) } return email_context
returns context arguments to apply to all emails .