def _enrollment_mode_display(enrollment_mode, verification_status, course_id):
 course_mode_slugs = [mode.slug for mode in CourseMode.modes_for_course(course_id)]
 if (enrollment_mode == CourseMode.VERIFIED):
  if (verification_status in [VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED, VERIFY_STATUS_APPROVED]):
   display_mode = DISPLAY_VERIFIED
  elif (DISPLAY_HONOR in course_mode_slugs):
   display_mode = DISPLAY_HONOR
  else:
   display_mode = DISPLAY_AUDIT
 elif (enrollment_mode in [CourseMode.PROFESSIONAL, CourseMode.NO_ID_PROFESSIONAL_MODE]):
  display_mode = DISPLAY_PROFESSIONAL
 else:
  display_mode = enrollment_mode
 return display_mode

def _enrollment_mode_display ( enrollment_mode , verification_status , course_id ) : course_mode_slugs = [ mode . slug for mode in CourseMode . modes_for_course ( course_id ) ] if ( enrollment_mode == CourseMode . VERIFIED ) : if ( verification_status in [ VERIFY_STATUS_NEED_TO_VERIFY , VERIFY_STATUS_SUBMITTED , VERIFY_STATUS_APPROVED ] ) : display_mode = DISPLAY_VERIFIED elif ( DISPLAY_HONOR in course_mode_slugs ) : display_mode = DISPLAY_HONOR else : display_mode = DISPLAY_AUDIT elif ( enrollment_mode in [ CourseMode . PROFESSIONAL , CourseMode . NO_ID_PROFESSIONAL_MODE ] ) : display_mode = DISPLAY_PROFESSIONAL else : display_mode = enrollment_mode return display_mode
checking enrollment mode and status and returns the display mode args: enrollment_mode : enrollment mode .