protected function record_attempt(){
    $this->cfg['num_attempts'] = isset($this->cfg['num_attempts']) ?
      $this->cfg['num_attempts']+1 : 1;
    $this->_set_session('num_attempts', $this->cfg['num_attempts']);
    $this->save_session();
    return $this;
  }