protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-gapChoice'); $fragment->firstChild->setAttribute('data-match-max', $component->getMatchMax()); $fragment->firstChild->setAttribute('data-match-min', $component->getMatchMin()); }
/** * @see \qtism\runtime\rendering\markup\xhtml\ChoiceRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-gap'); $fragment->firstChild->setAttribute('data-required', $component->isRequired() === true ? 'true' : 'false'); if (count($component->getMatchGroup()) > 0) { $fragment->firstChild->setAttribute('data-match-group', implode(' ', $component->getMatchGroup()->getArrayCopy())); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\ChoiceRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-hotspot'); $fragment->firstChild->setAttribute('data-shape', Shape::getNameByConstant($component->getShape())); $fragment->firstChild->setAttribute('data-coords', $component->getCoords()->__toString()); if ($component->hasHotspotLabel() === true) { $fragment->firstChild->setAttribute('data-hotspot-label', $component->getHotspotLabel()); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\ChoiceRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-simpleAssociableChoice'); $fragment->firstChild->setAttribute('data-match-max', $component->getMatchMax()); $fragment->firstChild->setAttribute('data-match-min', $component->getMatchMin()); if (count($component->getMatchGroup()) > 0) { $fragment->firstChild->setAttribute('data-match-group', implode(' ', $component->getMatchGroup()->getArrayCopy())); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $fragment->firstChild->setAttribute('value', $component->getIdentifier()); $this->additionalClass('qti-inlineChoice'); }
/** * @see \qtism\runtime\rendering\markup\xhtml\ChoiceRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-hottext'); }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-gap'); $fragment->firstChild->setAttribute('data-required', $component->isRequired() === true ? 'true' : 'false'); }