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());
 }
 protected function appendChildren(DOMDocumentFragment $fragment, QtiComponent $component, $base = '')
 {
     parent::appendChildren($fragment, $component);
     $inputElt = $fragment->ownerDocument->createElement('input');
     $inputElt->setAttribute('type', 'radio');
     $fragment->firstChild->insertBefore($inputElt, $fragment->firstChild->firstChild);
 }
Esempio n. 3
0
 /**
  * @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()));
     }
 }
Esempio n. 4
0
 /**
  * @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');
 }
Esempio n. 7
0
 /**
  * @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');
 }