def enrollment_mode_display(mode, verification_status, course_id):
 show_image = False
 image_alt = ''
 enrollment_title = ''
 enrollment_value = ''
 display_mode = _enrollment_mode_display(mode, verification_status, course_id)
 if (display_mode == DISPLAY_VERIFIED):
  if (verification_status in [VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED]):
   enrollment_title = _('Your verification is pending')
   enrollment_value = _('Verified: Pending Verification')
   show_image = True
   image_alt = _('ID verification pending')
  elif (verification_status == VERIFY_STATUS_APPROVED):
   enrollment_title = _("You're enrolled as a verified student")
   enrollment_value = _('Verified')
   show_image = True
   image_alt = _('ID Verified Ribbon/Badge')
 elif (display_mode == DISPLAY_HONOR):
  enrollment_title = _("You're enrolled as an honor code student")
  enrollment_value = _('Honor Code')
 elif (display_mode == DISPLAY_PROFESSIONAL):
  enrollment_title = _("You're enrolled as a professional education student")
  enrollment_value = _('Professional Ed')
 return {'enrollment_title': unicode(enrollment_title), 'enrollment_value': unicode(enrollment_value), 'show_image': show_image, 'image_alt': unicode(image_alt), 'display_mode': _enrollment_mode_display(mode, verification_status, course_id)}

def enrollment_mode_display ( mode , verification_status , course_id ) : show_image = False image_alt = '' enrollment_title = '' enrollment_value = '' display_mode = _enrollment_mode_display ( mode , verification_status , course_id ) if ( display_mode == DISPLAY_VERIFIED ) : if ( verification_status in [ VERIFY_STATUS_NEED_TO_VERIFY , VERIFY_STATUS_SUBMITTED ] ) : enrollment_title = _ ( 'Your verification is pending' ) enrollment_value = _ ( 'Verified: Pending Verification' ) show_image = True image_alt = _ ( 'ID verification pending' ) elif ( verification_status == VERIFY_STATUS_APPROVED ) : enrollment_title = _ ( "You're enrolled as a verified student" ) enrollment_value = _ ( 'Verified' ) show_image = True image_alt = _ ( 'ID Verified Ribbon/Badge' ) elif ( display_mode == DISPLAY_HONOR ) : enrollment_title = _ ( "You're enrolled as an honor code student" ) enrollment_value = _ ( 'Honor Code' ) elif ( display_mode == DISPLAY_PROFESSIONAL ) : enrollment_title = _ ( "You're enrolled as a professional education student" ) enrollment_value = _ ( 'Professional Ed' ) return { 'enrollment_title' : unicode ( enrollment_title ) , 'enrollment_value' : unicode ( enrollment_value ) , 'show_image' : show_image , 'image_alt' : unicode ( image_alt ) , 'display_mode' : _enrollment_mode_display ( mode , verification_status , course_id ) }
select appropriate display strings and css classes .