/** * @see \qtism\runtime\rendering\markup\xhtml\InteractionRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-blockInteraction'); $this->additionalClass('qti-gapMatchInteraction'); $fragment->firstChild->setAttribute('data-shuffle', $component->mustShuffle() === true ? 'true' : 'false'); }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-inlineInteraction'); $this->additionalClass('qti-endAttemptInteraction'); $fragment->firstChild->setAttribute('data-title', $component->getTitle()); }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-inlineInteraction'); $this->additionalClass('qti-inlineChoiceInteraction'); $fragment->firstChild->setAttribute('data-shuffle', $component->mustShuffle() === true ? 'true' : 'false'); $fragment->firstChild->setAttribute('data-required', $component->isRequired() === true ? 'true' : 'false'); }
/** * @see \qtism\runtime\rendering\markup\xhtml\InteractionRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-blockInteraction'); $this->additionalClass('qti-hottextInteraction'); $fragment->firstChild->setAttribute('data-max-choices', $component->getMaxChoices()); $fragment->firstChild->setAttribute('data-min-choices', $component->getMinChoices()); }
/** * @see \qtism\runtime\rendering\markup\xhtml\InteractionRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component); $this->additionalClass('qti-blockInteraction'); $this->additionalClass('qti-uploadInteraction'); if ($component->hasType() === true) { $fragment->firstChild->setAttribute('data-type', $component->getType()); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-blockInteraction'); $this->additionalClass('qti-choiceInteraction'); $fragment->firstChild->setAttribute('data-shuffle', $component->mustShuffle() === true ? 'true' : 'false'); $fragment->firstChild->setAttribute('data-max-choices', $component->getMaxChoices()); $fragment->firstChild->setAttribute('data-min-choices', $component->getMinChoices()); $fragment->firstChild->setAttribute('data-orientation', $component->getOrientation() === Orientation::VERTICAL ? 'vertical' : 'horizontal'); }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-positionObjectInteraction'); $fragment->firstChild->setAttribute('data-max-choices', $component->getMaxChoices()); if ($component->hasMinChoices() === true) { $fragment->firstChild->setAttribute('data-min-choices', $component->getMinChoices()); } if ($component->hasCenterPoint() === true) { $fragment->firstChild->setAttribute('data-center-point', $component->getCenterPoint()->getX() . " " . $component->getCenterPoint()->getY()); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-blockInteraction'); $this->additionalClass('qti-sliderInteraction'); $this->additionalClass($component->getOrientation() === Orientation::HORIZONTAL ? 'qti-horizontal' : 'qti-vertical'); $fragment->firstChild->setAttribute('data-lower-bound', $component->getLowerBound()); $fragment->firstChild->setAttribute('data-upper-bound', $component->getUpperBound()); $fragment->firstChild->setAttribute('data-step-label', $component->mustStepLabel() === true ? 'true' : 'false'); $fragment->firstChild->setAttribute('data-orientation', $component->getOrientation() === Orientation::VERTICAL ? 'vertical' : 'horizontal'); $fragment->firstChild->setAttribute('data-reverse', $component->mustReverse() === true ? 'true' : 'false'); if ($component->hasStep() === true) { $fragment->firstChild->setAttribute('data-step', $component->getStep()); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\InteractionRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-stringInteraction'); $fragment->firstChild->setAttribute('data-base', $component->getBase()); if ($component->hasStringIdentifier() === true) { $fragment->firstChild->setAttribute('data-string-identifier', $component->getStringIdentifier()); } if ($component->hasExpectedLength() === true) { $fragment->firstChild->setAttribute('data-expected-length', $component->getExpectedLength()); } if ($component->hasPatternMask() === true) { $fragment->firstChild->setAttribute('data-pattern-mask', $component->getPatternMask()); } if ($component->hasPlaceholderText() === true) { $fragment->firstChild->setAttribute('data-placeholder-text', $component->getPlaceholderText()); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\InteractionRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-blockInteraction'); $this->additionalClass('qti-mediaInteraction'); $fragment->firstChild->setAttribute('data-autostart', $component->mustAutostart() === true ? 'true' : 'false'); $fragment->firstChild->setAttribute('data-min-plays', $component->getMinPlays()); $fragment->firstChild->setAttribute('data-max-plays', $component->getMaxPlays()); $fragment->firstChild->setAttribute('data-loop', $component->mustLoop() === true ? 'true' : 'false'); }
/** * @see \qtism\runtime\rendering\markup\xhtml\InteractionRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-blockInteraction'); $this->additionalClass('qti-drawingInteraction'); }