def check_start_date(user, days_early_for_beta, start, course_key):
 start_dates_disabled = settings.FEATURES['DISABLE_START_DATES']
 if (start_dates_disabled and (not is_masquerading_as_student(user, course_key))):
  return ACCESS_GRANTED
 else:
  now = datetime.now(UTC())
  if ((start is None) or in_preview_mode()):
   return ACCESS_GRANTED
  effective_start = adjust_start_date(user, days_early_for_beta, start, course_key)
  if (now > effective_start):
   return ACCESS_GRANTED
  return StartDateError(start)

def check_start_date ( user , days_early_for_beta , start , course_key ) : start_dates_disabled = settings . FEATURES [ 'DISABLE_START_DATES' ] if ( start_dates_disabled and ( not is_masquerading_as_student ( user , course_key ) ) ) : return ACCESS_GRANTED else : now = datetime . now ( UTC ( ) ) if ( ( start is None ) or in_preview_mode ( ) ) : return ACCESS_GRANTED effective_start = adjust_start_date ( user , days_early_for_beta , start , course_key ) if ( now > effective_start ) : return ACCESS_GRANTED return StartDateError ( start )
verifies whether the given user is allowed access given the start date and the beta offset for the given course .