/** * Confirm settings template deletion */ function confirmSettingsTemplateDeletion() { global $ilCtrl, $tpl, $lng; if (!is_array($_POST["tid"]) || count($_POST["tid"]) == 0) { ilUtil::sendInfo($lng->txt("no_checkbox"), true); $ilCtrl->redirect($this, "listSettingsTemplates"); } else { include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php"; $cgui = new ilConfirmationGUI(); $cgui->setFormAction($ilCtrl->getFormAction($this)); $cgui->setHeaderText($lng->txt("adm_sure_delete_settings_template")); $cgui->setCancel($lng->txt("cancel"), "listSettingsTemplates"); $cgui->setConfirm($lng->txt("delete"), "deleteSettingsTemplate"); foreach ($_POST["tid"] as $i) { $cgui->addItem("tid[]", $i, ilSettingsTemplate::lookupTitle($i)); } $tpl->setContent($cgui->getHTML()); } }
/** * Display and fill the properties form of the test * * @access public */ function propertiesObject(ilPropertyFormGUI $a_form = null) { global $ilTabs, $ilHelp; $this->handleWriteAccess(); $ilTabs->activateTab("settings"); if ($this->object->get360Mode()) { $ilHelp->setScreenId("settings_360"); } if (!$a_form) { $a_form = $this->initPropertiesForm(); } // using template? $message = ""; if ($this->object->getTemplate()) { $link = $this->ctrl->getLinkTarget($this, "confirmResetTemplate"); $link = "<a href=\"" . $link . "\">" . $this->lng->txt("survey_using_template_link") . "</a>"; $message = "<div style=\"margin-top:10px\">" . $this->tpl->getMessageHTML(sprintf($this->lng->txt("survey_using_template"), ilSettingsTemplate::lookupTitle($this->object->getTemplate()), $link), "info") . "</div>"; } $this->tpl->setContent($a_form->getHTML() . $message); }
/** * Display and fill the properties form of the test * * @access public */ function propertiesObject(ilPropertyFormGUI $a_form = null) { global $ilAccess; if (!$ilAccess->checkAccess("write", "", $_GET["ref_id"])) { $this->ctrl->redirect($this, ""); } if (!$a_form) { $a_form = $this->initPropertiesForm(); } // using template? $message = ""; if ($this->object->getTemplate()) { $link = $this->ctrl->getLinkTarget($this, "confirmResetTemplate"); $link = "<a href=\"" . $link . "\">" . $this->lng->txt("survey_using_template_link") . "</a>"; $message = "<div style=\"margin-top:10px\">" . $this->tpl->getMessageHTML(sprintf($this->lng->txt("survey_using_template"), ilSettingsTemplate::lookupTitle($this->object->getTemplate()), $link), "info") . "</div>"; } $this->tpl->setContent($a_form->getHTML() . $message); }