/** * @see \qtism\runtime\rendering\markup\xhtml\BodyElementRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); if ($component->hasCite() === true) { $fragment->firstChild->setAttribute('cite', $this->transformUri($component->getCite(), $base)); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-rubricBlock'); $dataView = array(); if ($component->getViews()->contains(View::AUTHOR)) { $this->additionalClass('qti-view-author'); $dataView[] = 'author'; } if ($component->getViews()->contains(View::CANDIDATE)) { $this->additionalClass('qti-view-candidate'); $dataView[] = 'candidate'; } if ($component->getViews()->contains(View::PROCTOR)) { $this->additionalClass('qti-view-proctor'); $dataView[] = 'proctor'; } if ($component->getViews()->contains(View::SCORER)) { $this->additionalClass('qti-view-scorer'); $dataView[] = 'scorer'; } if ($component->getViews()->contains(View::TEST_CONSTRUCTOR)) { $this->additionClass('qti-view-testConstructor'); $dataView[] = 'testConstructor'; } if ($component->getViews()->contains(View::TUTOR)) { $this->additionalClass('qti-view-tutor'); $dataView[] = 'tutor'; } $fragment->firstChild->setAttribute('data-view', implode(" ", $dataView)); }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); if ($component->hasSummary() === true) { $fragment->firstChild->setAttribute('summary', $component->getSummary()); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-feedbackElement'); $fragment->firstChild->setAttribute('data-outcome-identifier', $component->getOutcomeIdentifier()); $fragment->firstChild->setAttribute('data-show-hide', ShowHide::getNameByConstant($component->getShowHide())); $fragment->firstChild->setAttribute('data-identifier', $component->getIdentifier()); if ($this->getRenderingEngine()->getFeedbackShowHidePolicy() === XhtmlRenderingEngine::CONTEXT_STATIC) { $this->additionalClass($component->getShowHide() === ShowHide::SHOW ? 'qti-hide' : 'qti-show'); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-choice'); $fragment->firstChild->setAttribute('data-identifier', $component->getIdentifier()); $fragment->firstChild->setAttribute('data-fixed', $component->isFixed() === true ? 'true' : 'false'); if ($component->hasTemplateIdentifier() === true) { $this->additionalClass($component->getShowHide() === ShowHide::SHOW ? 'qti-hide' : 'qti-show'); $fragment->firstChild->setAttribute('data-template-identifier', $component->getTemplateIdentifier()); $fragment->firstChild->setAttribute('data-show-hide', $component->getShowHide() === ShowHide::SHOW ? 'show' : 'hide'); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\BodyElementRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $fragment->firstChild->setAttribute('data', $this->transformUri($component->getData(), $base)); $fragment->firstChild->setAttribute('type', $component->getType()); if ($component->hasWidth() === true) { $fragment->firstChild->setAttribute('width', $component->getWidth()); } if ($component->hasHeight() === true) { $fragment->firstChild->setAttribute('height', $component->getHeight()); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\BodyElementRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $fragment->firstChild->setAttribute('src', $this->transformUri($component->getSrc(), $base)); $fragment->firstChild->setAttribute('alt', $component->getAlt()); if ($component->hasLongdesc() === true) { $fragment->firstChild->setAttribute('longdesc', $this->transformUri($component->getLongdesc(), $base)); } if ($component->hasHeight() === true) { $fragment->firstChild->setAttribute('height', $component->getHeight()); } if ($component->hasWidth() === true) { $fragment->firstChild->setAttribute('width', $component->getWidth()); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\BodyElementRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-printedVariable'); $fragment->firstChild->setAttribute('data-identifier', $component->getIdentifier()); if ($component->hasFormat() === true) { $fragment->firstChild->setAttribute('data-format', $component->getFormat()); } $fragment->firstChild->setAttribute('data-power-form', $component->mustPowerForm() === true ? 'true' : 'false'); $fragment->firstChild->setAttribute('data-base', $component->getBase()); if ($component->hasIndex() === true) { $fragment->firstChild->setAttribute('data-index', $component->getIndex()); } $fragment->firstChild->setAttribute('data-delimiter', $component->getDelimiter()); if ($component->hasField() === true) { $fragment->firstChild->setAttribute('data-field', $component->getField()); } $fragment->firstChild->setAttribute('data-mapping-indicator', $component->getMappingIndicator()); }
/** * @see \qtism\runtime\rendering\markup\xhtml\BodyElementRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); if ($component->hasHeaders() === true) { $fragment->firstChild->setAttribute('headers', implode(" ", $component->getHeaders()->getArrayCopy())); } if ($component->hasScope() === true) { $fragment->firstChild->setAttribute('scope', TableCellScope::getNameByConstant($component->getScope())); } if ($component->hasAbbr() === true) { $fragment->firstChild->setAttribute('abbr', $component->getAbbr()); } if ($component->hasAxis() === true) { $fragment->firstChild->setAttribute('axis', $component->getAxis()); } if ($component->hasRowspan() === true) { $fragment->firstChild->setAttribute('rowspan', $component->getRowspan()); } if ($component->hasColspan() === true) { $fragment->firstChild->setAttribute('colspan', $component->getColspan()); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-itemBody'); }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $fragment->firstChild->setAttribute('data-response-identifier', $component->getResponseIdentifier()); }
/** * @see \qtism\runtime\rendering\markup\xhtml\BodyElementRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $fragment->firstChild->setAttribute('span', $component->getSpan()); }