def _create_recent_enrollment_message(course_enrollments, course_modes):
 recently_enrolled_courses = _get_recently_enrolled_courses(course_enrollments)
 if recently_enrolled_courses:
  enroll_messages = [{'course_id': enrollment.course_overview.id, 'course_name': enrollment.course_overview.display_name, 'allow_donation': _allow_donation(course_modes, enrollment.course_overview.id, enrollment)} for enrollment in recently_enrolled_courses]
  platform_name = configuration_helpers.get_value('platform_name', settings.PLATFORM_NAME)
  return render_to_string('enrollment/course_enrollment_message.html', {'course_enrollment_messages': enroll_messages, 'platform_name': platform_name})

def _create_recent_enrollment_message ( course_enrollments , course_modes ) : recently_enrolled_courses = _get_recently_enrolled_courses ( course_enrollments ) if recently_enrolled_courses : enroll_messages = [ { 'course_id' : enrollment . course_overview . id , 'course_name' : enrollment . course_overview . display_name , 'allow_donation' : _allow_donation ( course_modes , enrollment . course_overview . id , enrollment ) } for enrollment in recently_enrolled_courses ] platform_name = configuration_helpers . get_value ( 'platform_name' , settings . PLATFORM_NAME ) return render_to_string ( 'enrollment/course_enrollment_message.html' , { 'course_enrollment_messages' : enroll_messages , 'platform_name' : platform_name } )
builds a recent course enrollment message .