/**
  * Insert property html
  *
  * @return	int	Size
  */
 function insert(&$a_tpl)
 {
     global $lng;
     $tpl = new ilTemplate("tpl.prop_matchingwizardinput.html", true, true, "Modules/TestQuestionPool");
     $i = 0;
     foreach ($this->values as $value) {
         if (!$this->hideImages) {
             if (strlen($value->picture)) {
                 $imagename = $this->qstObject->getImagePathWeb() . $value->picture;
                 if ($this->qstObject->getThumbSize()) {
                     if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->picture)) {
                         $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->picture;
                     }
                 }
                 $tpl->setCurrentBlock('image');
                 $tpl->setVariable('SRC_IMAGE', $imagename);
                 $tpl->setVariable('IMAGE_NAME', $value->picture);
                 $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value->text));
                 $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
                 $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
                 $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
                 $tpl->parseCurrentBlock();
             }
             $tpl->setCurrentBlock('addimage');
             $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][{$i}]");
             $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
             $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
             $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
             $tpl->parseCurrentBlock();
         }
         if (is_object($value)) {
             $tpl->setCurrentBlock("prop_text_propval");
             $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->text));
             $tpl->parseCurrentBlock();
         }
         // this block does not exist in the template
         //			$tpl->setCurrentBlock('singleline');
         $tpl->setVariable("SIZE", $this->getSize());
         $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][{$i}]");
         $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
         $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
         $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
         if ($this->getDisabled()) {
             $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
         }
         $tpl->parseCurrentBlock();
         if ($this->getAllowMove()) {
             $tpl->setCurrentBlock("move");
             $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("ID", $this->getPostVar() . "[{$i}]");
             $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
             $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock("row");
         $tpl->setVariable("POST_VAR", $this->getPostVar());
         $tpl->setVariable("ROW_NUMBER", $i + 1);
         $tpl->setVariable("ROW_IDENTIFIER", $value->identifier);
         $tpl->setVariable("ID", $this->getPostVar() . "[answer][{$i}]");
         $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][{$i}]");
         $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][{$i}]");
         $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
         $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
         $tpl->parseCurrentBlock();
         $i++;
     }
     if (!$this->hideImages) {
         if (is_array($this->getSuffixes())) {
             $suff_str = $delim = "";
             foreach ($this->getSuffixes() as $suffix) {
                 $suff_str .= $delim . "." . $suffix;
                 $delim = ", ";
             }
             $tpl->setCurrentBlock('allowed_image_suffixes');
             $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes") . " " . $suff_str);
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock("image_heading");
         $tpl->setVariable("ANSWER_IMAGE", $this->image_name);
         $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
     $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
     $tpl->setVariable("TEXT_NO", $lng->txt('no'));
     $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
     $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
     $tpl->setVariable("ANSWER_TEXT", $this->text_name);
     $tpl->setVariable("NUMBER_TEXT", $lng->txt('row'));
     $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
 }
Example #2
0
        if (file_exists($iliasAbsolutePath . $iliasMobPath . 'mm_' . $media_object->getId() . '/' . $media_object->getTitle())) {
            // only save usage if the file was uploaded
            $media_object->_saveUsage($media_object->getId(), $_GET['obj_type'] . ':html', (int) $_GET['obj_id']);
            // Append file to array of existings mobs of this context (obj_type and obj_id)
            $mobs[$media_object->getId()] = $media_object->getId();
            $uploadedFile = $media_object->getId();
            $_GET['update'] = 1;
        }
    }
}
$tpl = new ilTemplate(dirname(__FILE__) . "/tpl.img_upload.html", true, true);
$tpl->setVariable("OBJ_ID", (int) $_GET["obj_id"]);
$tpl->setVariable("OBJ_TYPE", $_GET["obj_type"]);
$tpl->setVariable("VALUE_UPDATE", (int) $_GET["update"]);
$tpl->setVariable("ILIAS_INST_PATH", $iliasHttpPath);
$tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
$tpl->setVariable("TXT_ALLOWED_FILE_EXTENSIONS", $lng->txt("file_allowed_suffixes") . " " . implode(', ', array_map(create_function('$value', 'return ".".$value;'), $tinyMCE_valid_imgs)));
if ($ilUser->getLanguage() == 'de') {
    $tpl->touchBlock('validation_engine_lang_de');
} else {
    $tpl->touchBlock('validation_engine_lang_default');
}
if ($_GET["update"] == 1) {
    $tpl->setVariable("IMG_FROM_URL_TAB_DESC", "{#ilimgupload.edit_image}");
    $tpl->setVariable("IMG_FROM_URL_DESC", "{#ilimgupload.edit_image_desc}");
    $tpl->setVariable("INSERT_COMMAND", "{#ilimgupload.insert}");
} else {
    $tpl->setVariable("IMG_FROM_URL_TAB_DESC", "{#ilimgupload.upload_image_from_url}");
    $tpl->setVariable("IMG_FROM_URL_DESC", "{#ilimgupload.upload_image_from_url_desc}");
    $tpl->setVariable("INSERT_COMMAND", "{#ilimgupload.insert}");
}
 /**
  * Insert property html
  *
  * @return	int	Size
  */
 function insert(&$a_tpl)
 {
     global $lng;
     $tpl = new ilTemplate("tpl.prop_imagewizardinput.html", true, true, "Modules/TestQuestionPool");
     $i = 0;
     foreach ($this->values as $value) {
         if (strlen($value)) {
             $imagename = $this->qstObject->getImagePathWeb() . $value;
             if ($this->qstObject->getThumbSize()) {
                 if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value)) {
                     $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value;
                 }
             }
             $tpl->setCurrentBlock('image');
             $tpl->setVariable('SRC_IMAGE', $imagename);
             $tpl->setVariable('IMAGE_NAME', $value);
             $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value));
             $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
             $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
             $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock('addimage');
         $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][{$i}]");
         $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
         $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
         $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
         $tpl->parseCurrentBlock();
         if ($this->getAllowMove()) {
             $tpl->setCurrentBlock("move");
             $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("ID", $this->getPostVar() . "[{$i}]");
             $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
             $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock("row");
         $tpl->setVariable("POST_VAR", $this->getPostVar());
         $tpl->setVariable("ROW_NUMBER", $i);
         $tpl->setVariable("ID", $this->getPostVar() . "[answer][{$i}]");
         $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][{$i}]");
         $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][{$i}]");
         $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
         $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
         $tpl->parseCurrentBlock();
         $i++;
     }
     if (is_array($this->getSuffixes())) {
         $suff_str = $delim = "";
         foreach ($this->getSuffixes() as $suffix) {
             $suff_str .= $delim . "." . $suffix;
             $delim = ", ";
         }
         $tpl->setCurrentBlock('allowed_image_suffixes');
         $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes") . " " . $suff_str);
         $tpl->parseCurrentBlock();
     }
     /*
     $tpl->setCurrentBlock("image_heading");
     $tpl->setVariable("ANSWER_IMAGE", $lng->txt('answer_image'));
     $tpl->parseCurrentBlock();
     */
     $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
     $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
     $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
     $tpl->setVariable("TEXT_NO", $lng->txt('no'));
     $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
     $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
     $tpl->setVariable("ANSWER_TEXT", $lng->txt('answer_text'));
     $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
     global $tpl;
     $tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
     $tpl->addJavascript("./Modules/TestQuestionPool/templates/default/imagewizard.js");
 }
 /**
  * Insert property html
  *
  * @return	int	Size
  */
 function insert(&$a_tpl)
 {
     global $lng;
     $tpl = new ilTemplate("tpl.prop_multiplechoicewizardinput.html", true, true, "Modules/TestQuestionPool");
     $i = 0;
     foreach ($this->values as $value) {
         if ($this->getSingleline()) {
             if (!$this->hideImages) {
                 if (strlen($value->getImage())) {
                     $imagename = $this->qstObject->getImagePathWeb() . $value->getImage();
                     if ($this->getSingleline() && $this->qstObject->getThumbSize()) {
                         if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->getImage())) {
                             $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->getImage();
                         }
                     }
                     $tpl->setCurrentBlock('image');
                     $tpl->setVariable('SRC_IMAGE', $imagename);
                     $tpl->setVariable('IMAGE_NAME', $value->getImage());
                     $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value->getAnswertext()));
                     $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
                     $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
                     $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
                     $tpl->parseCurrentBlock();
                 }
                 $tpl->setCurrentBlock('addimage');
                 $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][{$i}]");
                 $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
                 $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
                 $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
                 $tpl->parseCurrentBlock();
             }
             if (is_object($value)) {
                 $tpl->setCurrentBlock("prop_text_propval");
                 $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
                 $tpl->parseCurrentBlock();
                 $tpl->setCurrentBlock("prop_points_propval");
                 $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsChecked()));
                 $tpl->parseCurrentBlock();
                 $tpl->setCurrentBlock("prop_points_unchecked_propval");
                 $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsUnchecked()));
                 $tpl->parseCurrentBlock();
             }
             $tpl->setCurrentBlock('singleline');
             $tpl->setVariable("SIZE", $this->getSize());
             $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][{$i}]");
             $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
             $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
             $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
             if ($this->getDisabled()) {
                 $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
             }
             $tpl->parseCurrentBlock();
         } else {
             if (!$this->getSingleline()) {
                 if (is_object($value)) {
                     $tpl->setCurrentBlock("prop_points_propval");
                     $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPoints()));
                     $tpl->parseCurrentBlock();
                     $tpl->setCurrentBlock("prop_points_unchecked_propval");
                     $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsUnchecked()));
                     $tpl->parseCurrentBlock();
                 }
                 $tpl->setCurrentBlock('multiline');
                 $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
                 $tpl->setVariable("MULTILINE_ID", $this->getPostVar() . "[answer][{$i}]");
                 $tpl->setVariable("MULTILINE_ROW_NUMBER", $i);
                 $tpl->setVariable("MULTILINE_POST_VAR", $this->getPostVar());
                 if ($this->getDisabled()) {
                     $tpl->setVariable("DISABLED_MULTILINE", " disabled=\"disabled\"");
                 }
                 $tpl->parseCurrentBlock();
             }
         }
         if ($this->getAllowMove()) {
             $tpl->setCurrentBlock("move");
             $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("ID", $this->getPostVar() . "[{$i}]");
             $tpl->setVariable("UP_BUTTON", ilUtil::getImagePath('a_up.png'));
             $tpl->setVariable("DOWN_BUTTON", ilUtil::getImagePath('a_down.png'));
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock("row");
         $class = $i % 2 == 0 ? "even" : "odd";
         if ($i == 0) {
             $class .= " first";
         }
         if ($i == count($this->values) - 1) {
             $class .= " last";
         }
         $tpl->setVariable("ROW_CLASS", $class);
         $tpl->setVariable("POST_VAR", $this->getPostVar());
         $tpl->setVariable("ROW_NUMBER", $i);
         $tpl->setVariable("ID", $this->getPostVar() . "[answer][{$i}]");
         $tpl->setVariable("POINTS_ID", $this->getPostVar() . "[points][{$i}]");
         $tpl->setVariable("POINTS_UNCHECKED_ID", $this->getPostVar() . "[points_unchecked][{$i}]");
         $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][{$i}]");
         $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][{$i}]");
         if ($this->getDisabled()) {
             $tpl->setVariable("DISABLED_POINTS", " disabled=\"disabled\"");
         }
         $tpl->setVariable("ADD_BUTTON", ilUtil::getImagePath('edit_add.png'));
         $tpl->setVariable("REMOVE_BUTTON", ilUtil::getImagePath('edit_remove.png'));
         $tpl->parseCurrentBlock();
         $i++;
     }
     if ($this->getSingleline()) {
         if (!$this->hideImages) {
             if (is_array($this->getSuffixes())) {
                 $suff_str = $delim = "";
                 foreach ($this->getSuffixes() as $suffix) {
                     $suff_str .= $delim . "." . $suffix;
                     $delim = ", ";
                 }
                 $tpl->setCurrentBlock('allowed_image_suffixes');
                 $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes") . " " . $suff_str);
                 $tpl->parseCurrentBlock();
             }
             $tpl->setCurrentBlock("image_heading");
             $tpl->setVariable("ANSWER_IMAGE", $lng->txt('answer_image'));
             $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
             $tpl->parseCurrentBlock();
         }
     }
     $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
     $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
     $tpl->setVariable("TEXT_NO", $lng->txt('no'));
     $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
     $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
     $tpl->setVariable("ANSWER_TEXT", $lng->txt('answer_text'));
     $tpl->setVariable("POINTS_TEXT", $lng->txt('points'));
     $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
     $tpl->setVariable("POINTS_CHECKED_TEXT", $lng->txt('checkbox_checked'));
     $tpl->setVariable("POINTS_UNCHECKED_TEXT", $lng->txt('checkbox_unchecked'));
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initDomEvent();
     $tpl->addJavascript("./Modules/TestQuestionPool/templates/default/multiplechoicewizard.js");
 }
 public function insert(&$a_tpl)
 {
     $tpl = new ilTemplate("tpl.prop_kprimchoicewizardinput.html", true, true, "Modules/TestQuestionPool");
     foreach ($this->values as $value) {
         /**
          * @var ilAssKprimChoiceAnswer $value
          */
         if ($this->getSingleline()) {
             if (!$this->hideImages) {
                 if (strlen($value->getImageFile())) {
                     $imagename = $value->getImageWebPath();
                     if ($this->getSingleline() && $this->qstObject->getThumbSize()) {
                         if (@file_exists($value->getThumbFsPath())) {
                             $imagename = $value->getThumbWebPath();
                         }
                     }
                     $tpl->setCurrentBlock('image');
                     $tpl->setVariable('SRC_IMAGE', $imagename);
                     $tpl->setVariable('IMAGE_NAME', $value->getImageFile());
                     $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value->getAnswertext()));
                     $tpl->setVariable("TXT_DELETE_EXISTING", $this->lng->txt("delete_existing_file"));
                     $tpl->setVariable("IMAGE_ROW_NUMBER", $value->getPosition());
                     $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
                     $tpl->parseCurrentBlock();
                 }
                 $tpl->setCurrentBlock('addimage');
                 $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][{$value->getPosition()}]");
                 $tpl->setVariable("IMAGE_SUBMIT", $this->lng->txt("upload"));
                 $tpl->setVariable("IMAGE_ROW_NUMBER", $value->getPosition());
                 $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
                 $tpl->parseCurrentBlock();
             }
             $tpl->setCurrentBlock("prop_text_propval");
             $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
             $tpl->parseCurrentBlock();
             $tpl->setCurrentBlock('singleline');
             $tpl->setVariable("SIZE", $this->getSize());
             $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][{$value->getPosition()}]");
             $tpl->setVariable("SINGLELINE_ROW_NUMBER", $value->getPosition());
             $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
             $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
             if ($this->getDisabled()) {
                 $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
             }
             $tpl->parseCurrentBlock();
         } else {
             if (!$this->getSingleline()) {
                 $tpl->setCurrentBlock('multiline');
                 $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
                 $tpl->setVariable("MULTILINE_ID", $this->getPostVar() . "[answer][{$value->getPosition()}]");
                 $tpl->setVariable("MULTILINE_ROW_NUMBER", $value->getPosition());
                 $tpl->setVariable("MULTILINE_POST_VAR", $this->getPostVar());
                 if ($this->getDisabled()) {
                     $tpl->setVariable("DISABLED_MULTILINE", " disabled=\"disabled\"");
                 }
                 $tpl->parseCurrentBlock();
             }
         }
         if ($this->getAllowMove()) {
             $tpl->setCurrentBlock("move");
             $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][{$value->getPosition()}]");
             $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][{$value->getPosition()}]");
             $tpl->setVariable("UP_ID", "up_{$this->getPostVar()}[{$value->getPosition()}]");
             $tpl->setVariable("DOWN_ID", "down_{$this->getPostVar()}[{$value->getPosition()}]");
             $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
             $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock("row");
         $tpl->setVariable("POST_VAR", $this->getPostVar());
         $tpl->setVariable("ROW_NUMBER", $value->getPosition());
         $tpl->setVariable("ID", $this->getPostVar() . "[answer][{$value->getPosition()}]");
         $tpl->setVariable("CORRECTNESS_TRUE_ID", $this->getPostVar() . "[correctness][{$value->getPosition()}][true]");
         $tpl->setVariable("CORRECTNESS_FALSE_ID", $this->getPostVar() . "[correctness][{$value->getPosition()}][false]");
         $tpl->setVariable("CORRECTNESS_TRUE_VALUE", 1);
         $tpl->setVariable("CORRECTNESS_FALSE_VALUE", 0);
         if ($value->getCorrectness() !== null) {
             if ($value->getCorrectness()) {
                 $tpl->setVariable('CORRECTNESS_TRUE_SELECTED', ' checked="checked"');
             } else {
                 $tpl->setVariable('CORRECTNESS_FALSE_SELECTED', ' checked="checked"');
             }
         }
         if ($this->getDisabled()) {
             $tpl->setVariable("DISABLED_CORRECTNESS", " disabled=\"disabled\"");
         }
         $tpl->parseCurrentBlock();
     }
     if ($this->getSingleline()) {
         if (!$this->hideImages) {
             if (is_array($this->getSuffixes())) {
                 $suff_str = $delim = "";
                 foreach ($this->getSuffixes() as $suffix) {
                     $suff_str .= $delim . "." . $suffix;
                     $delim = ", ";
                 }
                 $tpl->setCurrentBlock('allowed_image_suffixes');
                 $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $this->lng->txt("file_allowed_suffixes") . " " . $suff_str);
                 $tpl->parseCurrentBlock();
             }
             $tpl->setCurrentBlock("image_heading");
             $tpl->setVariable("ANSWER_IMAGE", $this->lng->txt('answer_image'));
             $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
             $tpl->parseCurrentBlock();
         }
     }
     foreach ($this->qstObject->getValidOptionLabels() as $optionLabel) {
         if ($this->qstObject->isCustomOptionLabel($optionLabel)) {
             continue;
         }
         $tpl->setCurrentBlock('option_label_translations');
         $tpl->setVariable('OPTION_LABEL', $optionLabel);
         $tpl->setVariable('TRANSLATION_TRUE', $this->qstObject->getTrueOptionLabelTranslation($this->lng, $optionLabel));
         $tpl->setVariable('TRANSLATION_FALSE', $this->qstObject->getFalseOptionLabelTranslation($this->lng, $optionLabel));
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
     $tpl->setVariable("DELETE_IMAGE_HEADER", $this->lng->txt('delete_image_header'));
     $tpl->setVariable("DELETE_IMAGE_QUESTION", $this->lng->txt('delete_image_question'));
     $tpl->setVariable("ANSWER_TEXT", $this->lng->txt('answer_text'));
     $tpl->setVariable("OPTIONS_TEXT", $this->lng->txt('options'));
     // winzards input column label values will be updated on document ready js
     //$tpl->setVariable("TRUE_TEXT", $this->qstObject->getTrueOptionLabelTranslation($this->lng, $this->qstObject->getOptionLabel()));
     //$tpl->setVariable("FALSE_TEXT", $this->qstObject->getFalseOptionLabelTranslation($this->lng, $this->qstObject->getOptionLabel()));
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     $this->tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
     $this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/kprimchoicewizard.js");
     $this->tpl->addJavascript('Modules/TestQuestionPool/js/ilAssKprimChoice.js');
 }