Short description of method toQTI

@access public
@author Cedric Alfonsi, <cedric.alfonsi@tudor.lu>
@return string
497760
public function toQTI(){

        $returnValue = '';

        if($this->uri != self::NONE){
            //if there is actually a real response template involved, render the template
            $tplRenderer = new taoItems_models_classes_TemplateRenderer(static::getTemplatePath().'/qti.rptemplate.tpl.php', array('uri' => $this->uri));
            $returnValue = $tplRenderer->render();
        }

        return (string) $returnValue;
    }
611626
public function toString()
    {
        $sb = 'Criteria:';
        try {

            $params = [];
            $sb .= "\nSQL (may not be complete): ".$this->createSelectSql($params);

            $sb .= "\nParams: ";
            $paramstr = [];
            foreach ($params as $param) {
                $paramstr[] = $param['table'] . '.' . $param['column'] . ' => ' . var_export($param['value'], true);
            }
            $sb .= implode(', ', $paramstr);

        } catch (\Exception $exc) {
            $sb .= '(Error: ' . $exc->getMessage() . ')';
        }

        return $sb;
    }
1200174
public static function getTemplateQti(){
        if(empty(static::$qtiTagName)){
            throw new QtiModelException('The element has no tag name defined : '.get_called_class());
        }
        $template = static::getTemplatePath().'/qti.'.static::$qtiTagName.'.tpl.php';
        if(!file_exists($template)){
            $template = static::getTemplatePath().'/qti.element.tpl.php';
        }

        return $template;
    }
1125371
public function toString()
    {
        $arguments = $this->getIterator();
        $params = array();
        $optionals = array();
        foreach ($arguments as $argument) {
            if ($argument->isOptional()) {
                $optionals[] = $argument->toString();
            } else {
                $params[] = $argument->toString();
            }
        }

        return implode(', ', array_merge($params, $optionals));
    }
220974
public function toINI()
    {
        $smBody = str_replace("\n", chr(6), $this->smbody);

        $ini = '';
        $ini .= "dstaddr={$this->dstaddr}\n";
        $ini .= "smbody={$smBody}\n";
        if (!empty($this->dlvtime)) {
            $ini .= "dlvtime={$this->dlvtime}\n";
        }
        if (!empty($this->vldtime)) {
            $ini .= "vldtime={$this->vldtime}\n";
        }
        if (!empty($this->response)) {
            $ini .= "response={$this->response}\n";
        }

        return $ini;
    }
235424
public function getQueryLimit()
    {
        if ($this->limit !== null && $this->offset !== null) {
            return 'LIMIT ' . $this->offset . ', ' . $this->limit;
        } else {
            if (null !== $this->limit) {
                return 'LIMIT ' . $this->limit;
            } else {
                return '';
            }
        }
    }
887215
public function getCompositionQTI()
    {
        $returnValue = (string) '';

        $returnValue .= '<setOutcomeValue identifier="'.$this->outcomeIdentifier.'"><sum>';
        foreach ($this->components as $irp) {
        	$returnValue .= '<variable identifier="'.$irp->getOutcome()->getIdentifier().'" />';
        }
        $returnValue .= '</sum></setOutcomeValue>';

        return (string) $returnValue;
    }
991728
public function toString()
    {
        $constraints = [];
        foreach ($this->constraints as $name=>$constraint) {
            $constraints[] = "$constraint";
        }
        return implode($this->toStringSeparator, $constraints);
    }
1290720
public function toScript()
    {
        $script = "(";
        $first = true;
        foreach ($this->getCriteria() as $c) {
            $script .= $first ? "" :  " {$this->getLogicalOperator()} ";
            $script .= $c->toScript();
            $first = false;
        }
        $script .= ")";
        return $script;
    }
1263480
final protected function siID() {return $this->siEx(
		$this->transIDLabel(), $this->m()->tidFormat($this->tm()->tReq(), true)
	);}
279410
final protected function ci() {return dfc($this, function() {return
		/** @var C $c */ /** @var string $id */ /** @var array(string => mixed) $ci */
		!($c = $this->c()) || !($id = $this->ciId()) || !($ci = df_ci_get($this->m(), $c))
			? [] : dfa($ci, $id)
	;});}
713116
public function toQTI(){

        $template = static::getTemplateQti();
        $variables = $this->getTemplateQtiVariables();
        if(isset($variables['attributes'])){
            $variables['attributes'] = $this->xmlizeOptions($variables['attributes'], true);
        }
        $tplRenderer = new taoItems_models_classes_TemplateRenderer($template, $variables);
        $returnValue = $tplRenderer->render();

        return (string) $returnValue;
    }
315755
public function get_qt_data() {
        $result = array();
        foreach ($this->data as $name => $value) {
            if ($name[0] != '-' && $name[0] != ':') {
                $result[$name] = $value;
            }
        }
        return $result;
    }
91908
public function getRule(){
        $returnValue = (string) '';


        if($this->uri == self::MATCH_CORRECT){
            $returnValue = taoQTI_models_classes_Matching_Matching::MATCH_CORRECT;
        }else if($this->uri == self::MAP_RESPONSE){
            $returnValue = taoQTI_models_classes_Matching_Matching::MAP_RESPONSE;
        }else if($this->uri == self::MAP_RESPONSE_POINT){
            $returnValue = taoQTI_models_classes_Matching_Matching::MAP_RESPONSE_POINT;
        }



        return (string) $returnValue;
    }
1058444
public function getFQN()
    {
        if (empty($this->namespaceId) || empty($this->name))
            return "";

        return sprintf("%s:%s", $this->namespaceId, $this->name);
    }
1113743
public function toString()
    {
        $driver = $this->getDriver();
        $prefix = $driver->getTablePrefix();
        $query  = 'DELETE';

        if($this->table && $this->join) {
            $query .= ' '.$driver->quoteIdentifier(!is_numeric(key($this->table)) ? key($this->table) : current($this->table));
        }

        if($this->table) {
            $query .= ' FROM '.$driver->quoteIdentifier($prefix.current($this->table).(!is_numeric(key($this->table)) ? ' AS '.key($this->table) : ''));
        }

        if($this->join)
        {
            $joins = array();
            foreach($this->join as $alias => $join)
            {
                $tmp = '';

                if($join['type']) {
                    $tmp .= ' '.$join['type'];
                }

                if($join['table'] instanceof DatabaseQuerySelect) {
                    $tmp .= ' JOIN ('.$join['table'].')'.(is_string($alias) ? ' AS '.$driver->quoteIdentifier($alias) : '');
                } else {
                    $tmp .= ' JOIN '.$driver->quoteIdentifier($prefix.$join['table'].(is_string($alias) ? ' AS '.$alias : ''));
                }

                if($join['condition']) {
                    $tmp .= ' ON ('.$driver->quoteIdentifier($join['condition']).')';
                }

                $joins[] = $tmp;
            }

            $query .= implode('', $joins);
        }

        if($this->where)
        {
            $query .= ' WHERE';

            foreach($this->where as $where)
            {
                if(!empty($where['combination'])) {
                    $query .= ' '.$where['combination'];
                }

                $query .= ' '.$driver->quoteIdentifier($where['condition']);
            }
        }

        if($this->order)
        {
            $query .= ' ORDER BY ';

            $list = array();
            foreach($this->order as $order) {
                $list[] = $driver->quoteIdentifier($order['column']).' '.$order['direction'];
            }

            $query .= implode(' , ', $list);
        }

        if($this->limit) {
            $query .= ' LIMIT '.$this->offset.' , '.$this->limit;
        }

        if($this->_parameters) {
            $query = $this->_replaceParams($query);
        }

        return $query;
    }
1252807
public function toString() {
		$output = $this->getStatusLine() . "\r\n";
		foreach ($this->getHeaders() as $header) {
			$output .= $header . "\r\n";
		}
		$output .= "\r\n";
		$output .= $this->getBody();
		return $output;
	}