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;
    }