43     public function fromXML(&$item, $questionpool_id, &$tst_id, &$tst_object, &$question_counter, $import_mapping): array
    46         $ilUser = $DIC[
'ilUser'];
    51         $presentation = $item->getPresentation();
    53         $created = sprintf(
"%04d%02d%02d%02d%02d%02d", $now[
'year'], $now[
'mon'], $now[
'mday'], $now[
'hours'], $now[
'minutes'], $now[
'seconds']);
    56         $this->
object->setTitle($item->getTitle());
    57         $this->
object->setNrOfTries((
int) $item->getMaxattempts());
    58         $this->
object->setComment($item->getComment());
    59         $this->
object->setAuthor($item->getAuthor());
    60         $this->
object->setOwner($ilUser->getId());
    62         $this->
object->setObjId($questionpool_id);
    63         $this->
object->setPoints($item->getMetadataEntry(
"points"));
    64         $this->
object->setOrderText($item->getMetadataEntry(
"ordertext"));
    65         $this->
object->setTextSize((
float) $item->getMetadataEntry(
"textsize"));
    66         $this->
object->setSeparator($item->getMetadataEntry(
"separator"));
    68         $this->
object->setAdditionalContentEditingMode(
    71         $this->
object->saveToDb();
    77         $questiontext = $this->
object->getQuestion();
    87                 $DIC[
'ilLog']->write(__METHOD__ . 
': import mob from dir: ' . $importfile);
    91                 $questiontext = str_replace(
"src=\"" . $mob[
"mob"] . 
"\"", 
"src=\"" . 
"il_" . 
IL_INST_ID . 
"_mob_" . $media_object->getId() . 
"\"", $questiontext);
    93                 foreach ($feedbacks as $ident => $material) {
    94                     $feedbacks[$ident] = str_replace(
"src=\"" . $mob[
"mob"] . 
"\"", 
"src=\"" . 
"il_" . 
IL_INST_ID . 
"_mob_" . $media_object->getId() . 
"\"", $material);
    96                 foreach ($feedbacksgeneric as $correctness => $material) {
    97                     $feedbacksgeneric[$correctness] = str_replace(
"src=\"" . $mob[
"mob"] . 
"\"", 
"src=\"" . 
"il_" . 
IL_INST_ID . 
"_mob_" . $media_object->getId() . 
"\"", $material);
   103         foreach ($feedbacks as $ident => $material) {
   106             $this->
object->feedbackOBJ->importSpecificAnswerFeedback(
   113         foreach ($feedbacksgeneric as $correctness => $material) {
   114             $this->
object->feedbackOBJ->importGenericFeedback(
   120         $this->
object->saveToDb();
   123             $q_1_id = $this->
object->getId();
   124             $question_id = $this->
object->duplicate(
true, 
"", 
"", -1, $tst_id);
   125             $tst_object->questions[$question_counter++] = $question_id;
   126             $import_mapping[$item->getIdent()] = [
"pool" => $q_1_id, 
"test" => $question_id];
   128             $import_mapping[$item->getIdent()] = [
"pool" => $this->
object->getId(), 
"test" => 0];
   130         return $import_mapping;
 static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
 
static get(string $a_var)
 
getFeedbackAnswerSpecific(ilQTIItem $item, $prefix='response_')
 
addGeneralMetadata(ilQTIItem $item)
 
QTIMaterialToString(ilQTIMaterial $a_material)
Reads an QTI material tag and creates a text or XHTML string. 
 
fetchAdditionalContentEditingModeInformation($qtiItem)
fetches the "additional content editing mode" information from qti item and falls back to ADDITIONAL_...
 
getQplImportArchivDirectory()
returns the full path to extracted qpl import archiv (qpl import dir + qpl archiv subdir) ...
 
getFeedbackGeneric($item)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
importSuggestedSolutions(int $question_id, array $solution_from_import)
 
getTstImportArchivDirectory()
returns the full path to extracted tst import archiv (tst import dir + tst archiv subdir) ...
 
Class for question imports. 
 
static clear(string $a_var)
 
fetchIndexFromFeedbackIdent($feedbackIdent, $prefix='response_')
 
fromXML(&$item, $questionpool_id, &$tst_id, &$tst_object, &$question_counter, $import_mapping)
Creates a question from a QTI file.