def _update_organization_context(context, course):
 (partner_long_name, organization_logo) = (None, None)
 partner_short_name = (course.display_organization if course.display_organization else course.org)
 organizations = organization_api.get_course_organizations(course_id=course.id)
 if organizations:
  organization = organizations[0]
  partner_long_name = organization.get('name', partner_long_name)
  partner_short_name = organization.get('short_name', partner_short_name)
  organization_logo = organization.get('logo', None)
 context['organization_long_name'] = partner_long_name
 context['organization_short_name'] = partner_short_name
 context['accomplishment_copy_course_org'] = partner_short_name
 context['organization_logo'] = organization_logo

def _update_organization_context ( context , course ) : ( partner_long_name , organization_logo ) = ( None , None ) partner_short_name = ( course . display_organization if course . display_organization else course . org ) organizations = organization_api . get_course_organizations ( course_id = course . id ) if organizations : organization = organizations [ 0 ] partner_long_name = organization . get ( 'name' , partner_long_name ) partner_short_name = organization . get ( 'short_name' , partner_short_name ) organization_logo = organization . get ( 'logo' , None ) context [ 'organization_long_name' ] = partner_long_name context [ 'organization_short_name' ] = partner_short_name context [ 'accomplishment_copy_course_org' ] = partner_short_name context [ 'organization_logo' ] = organization_logo
updates context with organization related info .