original_string: public function checkTrackTokens($userId, \Gems_Tracker_Token $fromToken = null, \Gems_Tracker_Token $skipToken = null)
      {
          // Execute any defined functions
          $count = $this->handleTrackCalculation($userId);
  
          $engine = $this->getTrackEngine();
  
          $this->db->beginTransaction();
          // Check for validFrom and validUntil dates that have changed.
          if ($fromToken) {
              $count += $engine->checkTokensFrom($this, $fromToken, $userId, $skipToken);
          } elseif ($this->_checkStart) {
              $count += $engine->checkTokensFrom($this, $this->_checkStart, $userId);
          } else {
              $count += $engine->checkTokensFromStart($this, $userId);
          }
          $this->db->commit();
  
          // Update token completion count and possible enddate
          $this->_checkTrackCount($userId);
  
          return $count;
      }
code: public function checkTrackTokens($userId, \Gems_Tracker_Token $fromToken = null, \Gems_Tracker_Token $skipToken = null)
      {
          // Execute any defined functions
          $count = $this->handleTrackCalculation($userId);
  
          $engine = $this->getTrackEngine();
  
          $this->db->beginTransaction();
          // Check for validFrom and validUntil dates that have changed.
          if ($fromToken) {
              $count += $engine->checkTokensFrom($this, $fromToken, $userId, $skipToken);
          } elseif ($this->_checkStart) {
              $count += $engine->checkTokensFrom($this, $this->_checkStart, $userId);
          } else {
              $count += $engine->checkTokensFromStart($this, $userId);
          }
          $this->db->commit();
  
          // Update token completion count and possible enddate
          $this->_checkTrackCount($userId);
  
          return $count;
      }
code_tokens: public function checkTrackTokens ( $ userId , \ Gems_Tracker_Token $ fromToken = null , \ Gems_Tracker_Token $ skipToken = null ) { // Execute any defined functions $ count = $ this -> handleTrackCalculation ( $ userId ) ; $ engine = $ this -> getTrackEngine ( ) ; $ this -> db -> beginTransaction ( ) ; // Check for validFrom and validUntil dates that have changed. if ( $ fromToken ) { $ count += $ engine -> checkTokensFrom ( $ this , $ fromToken , $ userId , $ skipToken ) ; } elseif ( $ this -> _checkStart ) { $ count += $ engine -> checkTokensFrom ( $ this , $ this -> _checkStart , $ userId ) ; } else { $ count += $ engine -> checkTokensFromStart ( $ this , $ userId ) ; } $ this -> db -> commit ( ) ; // Update token completion count and possible enddate $ this -> _checkTrackCount ( $ userId ) ; return $ count ; }
docstring: Check this respondent track for changes to the tokens
  
  @param int $userId Id of the user who takes the action (for logging)
  @param \Gems_Tracker_Token $fromToken Optional token to start from
  @param \Gems_Tracker_Token $skipToken Optional token to skip in the recalculation when $fromToken is used
  @return int The number of tokens changed by this code
docstring_tokens: Check this respondent track for changes to the tokens