public function getNumberOfAnswers($surveyId) {
        $fields['tokenCount'] = 'COUNT(DISTINCT gto_id_token)';
        $select               = $this->loader->getTracker()->getTokenSelect($fields)->andReceptionCodes([]);
        $select->forSurveyId($surveyId)
                ->onlySucces()
                ->onlyCompleted();
        $row                  = $select->fetchRow();
        return sprintf($this->_('Answered surveys: %d.'), $row['tokenCount']);
    }
public function getNumberOfAnswers($surveyId) {
        $fields['tokenCount'] = 'COUNT(DISTINCT gto_id_token)';
        $select               = $this->loader->getTracker()->getTokenSelect($fields)->andReceptionCodes([]);
        $select->forSurveyId($surveyId)
                ->onlySucces()
                ->onlyCompleted();
        $row                  = $select->fetchRow();
        return sprintf($this->_('Answered surveys: %d.'), $row['tokenCount']);
    }
public function getNumberOfAnswers ( $ surveyId ) { $ fields [ 'tokenCount' ] = 'COUNT(DISTINCT gto_id_token)' ; $ select = $ this -> loader -> getTracker ( ) -> getTokenSelect ( $ fields ) -> andReceptionCodes ( [ ] ) ; $ select -> forSurveyId ( $ surveyId ) -> onlySucces ( ) -> onlyCompleted ( ) ; $ row = $ select -> fetchRow ( ) ; return sprintf ( $ this -> _ ( 'Answered surveys: %d.' ) , $ row [ 'tokenCount' ] ) ; }
Gets the number of answers in a survey

@param $surveyId int Gems Survey ID
@return string translated string with number of answers
Gets the number of answers in a survey