def _update_course_context(request, context, course, platform_name):
 context['full_course_image_url'] = request.build_absolute_uri(course_image_url(course))
 course_title_from_cert = context['certificate_data'].get('course_title', '')
 accomplishment_copy_course_name = (course_title_from_cert if course_title_from_cert else course.display_name)
 context['accomplishment_copy_course_name'] = accomplishment_copy_course_name
 course_number = (course.display_coursenumber if course.display_coursenumber else course.number)
 context['course_number'] = course_number
 if context['organization_long_name']:
  context['accomplishment_copy_course_description'] = _('a course of study offered by {partner_short_name}, an online learning initiative of {partner_long_name}.').format(partner_short_name=context['organization_short_name'], partner_long_name=context['organization_long_name'], platform_name=platform_name)
 else:
  context['accomplishment_copy_course_description'] = _('a course of study offered by {partner_short_name}.').format(partner_short_name=context['organization_short_name'], platform_name=platform_name)

def _update_course_context ( request , context , course , platform_name ) : context [ 'full_course_image_url' ] = request . build_absolute_uri ( course_image_url ( course ) ) course_title_from_cert = context [ 'certificate_data' ] . get ( 'course_title' , '' ) accomplishment_copy_course_name = ( course_title_from_cert if course_title_from_cert else course . display_name ) context [ 'accomplishment_copy_course_name' ] = accomplishment_copy_course_name course_number = ( course . display_coursenumber if course . display_coursenumber else course . number ) context [ 'course_number' ] = course_number if context [ 'organization_long_name' ] : context [ 'accomplishment_copy_course_description' ] = _ ( 'a course of study offered by {partner_short_name}, an online learning initiative of {partner_long_name}.' ) . format ( partner_short_name = context [ 'organization_short_name' ] , partner_long_name = context [ 'organization_long_name' ] , platform_name = platform_name ) else : context [ 'accomplishment_copy_course_description' ] = _ ( 'a course of study offered by {partner_short_name}.' ) . format ( partner_short_name = context [ 'organization_short_name' ] , platform_name = platform_name )
updates context dictionary with course info .