/**
  * @return string
  */
 protected function render()
 {
     $tpl = new ilTemplate('./Customizing/global/plugins/Services/Repository/RepositoryObject/RoomSharing/templates/default/utils/tpl.hours_input.html', false, false);
     //				echo '<pre>' . print_r($this->getHours(), 1) . '</pre>';
     //				echo '<pre>' . print_r($this->getMinutes(), 1) . '</pre>';
     $tpl->setVariable('POSTVAR', $this->getPostVar());
     for ($x = 0; $x < 24; $x++) {
         $tpl->setCurrentBlock('hour');
         if ($x == $this->getHours()) {
             $tpl->setVariable('SELECTED', "selected=selected");
         }
         $tpl->setVariable('VAL', $x);
         $tpl->setVariable('DISPLAY', str_pad($x, 2, '0', STR_PAD_LEFT));
         $tpl->parseCurrentBlock();
     }
     for ($x = 0; $x < 60; $x = $x + 5) {
         $tpl->setCurrentBlock('minute');
         if ($this->getMinutes() >= $x and $this->getMinutes() < $x + 5) {
             $tpl->setVariable('SELECTED', "selected=selected");
         }
         $tpl->setVariable('VAL', $x);
         $tpl->setVariable('DISPLAY', str_pad($x, 2, '0', STR_PAD_LEFT));
         $tpl->parseCurrentBlock();
     }
     return $tpl->get();
 }
Exemplo n.º 2
0
 public function generateDBUpdateForInstallation()
 {
     $tpl = new ilTemplate(dirname(__FILE__) . '/templates/dbupdate.txt', true, true);
     $ar = $this->getAr();
     $tpl->setVariable('TABLE_NAME', $ar->getConnectorContainerName());
     $tpl->setVariable('TABLE_NAME2', $ar->getConnectorContainerName());
     $tpl->setVariable('TABLE_NAME3', $ar->getConnectorContainerName());
     $tpl->setVariable('STEP', $this->getStep());
     $tpl->setVariable('PRIMARY', $this->getAr()->getArFieldList()->getPrimaryFieldName());
     foreach ($this->getAr()->getArFieldList()->getFields() as $field) {
         $tpl->touchBlock('field');
         $tpl->setVariable('FIELD_NAME', $field->getName());
         foreach ($field->getAttributesForConnector() as $name => $value) {
             $tpl->setCurrentBlock('attribute');
             $tpl->setVariable('NAME', arFieldList::mapKey($name));
             $tpl->setVariable('VALUE', $value);
             $tpl->parseCurrentBlock();
         }
     }
     if ($this->getAr()->getArFieldList()->getPrimaryField()->getFieldType() == arField::FIELD_TYPE_INTEGER) {
         $tpl->setCurrentBlock('attribute');
         $tpl->setVariable('TABLE_NAME4', $ar->getConnectorContainerName());
         $tpl->parseCurrentBlock();
     }
     header('Content-type: application/x-httpd-php');
     header("Content-Disposition: attachment; filename=\"dbupdate.php\"");
     echo $tpl->get();
     exit;
 }
Exemplo n.º 3
0
 /**
  * Get assignment header for overview
  */
 function getOverviewHeader($a_data)
 {
     global $lng, $ilUser;
     $lng->loadLanguageModule("exc");
     $tpl = new ilTemplate("tpl.assignment_head.html", true, true, "Modules/Exercise");
     if ($a_data["deadline"] > 0 && $a_data["deadline"] - time() <= 0) {
         $tpl->setCurrentBlock("prop");
         $tpl->setVariable("PROP", $lng->txt("exc_ended_on"));
         $tpl->setVariable("PROP_VAL", ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
         $tpl->parseCurrentBlock();
         // #14077
         if ($a_data["peer"] && $a_data["peer_dl"]) {
             $tpl->setCurrentBlock("prop");
             $tpl->setVariable("PROP", $lng->txt("exc_peer_review_deadline"));
             $tpl->setVariable("PROP_VAL", ilDatePresentation::formatDate(new ilDateTime($a_data["peer_dl"], IL_CAL_UNIX)));
             $tpl->parseCurrentBlock();
         }
     } else {
         if ($a_data["start_time"] > 0 && time() - $a_data["start_time"] <= 0) {
             $tpl->setCurrentBlock("prop");
             $tpl->setVariable("PROP", $lng->txt("exc_starting_on"));
             $tpl->setVariable("PROP_VAL", ilDatePresentation::formatDate(new ilDateTime($a_data["start_time"], IL_CAL_UNIX)));
             $tpl->parseCurrentBlock();
         } else {
             $time_str = $this->getTimeString($a_data["deadline"]);
             $tpl->setCurrentBlock("prop");
             $tpl->setVariable("PROP", $lng->txt("exc_time_to_send"));
             $tpl->setVariable("PROP_VAL", $time_str);
             $tpl->parseCurrentBlock();
             if ($a_data["deadline"] > 0) {
                 $tpl->setCurrentBlock("prop");
                 $tpl->setVariable("PROP", $lng->txt("exc_edit_until"));
                 $tpl->setVariable("PROP_VAL", ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
                 $tpl->parseCurrentBlock();
             }
         }
     }
     $mand = "";
     if ($a_data["mandatory"]) {
         $mand = " (" . $lng->txt("exc_mandatory") . ")";
     }
     $tpl->setVariable("TITLE", $a_data["title"] . $mand);
     // status icon
     $stat = ilExAssignment::lookupStatusOfUser($a_data["id"], $ilUser->getId());
     switch ($stat) {
         case "passed":
             $pic = "scorm/passed.svg";
             break;
         case "failed":
             $pic = "scorm/failed.svg";
             break;
         default:
             $pic = "scorm/not_attempted.svg";
             break;
     }
     $tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
     $tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $stat));
     return $tpl->get();
 }
 /**
  * overwritten method from base class
  * @access	public
  * @param	integer obj_id
  * @param	integer array options
  * @return	string
  */
 function formatHeader($a_obj_id, $a_option)
 {
     global $lng, $ilias;
     $tpl = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");
     $tpl->setCurrentBlock("text");
     $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("row");
     $tpl->parseCurrentBlock();
     $this->output[] = $tpl->get();
 }
 /**
  * Get assignment header for overview
  */
 function getOverviewHeader($a_data)
 {
     global $lng, $ilUser;
     $tpl = new ilTemplate("tpl.assignment_head.html", true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus");
     if ($a_data["deadline"] - time() <= 0) {
         $tpl->setCurrentBlock("prop");
         $tpl->setVariable("PROP", $lng->txt("rep_robj_xeph_ended_on"));
         $tpl->setVariable("PROP_VAL", ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
         $tpl->parseCurrentBlock();
     } else {
         if ($a_data["start_time"] > 0 && time() - $a_data["start_time"] <= 0) {
             $tpl->setCurrentBlock("prop");
             $tpl->setVariable("PROP", $lng->txt("rep_robj_xeph_starting_on"));
             $tpl->setVariable("PROP_VAL", ilDatePresentation::formatDate(new ilDateTime($a_data["start_time"], IL_CAL_UNIX)));
             $tpl->parseCurrentBlock();
         } else {
             $time_str = $this->getTimeString($a_data["deadline"]);
             $tpl->setCurrentBlock("prop");
             $tpl->setVariable("PROP", $lng->txt("rep_robj_xeph_time_to_send"));
             $tpl->setVariable("PROP_VAL", $time_str);
             $tpl->parseCurrentBlock();
             $tpl->setCurrentBlock("prop");
             $tpl->setVariable("PROP", $lng->txt("rep_robj_xeph_edit_until"));
             $tpl->setVariable("PROP_VAL", ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
             $tpl->parseCurrentBlock();
         }
     }
     $mand = "";
     if ($a_data["mandatory"]) {
         $mand = " (" . $lng->txt("rep_robj_xeph_mandatory") . ")";
     }
     $tpl->setVariable("TITLE", $a_data["title"] . $mand);
     // status icon
     $stat = ilEphAssignment::lookupStatusOfUser($a_data["id"], $ilUser->getId());
     switch ($stat) {
         case "passed":
             $pic = "scorm/passed.png";
             break;
         case "failed":
             $pic = "scorm/failed.png";
             break;
         default:
             $pic = "scorm/not_attempted.png";
             break;
     }
     $tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
     $tpl->setVariable("ALT_STATUS", $lng->txt("rep_robj_xeph_" . $stat));
     return $tpl->get();
 }
 /**
  * Insert property html
  *
  * @return	int	Size
  */
 function insert(&$a_tpl)
 {
     global $lng;
     $tpl = new ilTemplate("tpl.prop_randomtestroinput.html", true, true, "Modules/Test");
     $i = 0;
     foreach ($this->values as $value) {
         if ($value['num_of_q'] > 0) {
             $tpl->setCurrentBlock("num_of_q");
             $tpl->setVariable("NUM_OF_Q", $value['num_of_q']);
             $tpl->setVariable("TEXT_FROM", $lng->txt('questions_from'));
             $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("QPL_VALUE", ilUtil::prepareFormOutput($value['title']));
         $tpl->setVariable("COUNT_VALUE", "(" . $value['count'] . " " . $lng->txt('assQuestions') . ")");
         $tpl->parseCurrentBlock();
         $i++;
     }
     $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
 }
 /**
  * @param $form
  */
 protected function outputAdjustQuestionForm($form)
 {
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_questions.html", "Modules/Test");
     $this->tpl->setCurrentBlock("adm_content");
     $this->tpl->setVariable('QUESTIONBROWSER', $form->getHTML());
     $this->tpl->parseCurrentBlock();
 }
 function show()
 {
     global $lng, $tree;
     $tpl = new ilTemplate("tpl.container_link_help.html", true, true, "Services/Container");
     $type_ordering = array("cat", "fold", "crs", "icrs", "icla", "grp", "chat", "frm", "lres", "glo", "webr", "file", "exc", "tst", "svy", "mep", "qpl", "spl");
     $childs = $tree->getChilds($_GET["ref_id"]);
     foreach ($childs as $child) {
         if (in_array($child["type"], array("lm", "dbk", "sahs", "htlm"))) {
             $cnt["lres"]++;
         } else {
             $cnt[$child["type"]]++;
         }
     }
     $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
     foreach ($type_ordering as $type) {
         $tpl->setCurrentBlock("row");
         $tpl->setVariable("ROWCOL", "tblrow" . ($i++ % 2 + 1));
         if ($type != "lres") {
             $tpl->setVariable("TYPE", $lng->txt("objs_" . $type) . " (" . (int) $cnt[$type] . ")");
         } else {
             $tpl->setVariable("TYPE", $lng->txt("learning_resources") . " (" . (int) $cnt["lres"] . ")");
         }
         $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
         $tpl->parseCurrentBlock();
     }
     $tpl->show();
     exit;
 }
 public function insert($a_tpl)
 {
     $tpl = new ilTemplate('tpl.mail_new_attachments.html', true, true, 'Services/Mail');
     foreach ($this->items as $item) {
         $tpl->setCurrentBlock('attachment_list_item');
         $tpl->setVariable('ATTACHMENT_LABEL', $item);
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable('ATTACHMENT_BUTTON_LABEL', $this->buttonLabel);
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
 }
 public function fillTreeTemplate()
 {
     $emptyOnLoad = false;
     $nodes_to_request = $_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes'];
     if (!$_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes'] || count($_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes']) == 1 && $_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes'][0] == 0) {
         $emptyOnLoad = true;
         $nodes_to_request = array();
     }
     $objects = $this->topic->getNestedSetPostChildren(null, $nodes_to_request);
     $counter = 0;
     $onloadNodes = array();
     $nodesFetchedWithChildren = array();
     $frm = new ilForum();
     $pageHits = $frm->getPageHits();
     include_once 'Services/JSON/classes/class.ilJsonUtil.php';
     foreach ($objects as $object) {
         if ($object['pos_pk'] != $this->root_id && !in_array($object['parent_pos'], $onloadNodes)) {
             continue;
         }
         if (in_array((int) $object['parent_pos'], $onloadNodes) && !in_array((int) $object['parent_pos'], $nodesFetchedWithChildren)) {
             $nodesFetchedWithChildren[] = (int) $object['parent_pos'];
         }
         $html = self::getTreeNodeHtml($object, $this->gui, $pageHits);
         $hasChildren = $object['children'] >= 1;
         $node = new stdClass();
         $node->html = $html;
         if ($object['pos_pk'] == $this->root_id) {
             $this->tpl->setVariable('FRM_TREE_ROOT_NODE_VARIABLE', 'frmNode' . $object['pos_pk']);
             $this->tpl->setVariable('FRM_TREE_ROOT_NODE_LINK', ilJsonUtil::encode($node));
             $this->tpl->setVariable('FRM_TREE_ROOT_NODE_HAS_CHILDREN', $hasChildren ? 'true' : 'false');
         } else {
             $this->tpl->setCurrentBlock('frm_nodes');
             $this->tpl->setVariable('FRM_NODES_VARNAME', 'frmNode' . $object['pos_pk']);
             $this->tpl->setVariable('FRM_NODES_PARENT_VARNAME', 'frmNode' . $object['parent_pos']);
             $this->tpl->setVariable('FRM_NODES_LINK', ilJsonUtil::encode($node));
             $this->tpl->setVariable('FRM_NODES_HAS_CHILDREN', $hasChildren ? 'true' : 'false');
             $this->tpl->parseCurrentBlock();
         }
         $onloadNodes[] = (int) $object['pos_pk'];
         ++$counter;
     }
     $this->tpl->setVariable('THR_ONLOAD_NODES', ilJsonUtil::encode($onloadNodes));
     $this->tpl->setVariable('THR_ONLOAD_NODES_FETCHED_WITH_CHILDREN', ilJsonUtil::encode($nodesFetchedWithChildren));
     if ($emptyOnLoad) {
         $this->tpl->setVariable('THR_OPEN_NODES', ilJsonUtil::encode($onloadNodes));
         $_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes'] = array_unique(array_merge(array(0), $onloadNodes));
     } else {
         $this->tpl->setVariable('THR_OPEN_NODES', ilJsonUtil::encode($_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes']));
     }
 }
 /**
  * Overwritten method from ilNumberInputGUI. This method is primarily used
  * to make use of a different template.
  *
  * @global type $lng
  * @return type
  */
 public function render()
 {
     global $lng;
     // own template (the number is aligned left)
     $tpl = new ilTemplate("tpl.room_prop_number.html", true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/RoomSharing");
     if (strlen($this->getValue())) {
         $tpl->setCurrentBlock("prop_number_propval");
         $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
         $tpl->parseCurrentBlock();
     }
     $tpl->setCurrentBlock("prop_number");
     $tpl->setVariable("POST_VAR", $this->getPostVar());
     $tpl->setVariable("ID", $this->getFieldId());
     $tpl->setVariable("SIZE", $this->getSize());
     $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
     if (strlen($this->getSuffix())) {
         $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
     }
     if ($this->getDisabled()) {
         $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
     }
     // constraints
     if ($this->areDecimalsAllowed() && $this->getDecimals() > 0) {
         $constraints = $lng->txt("form_format") . ": ###." . str_repeat("#", $this->getDecimals());
         $delim = ", ";
     }
     if ($this->getMaxValue() !== false) {
         $constraints .= $delim . $lng->txt("rep_robj_xrs_at_most") . ": " . ($this->maxvalueShouldBeLess() ? "&lt; " : "") . $this->getMaxValue();
         $delim = ", ";
     }
     // append the constraint-text at the end of the input, if given
     if ($constraints !== "") {
         $tpl->setVariable("TXT_NUMBER_CONSTRAINTS", $constraints);
     }
     $tpl->parseCurrentBlock();
     return $tpl->get();
 }
 /**
  * Configure screen
  */
 public function configure()
 {
     $form = new ilCertificateConfigFormGUI($this);
     $form->fillForm();
     $ftpl = new ilTemplate('tpl.config_form.html', true, true, $this->pl->getDirectory());
     $ftpl->setVariable("FORM", $form->getHTML());
     $ftpl->setVariable("TXT_USE_PLACEHOLDERS", $this->pl->txt('txt_use_placeholders'));
     foreach (srCertificateStandardPlaceholders::getStandardPlaceholders() as $placeholder => $text) {
         $ftpl->setCurrentBlock("placeholder");
         $ftpl->setVariable("PLACEHOLDER", $placeholder);
         $ftpl->setVariable("TXT_PLACEHOLDER", $text);
         $ftpl->parseCurrentBlock();
     }
     $this->tpl->setContent($ftpl->get());
 }
 /**
  * Render output
  */
 function render()
 {
     global $lng;
     $tpl = new ilTemplate("tpl.prop_captchainput.html", true, true, "Services/Captcha");
     if (strlen($this->getValue())) {
         $tpl->setCurrentBlock("prop_text_propval");
         $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
         $tpl->parseCurrentBlock();
     }
     include_once "./Services/Captcha/classes/class.ilSecurImageUtil.php";
     $tpl->setVariable("IMAGE_SCRIPT", ilSecurImageUtil::getImageScript());
     $tpl->setVariable("POST_VAR", $this->getPostVar());
     $tpl->setVariable("TXT_CONSTR_PROP", $lng->txt("cont_constrain_proportions"));
     //		$GLOBALS["tpl"]->addJavascript("./Services/MediaObjects/js/ServiceMediaObjectPropWidthHeight.js");
     return $tpl->get();
 }
 /**
  * List skill changes
  */
 function listSkillChanges()
 {
     global $tpl, $ilToolbar, $lng, $ilCtrl;
     include_once "./Modules/Survey/classes/class.ilSurveySkillChangesTableGUI.php";
     //		$ilToolbar->addButton($lng->txt("survey_write_skills"),
     //			$ilCtrl->getLinkTarget($this, "writeSkills"));
     $apps = $this->survey->getAppraiseesData();
     $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
     foreach ($apps as $app) {
         $changes_table = new ilSurveySkillChangesTableGUI($this, "listSkillChanges", $this->survey, $app);
         $ctpl->setCurrentBlock("appraisee");
         $ctpl->setVariable("LASTNAME", $app["lastname"]);
         $ctpl->setVariable("FIRSTNAME", $app["firstname"]);
         $ctpl->setVariable("CHANGES_TABLE", $changes_table->getHTML());
         $ctpl->parseCurrentBlock();
     }
     $tpl->setContent($ctpl->get());
 }
 /**
  * @param ilTemplate $tpl
  */
 public function insert(ilTemplate $tpl)
 {
     /**
      * @var $lng ilLanguage
      */
     global $lng;
     $local_tpl = new ilTemplate('tpl.prop_tos_signed_document.html', true, true, 'Services/TermsOfService');
     require_once 'Services/UIComponent/Modal/classes/class.ilModalGUI.php';
     $modal = ilModalGUI::getInstance();
     $modal->setHeading($lng->txt('tos_agreement_document'));
     $modal->setId('accepted_tos_' . $this->entity->getUserId());
     $modal->setBody($this->entity->getText());
     require_once 'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
     $local_tpl->setVariable('MODAL_TRIGGER_HTML', ilGlyphGUI::get(ilGlyphGUI::SEARCH));
     $local_tpl->setVariable('MODAL', $modal->getHTML());
     $local_tpl->setVariable('MODAL_ID', 'accepted_tos_' . $this->entity->getUserId());
     $tpl->setCurrentBlock('prop_generic');
     $tpl->setVariable('PROP_GENERIC', $local_tpl->get());
     $tpl->parseCurrentBlock();
 }
Exemplo n.º 16
0
 public function insertIconsAndCheckboxes()
 {
     global $lng, $ilias;
     // FSX removed $this->getCheckboxStatus() in if-Statement: 0014726
     if (!$ilias->getSetting('custom_icons')) {
         parent::insertIconsAndCheckboxes();
         return;
     }
     $icons_cache = ilObjOrgUnit::getIconsCache();
     if (isset($icons_cache[$this->obj_id])) {
         $icon_file = $icons_cache[$this->obj_id];
         // icon link
         if (!$this->default_command or !$this->getCommandsStatus() and !$this->restrict_to_goto) {
         } else {
             $this->tpl->setCurrentBlock("icon_link_s");
             if ($this->default_command["frame"] != "") {
                 $this->tpl->setVariable("ICON_TAR", "target='" . $this->default_command["frame"] . "'");
             }
             $this->tpl->setVariable("ICON_HREF", $this->default_command["link"]);
             $this->tpl->parseCurrentBlock();
             $this->tpl->touchBlock("icon_link_e");
         }
         $this->enableIcon(false);
         if ($this->getContainerObject()->isActiveAdministrationPanel() && !$_SESSION['clipboard']) {
             $this->tpl->touchBlock("i_1");
             // indent main div  }
             $this->tpl->touchBlock("d_2");
             // indent main div  } #0014913
         } else {
             $this->tpl->touchBlock("d_1");
         }
         parent::insertIconsAndCheckboxes();
         $this->tpl->setCurrentBlock("icon");
         $this->tpl->setVariable("ALT_ICON", $lng->txt("icon") . " " . $lng->txt("obj_" . $this->getIconImageType()));
         $this->tpl->setVariable("SRC_ICON", $icon_file);
         $this->tpl->parseCurrentBlock();
         $this->enableIcon(true);
     } else {
         parent::insertIconsAndCheckboxes();
     }
 }
 public function render(array &$a_html, $a_parent_gui)
 {
     global $lng;
     $all_tags = $this->getSubTreeTags();
     if ($all_tags) {
         // see ilPDTaggingBlockGUI::getTagCloud();
         $map = array("personal" => $lng->txt("tagging_my_tags"), "other" => $lng->txt("tagging_other_users"));
         foreach ($map as $type => $title) {
             $tags = $all_tags[$type];
             if ($tags) {
                 $max = 1;
                 foreach ($tags as $tag => $counter) {
                     $max = max($counter, $max);
                 }
                 reset($tags);
                 $tpl = new ilTemplate("tpl.tag_cloud_block.html", true, true, "Services/Tagging");
                 $tpl->setCurrentBlock("tag_bl");
                 foreach ($tags as $tag => $counter) {
                     $tpl->setVariable("TAG_TYPE", $type);
                     $tpl->setVariable("TAG_TITLE", $tag);
                     $tpl->setVariable("TAG_CODE", md5($tag));
                     $tpl->setVariable("REL_CLASS", ilTagging::getRelevanceClass($counter, $max));
                     if (is_array($this->selection[$type]) && in_array($tag, $this->selection[$type])) {
                         $tpl->setVariable("HIGHL_CLASS", ' ilHighlighted');
                     }
                     $tpl->parseCurrentBlock();
                 }
                 $a_html[] = array("title" => $title, "html" => $tpl->get());
             }
         }
         /*
         if($this->selection)
         {
         	$a_html[] = array(
         			"title" => "Related Tags",
         			"html" => ":TODO:"
         		);
         }			 
         */
     }
 }
Exemplo n.º 18
0
 /**
  * @return string
  */
 public function getRoomSelect()
 {
     /**
      * @var $lng    ilLanguage
      * @var $ilUser ilObjUser
      */
     global $lng, $ilUser;
     $readable = $this->getReadableAreas();
     $tpl = new ilTemplate('tpl.chatroom_block_room_select.html', true, true, 'Modules/Chatroom');
     $tpl->setVariable('TXT_SELECT_ROOM', $lng->txt('chat_select_room'));
     foreach ($readable as $room) {
         $tpl->setCurrentBlock('select_room_row');
         $tpl->setVariable('ROW_VALUE', $room['ref_id']);
         $tpl->setVariable('ROW_CAPTION', $room['title']);
         if ($ilUser->getPref('chatviewer_last_selected_room') == $room['ref_id']) {
             $tpl->setVariable('ROW_SELECTED', 'selected="selected"');
         }
         $tpl->parseCurrentBlock();
     }
     return $tpl->get();
 }
Exemplo n.º 19
0
 /**
  * Get HTML
  */
 function getHTML()
 {
     global $lng;
     include_once "./Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
     $panel = ilPanelGUI::getInstance();
     $panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
     $panel->setHeadingStyle(ilPanelGUI::HEADING_STYLE_BLOCK);
     $panel->setHeading($this->getHeading());
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     $list = new ilGroupedListGUI();
     foreach ($this->items as $i) {
         $item_tpl = new ilTemplate("tpl.checklist_item.html", true, true, "Services/UIComponent/Checklist");
         if (!is_array($i["info"]) && $i["info"] != "") {
             $i["info"] = array($i["info"]);
         }
         if (is_array($i["info"]) && count($i["info"]) > 0) {
             foreach ($i["info"] as $info) {
                 $item_tpl->setCurrentBlock("info");
                 $item_tpl->setVariable("INFO_MSG", $info);
                 $item_tpl->parseCurrentBlock();
             }
         }
         $item_tpl->setVariable("TXT_STEP", $i["txt"]);
         switch ($i["status"]) {
             case self::STATUS_OK:
                 $item_tpl->setVariable("STATUS_IMG", ilUtil::getImagePath("icon_ok.svg"));
                 $item_tpl->setVariable("STATUS_ALT", $lng->txt("uic_checklist_ok"));
                 break;
             case self::STATUS_NOT_OK:
                 $item_tpl->setVariable("STATUS_IMG", ilUtil::getImagePath("icon_not_ok.svg"));
                 $item_tpl->setVariable("STATUS_ALT", $lng->txt("uic_checklist_not_ok"));
                 break;
         }
         $list->addEntry($item_tpl->get(), $i["href"], "", "", $i["highlighted"] ? "ilHighlighted" : "");
     }
     $ch_tpl = new ilTemplate("tpl.checklist.html", true, true, "Services/UIComponent/Checklist");
     $ch_tpl->setVariable("LIST", $list->getHTML());
     $panel->setBody($ch_tpl->get());
     return $panel->getHTML();
 }
 /**
  * render
  */
 function render()
 {
     global $lng;
     $tpl = new ilTemplate("tpl.adv_col_sort_input.html", true, true, "Modules/Glossary");
     if (is_array($this->getValue())) {
         foreach ($this->getValue() as $k => $v) {
             $tpl->setCurrentBlock("item");
             $tpl->setVariable("TEXT", $v["text"]);
             $tpl->setVariable("ID", $this->getFieldId() . "~" . $k);
             $tpl->setVariable("SRC_DOWN", ilUtil::getImagePath('icon_down_s.png'));
             $tpl->setVariable("TXT_DOWN", $lng->txt("down"));
             $tpl->setVariable("SRC_UP", ilUtil::getImagePath('icon_up_s.png'));
             $tpl->setVariable("TXT_UP", $lng->txt("up"));
             $tpl->setVariable('NAME', $this->getPostVar() . "[" . $k . "][id]");
             $tpl->setVariable('TNAME', $this->getPostVar() . "[" . $k . "][text]");
             $tpl->setVariable('VAL', ilUtil::prepareFormOutput($v["id"]));
             $tpl->setVariable('TVAL', ilUtil::prepareFormOutput($v["text"]));
             $tpl->parseCurrentBlock();
         }
     }
     return $tpl->get();
 }
Exemplo n.º 21
0
 function index($show_delete = false)
 {
     global $ilUser, $rbacreview, $rbacsystem;
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.cat_admin_users.html', "Modules/Category");
     if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
         $this->toolbar->addButton($this->lng->txt('add_user'), $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create'));
         $this->toolbar->addButton($this->lng->txt('import_users'), $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm'));
     } else {
         ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
     }
     if ($show_delete) {
         $this->tpl->setCurrentBlock("confirm_delete");
         $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
         $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
         $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
         $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
         $this->tpl->parseCurrentBlock();
     }
     $table = new ilUserTableGUI($this, 'index', ilUserTableGUI::MODE_LOCAL_USER);
     $this->tpl->setVariable('USERS_TABLE', $table->getHTML());
     return true;
 }
 /**
  * @param ilObjCloudGUI $gui_class
  * @param               $id
  * @param bool          $delete_files
  * @param bool          $delete_folder
  * @param bool          $download
  * @param bool          $files_visible
  * @param bool          $folders_visible
  *
  * @return string
  * @throws ilCloudException
  */
 public function getFolderHtml(ilObjCloudGUI $gui_class, $id, $delete_files = false, $delete_folder = false, $download = false, $files_visible = false, $folders_visible = false)
 {
     global $lng;
     $node = NULL;
     $node = $this->getFileTree()->getNodeFromId($id);
     if (!$node) {
         throw new ilCloudException(ilCloudException::ID_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION, $id);
     }
     $tree_tpl = new ilTemplate("tpl.cloud_block.html", true, true, "Modules/Cloud/");
     if ($files_visible || $folders_visible) {
         $tree_tpl->setVariable("NODE_ID", $node->getId());
         $block = new ilTemplate("tpl.container_list_block.html", true, true, "Services/Container/");
         if ($node->hasChildren()) {
             $block->setVariable("BLOCK_HEADER_CONTENT", $lng->txt("content"));
             $children = $this->getFileTree()->getSortedListOfChildren($node);
             foreach ($children as $path) {
                 $child_node = $this->getFileTree()->getNodeFromPath($path);
                 if ($child_node->getIsDir() && $folders_visible || !$child_node->getIsDir() && $files_visible) {
                     $block->setCurrentBlock("container_standard_row");
                     if ($child_node->getIsDir()) {
                         $block->setVariable("ROW_ID", "id=xcld_folder_" . $child_node->getId());
                     } else {
                         $block->setVariable("ROW_ID", "id=xcld_file_" . $child_node->getId());
                     }
                     $block->setVariable("BLOCK_ROW_CONTENT", $this->getItemHtml($child_node, $gui_class, $delete_files, $delete_folder, $download));
                     $block->parseCurrentBlock();
                 }
             }
         }
         $this->setBlockVariablePlugin($block);
         $tree_tpl->setVariable("CONTENT", $block->get());
     } else {
         // Nothing is visible
         // $tree_tpl->setVariable("CONTENT", $lng->txt("file_folder_not_visible"));
     }
     $this->setTreeVariablePlugin($tree_tpl, $gui_class, $id, $delete_files, $delete_folder, $download, $files_visible, $folders_visible);
     return $tree_tpl->get();
 }
Exemplo n.º 23
0
 /**
  * Get icon html
  *
  * @param string $a_type icons type ICON_RSS | ICON_ICAL
  * @param string $a_href href
  * @return string icon html
  */
 static function get($a_type, $a_href = "")
 {
     $tpl = new ilTemplate("tpl.rss_icon.html", true, true, "Services/News");
     if ($a_href != "") {
         $tpl->setCurrentBlock("a_start");
         $tpl->setVariable("HREF", $a_href);
         $tpl->parseCurrentBlock();
         $tpl->touchBlock("a_end");
     }
     $text = "";
     switch ($a_type) {
         case self::ICON_RSS:
             $text = "RSS";
             break;
         case self::ICON_RSS_AUDIO:
             $text = "RSS Audio";
             break;
         case self::ICON_RSS_VIDEO:
             $text = "RSS Video";
             break;
         case self::ICON_ICAL:
             $text = "iCal";
             break;
         case self::ICON_ITUNES:
             $text = "iTunes";
             break;
         case self::ICON_ITUNES_AUDIO:
             $text = "iTunes Audio";
             break;
         case self::ICON_ITUNES_VIDEO:
             $text = "iTunes Video";
             break;
     }
     $tpl->setVariable("TEXT", $text);
     return $tpl->get();
 }
 /**
  * Insert property html
  *
  * @return	int	Size
  */
 function insert(&$a_tpl)
 {
     global $lng;
     $tpl = new ilTemplate("tpl.prop_answerwizardinput.html", true, true, "Modules/TestQuestionPool");
     $i = 0;
     foreach ($this->values as $value) {
         if ($this->getSingleline()) {
             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->getPoints()));
                 $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('multiline');
                 $tpl->setVariable("PROPERTY_VALUE", $this->qstObject->prepareTextareaOutput($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("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++;
     }
     $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
     $tpl->setVariable("ANSWER_TEXT", $lng->txt('answer_text'));
     $tpl->setVariable("POINTS_TEXT", $lng->txt('points'));
     $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
     $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/answerwizard.js");
 }
 /**
  * Insert property html
  */
 function insert(&$a_tpl)
 {
     $tpl = new ilTemplate("tpl.prop_background_image.html", true, true, "Services/Style");
     $tpl->setVariable("POSTVAR", $this->getPostVar());
     $int_options = array_merge(array("" => ""), $this->getImages());
     $value = trim($this->getValue());
     if (is_int(strpos($value, "/"))) {
         $current_type = "ext";
         $tpl->setVariable("EXTERNAL_SELECTED", 'checked="checked"');
         $tpl->setVariable("VAL_EXT", ilUtil::prepareFormOutput($value));
     } else {
         $current_type = "int";
         $tpl->setVariable("INTERNAL_SELECTED", 'checked="checked"');
     }
     foreach ($int_options as $option) {
         $tpl->setCurrentBlock("int_option");
         $tpl->setVariable("VAL_INT", $option);
         $tpl->setVariable("TXT_INT", $option);
         if ($current_type == "int" && $value == $option) {
             $tpl->setVariable("INT_SELECTED", 'selected="selected"');
         }
         $tpl->parseCurrentBlock();
     }
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
 }
Exemplo n.º 26
0
 /**
  * @param $aggregate
  *
  * @return ilTemplate
  */
 public function renderAggregateView($aggregate)
 {
     $tpl = new ilTemplate('tpl.il_as_aggregated_answers_table.html', true, true, "Modules/TestQuestionPool");
     foreach ($aggregate as $key => $value) {
         $tpl->setCurrentBlock('aggregaterow');
         $tpl->setVariable('OPTION', $key);
         $tpl->setVariable('COUNT', $value);
         $tpl->parseCurrentBlock();
     }
     return $tpl;
 }
Exemplo n.º 27
0
 public function showPeerReviewOverviewObject()
 {
     global $ilCtrl, $ilTabs, $tpl;
     if (!$this->ass || !$this->ass->getPeerReview()) {
         $ilCtrl->redirect($this, "showOverview");
     }
     $this->checkPermission("write");
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget($this->lng->txt("back"), $ilCtrl->getLinkTarget($this, "listAssignments"));
     include_once "Modules/Exercise/classes/class.ilExAssignmentPeerReviewOverviewTableGUI.php";
     $tbl = new ilExAssignmentPeerReviewOverviewTableGUI($this, "showPeerReviewOverview", $this->ass);
     $panel = "";
     $panel_data = $tbl->getPanelInfo();
     if (sizeof($panel_data)) {
         $ptpl = new ilTemplate("tpl.exc_peer_review_overview_panel.html", true, true, "Modules/Exercise");
         foreach ($panel_data as $item) {
             $ptpl->setCurrentBlock("user_bl");
             foreach ($item["value"] as $user) {
                 $ptpl->setVariable("USER", $user);
                 $ptpl->parseCurrentBlock();
             }
             $ptpl->setCurrentBlock("item_bl");
             $ptpl->setVariable("TITLE", $item["title"]);
             $ptpl->parseCurrentBlock();
         }
         include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
         $panel = ilPanelGUI::getInstance();
         $panel->setHeading($this->lng->txt("exc_peer_review_overview_invalid_users"));
         $panel->setBody($ptpl->get());
         $panel = $panel->getHTML();
     }
     $tpl->setContent($tbl->getHTML() . $panel);
 }
 /**
  * Show links to references
  * @param int $a_obj_id $obj_id
  * @return
  */
 protected function addReferenceLinks($a_obj_id)
 {
     global $tree;
     $tpl = new ilTemplate('tpl.cal_reference_links.html', true, true, 'Services/Calendar');
     foreach (ilObject::_getAllReferences($a_obj_id) as $ref_id => $ref_id) {
         include_once './Services/Link/classes/class.ilLink.php';
         $parent_ref_id = $tree->getParentId($ref_id);
         $parent_obj_id = ilObject::_lookupObjId($parent_ref_id);
         $parent_type = ilObject::_lookupType($parent_obj_id);
         $parent_title = ilObject::_lookupTitle($parent_obj_id);
         $type = ilObject::_lookupType($a_obj_id);
         $title = ilObject::_lookupTitle($a_obj_id);
         $tpl->setCurrentBlock('reference');
         $tpl->setVariable('PIMG_SRC', ilUtil::getTypeIconPath($parent_type, $parent_obj_id, 'tiny'));
         $tpl->setVariable('PIMG_ALT', $this->lng->txt('obj_' . $parent_type));
         $tpl->setVariable('PARENT_TITLE', $parent_title);
         $tpl->setVariable('PARENT_HREF', ilLink::_getLink($parent_ref_id));
         $tpl->setVariable('SRC', ilUtil::getTypeIconPath($type, $a_obj_id, 'tiny'));
         $tpl->setVariable('ALT', $this->lng->txt('obj_' . $type));
         $tpl->setVariable('TITLE', $title);
         $tpl->setVariable('HREF', ilLink::_getLink($ref_id));
         $tpl->parseCurrentBlock();
     }
     return $tpl->get();
 }
Exemplo n.º 29
0
 /**
  * Render single of dnd page view
  *
  * @param ilTemplate $a_tpl
  * @param string $a_type
  * @param int $a_id
  * @param string $a_content
  * @param array $a_menu
  * @param bool $a_spacer
  * @param string $a_subtitle
  * @param string $a_heading
  */
 function renderPageNode(ilTemplate $a_tpl, $a_type, $a_id, $a_content = null, array $a_menu = null, $a_spacer = false, $a_subtitle = false, $a_status = false, $a_heading = false)
 {
     global $ilCtrl, $lng;
     $node_id = $a_type . "_" . $a_id;
     if ($a_content !== null) {
         $drag = "";
         $double = false;
         switch ($a_type) {
             case "block":
                 $caption = $lng->txt("questionblock");
                 break;
             case "question":
                 if ($a_heading) {
                     $a_content = "<div class=\"questionheading\">" . $a_heading . "</div>" . $a_content;
                 }
                 $caption = $lng->txt("question") . ": " . $a_subtitle;
                 $drag = "_drag";
                 $double = true;
                 break;
             case "heading":
                 $caption = $lng->txt("heading");
                 break;
             default:
                 return;
         }
         if ($a_status) {
             $caption .= " (" . $a_status . ")";
         }
         $a_tpl->setCurrentBlock("list_item");
         $a_tpl->setVariable("NODE_ID", $node_id);
         $a_tpl->setVariable("NODE_DRAG", $drag);
         $a_tpl->setVariable("TXT_NODE_TYPE", $caption);
         $a_tpl->setVariable("TXT_NODE_CONTENT", $a_content);
         if ($double) {
             $a_tpl->setVariable("VAL_DBLCLICK", "onDblClick=\"doMouseDblClick(event,this.id);\"");
         }
         $a_tpl->parseCurrentBlock();
     }
     // drop area menu
     if ($a_menu) {
         foreach ($a_menu as $mcnt => $menu_item) {
             $a_tpl->setCurrentBlock("menu_cmd");
             $a_tpl->setVariable("TXT_MENU_CMD", $menu_item["text"]);
             $a_tpl->setVariable("MENU_CMD", "renderPage");
             $a_tpl->setVariable("FC", $menu_item["cmd"]);
             $a_tpl->setVariable("MCNT", $mcnt);
             $a_tpl->setVariable("CMD_NODE", $node_id);
             $a_tpl->parseCurrentBlock();
         }
         $a_tpl->setCurrentBlock("drop_area_menu");
         $a_tpl->setVariable("MNODE_ID", $node_id);
         $a_tpl->parseCurrentBlock();
     }
     if ($a_spacer) {
         $a_tpl->setCurrentBlock("drop_area");
         $a_tpl->setVariable("DNODE_ID", $node_id);
         $a_tpl->setVariable("IMG_BLANK", ilUtil::getImagePath("spacer.png"));
         $a_tpl->parseCurrentBlock();
     }
     $a_tpl->setCurrentBlock("element");
     $a_tpl->parseCurrentBlock();
 }
 /**
  * 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();
 }