def _set_user_requirement_status(attempt, namespace, status, reason=None):
 checkpoint = None
 try:
  checkpoint = VerificationCheckpoint.objects.get(photo_verification=attempt)
 except VerificationCheckpoint.DoesNotExist:
  log.error('Unable to find checkpoint for user with id %d', attempt.user.id)
 if (checkpoint is not None):
  try:
   set_credit_requirement_status(attempt.user, checkpoint.course_id, namespace, checkpoint.checkpoint_location, status=status, reason=reason)
  except Exception:
   log.error('Unable to add Credit requirement status for user with id %d', attempt.user.id)

def _set_user_requirement_status ( attempt , namespace , status , reason = None ) : checkpoint = None try : checkpoint = VerificationCheckpoint . objects . get ( photo_verification = attempt ) except VerificationCheckpoint . DoesNotExist : log . error ( 'Unable to find checkpoint for user with id %d' , attempt . user . id ) if ( checkpoint is not None ) : try : set_credit_requirement_status ( attempt . user , checkpoint . course_id , namespace , checkpoint . checkpoint_location , status = status , reason = reason ) except Exception : log . error ( 'Unable to add Credit requirement status for user with id %d' , attempt . user . id )
sets the status of a credit requirement for the user .