private function generateLearnosityToQtiDocumentation() { $questionTypeDocumentation = []; $responsesSchemas = $this->schemasService->getResponsesSchemas(); foreach ($responsesSchemas as $questionType => $data) { if (in_array($questionType, QtiExportConstant::$supportedQuestionTypes)) { /** @var QuestionTypeDocumentationInterface $mapperClass */ $mapperClass = 'LearnosityQti\\Processors\\QtiV2\\Out\\Documentation\\QuestionTypes\\' . ucfirst($questionType) . 'Documentation'; $documentation = $mapperClass::getDocumentation(); foreach (array_keys($this->generateAtributeTable($data['attributes'])) as $flattenedAttributeName) { // TODO: Need to check new or non-existing attribute name in case our schemas change if (!in_array($flattenedAttributeName, array_keys($documentation))) { $documentation[$flattenedAttributeName] = LearnosityDoc::none(); } } // TODO: Hack here, hide all the `validation` attributes $documentationToDisplay = []; foreach ($documentation as $attributeName => $doc) { if (!StringUtil::startsWith($attributeName, 'validation')) { $documentationToDisplay[$attributeName] = $doc; } } $questionTypeDocumentation[$questionType] = ['mapping' => $documentationToDisplay, 'introduction' => $mapperClass::getIntroductionNotes()]; } } return ['questionTypes' => $questionTypeDocumentation, 'unsupportedQuestionTypes' => array_keys(array_diff_key($responsesSchemas, $questionTypeDocumentation))]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'options' => LearnosityDoc::support('This is mapped to list of simpleChoice'), 'image' => LearnosityDoc::support('This is mapped to the image object width'), 'image.source' => LearnosityDoc::support('This is mapped to interaction image object, we will use its extension to map it to its type,' . 'ie. `hello.png` would be assumed to have image type of `image/png`'), 'image.width' => LearnosityDoc::support('This is mapped to the image object width'), 'image.height' => LearnosityDoc::support('This is mapped to the image object height'), 'areas' => LearnosityDoc::support('This is mapped to a collection of hotspotChoice. Each hotspotChoice would be of a shape Poly and ' . 'its percentage-based coordinates would be mapped to QTI fixed-based coordinates'), 'multiple_responses' => LearnosityDoc::support('When this option sets to true, then it would map the interaction ' . '`maxChoices` attribute with the highest number of choices possible')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'placeholder' => LearnosityDoc::support('This is mapped to the interaction `placeholder` attribute')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'options' => LearnosityDoc::support('This is mapped to list of simpleChoice'), 'options[].value' => LearnosityDoc::support('This is mapped to `simpleChoice` @identifier'), 'options[].label' => LearnosityDoc::support('This is mapped to `simpleChoice` value'), 'shuffle_options' => LearnosityDoc::support('Yes this is mapped to shuffle at `orderInteraction`')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('Since InlineChoiceInteraction is inline and does not have prompt, this `stimulus` is then prepended to the itembody content'), 'template' => LearnosityDoc::support('This is mapped to the interaction content, the {{response}} would be replaced with `inlineChoiceInteraction` elements')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'options' => LearnosityDoc::support('This is mapped to `target` collection for QTI `simpleMatchSet'), 'stems' => LearnosityDoc::support('This is mapped to `source` collection for QTI `simpleMatchSet`'), 'multiple_responses' => LearnosityDoc::support('When this option sets to true, then it would map the interaction ' . '`maxAssociation` attribute with the highest number of association possible. It also map the `source` (stems) collection to have highest `matchMax` possible')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('Since TextEntryInteraction is inline and does not have prompt, this `stimulus` is then prepended to the itembody content'), 'max_length' => LearnosityDoc::support('This is mapped to the TextEntryInteraction interaction `expectedLength` attribute, if not set then defaulted to 15'), 'template' => LearnosityDoc::support('This is mapped to the interaction content, the {{response}} would be replaced with `textEntryInteraction` elements'), 'case_sensitive' => LearnosityDoc::support('This is mapped to each `mapEntry` case sensitive attribute at `mapping`')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'template' => LearnosityDoc::support('This is mapped to the interaction content, the {{response}} would be replaced with `gap` elements'), 'possible_responses' => LearnosityDoc::support('This is mapped to the interaction gap choices, would be mapped as either `gapText` or `gapImg`'), 'duplicate_responses' => LearnosityDoc::support('When this option sets to true, then it would map the interaction ' . '`matchMax` attribute with the highest number of choices possibles')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'template' => LearnosityDoc::support('This is mapped to the Hottext interaction content'), 'max_selection' => LearnosityDoc::support('This is mapped to the interaction `maxChoices`')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'image.src' => LearnosityDoc::support('This is mapped to the interaction background image `object`'), 'possible_responses' => LearnosityDoc::support('These are mapped to `gapImg`(s). Texts would be converted to base64 image `object`'), 'response_positions' => LearnosityDoc::support('These are mapped to `associableHostpot`(s)')]; }
public static function getDocumentation() { return ['stimulus' => LearnosityDoc::support('This is mapped to `prompt`'), 'list' => LearnosityDoc::support('This is mapped `simpleChoice` list within the `orderInteraction`')]; }