public function getNextUnansweredToken()
    {
        $tokenSelect = $this->tracker->getTokenSelect();
        $tokenSelect
                ->andReceptionCodes()
                // ->andRespondents()
                // ->andRespondentOrganizations()
                // ->andConsents
                ->andRounds(array())
                ->andSurveys(array())
                ->forRespondent($this->getRespondentId())
                ->forGroupId($this->getSurvey()->getGroupId())
                ->onlySucces()
                ->onlyValid()
                ->forWhere('gsu_active = 1')
                ->forWhere('gro_active = 1 OR gro_active IS NULL')
                ->order(array('gto_valid_from', 'gto_round_order'));

        $this->_addRelation($tokenSelect);

        if ($tokenData = $tokenSelect->fetchRow()) {
            return $this->tracker->getToken($tokenData);
        }
    }
public function getNextUnansweredToken()
    {
        $tokenSelect = $this->tracker->getTokenSelect();
        $tokenSelect
                ->andReceptionCodes()
                // ->andRespondents()
                // ->andRespondentOrganizations()
                // ->andConsents
                ->andRounds(array())
                ->andSurveys(array())
                ->forRespondent($this->getRespondentId())
                ->forGroupId($this->getSurvey()->getGroupId())
                ->onlySucces()
                ->onlyValid()
                ->forWhere('gsu_active = 1')
                ->forWhere('gro_active = 1 OR gro_active IS NULL')
                ->order(array('gto_valid_from', 'gto_round_order'));

        $this->_addRelation($tokenSelect);

        if ($tokenData = $tokenSelect->fetchRow()) {
            return $this->tracker->getToken($tokenData);
        }
    }
public function getNextUnansweredToken ( ) { $ tokenSelect = $ this -> tracker -> getTokenSelect ( ) ; $ tokenSelect -> andReceptionCodes ( ) // ->andRespondents() // ->andRespondentOrganizations() // ->andConsents -> andRounds ( array ( ) ) -> andSurveys ( array ( ) ) -> forRespondent ( $ this -> getRespondentId ( ) ) -> forGroupId ( $ this -> getSurvey ( ) -> getGroupId ( ) ) -> onlySucces ( ) -> onlyValid ( ) -> forWhere ( 'gsu_active = 1' ) -> forWhere ( 'gro_active = 1 OR gro_active IS NULL' ) -> order ( array ( 'gto_valid_from' , 'gto_round_order' ) ) ; $ this -> _addRelation ( $ tokenSelect ) ; if ( $ tokenData = $ tokenSelect -> fetchRow ( ) ) { return $ this -> tracker -> getToken ( $ tokenData ) ; } }
Returns the next unanswered token for the person answering this token

@return \Gems_Tracker_Token
Returns the next unanswered token for the person answering this token