/**
  * Get content HTML for main column.
  */
 function getMainContent()
 {
     global $ilBench, $tree, $ilTabs, $ilAccess;
     // see bug #7452
     //		$ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
     $tpl = new ilTemplate("tpl.container_page.html", true, true, "Services/Container");
     // get all sub items
     $ilBench->start("ilContainerGUI", "0100_getSubItems");
     $this->items = $this->getContainerObject()->getSubItems($this->getContainerGUI()->isActiveAdministrationPanel());
     $ilBench->stop("ilContainerGUI", "0100_getSubItems");
     // Show introduction, if repository is empty
     // @todo: maybe we move this
     if (count($this->items) == 0 && $this->getContainerObject()->getRefId() == ROOT_FOLDER_ID && $ilAccess->checkAccess("write", "", $this->getContainerObject()->getRefId())) {
         $html = $this->getIntroduction();
         $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
     } else {
         $html = $this->renderItemList();
         $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
     }
     // @todo: Move this completely to GUI class?
     /*		$this->getContainerGUI()->adminCommands = $this->adminCommands;
     		$this->getContainerGUI()->showAdministrationPanel($tpl);
     		$this->getContainerGUI()->showPossibleSubObjects();
     		$this->getContainerGUI()->showPermanentLink($tpl);*/
     $this->html = $tpl->get();
     return $this->html;
 }
 /**
  * Get assignment header for overview
  */
 function getReport($a_data)
 {
     global $lng, $ilCrtl, $ilUser;
     $tpl = new ilTemplate("tpl.eph_report_results.html", true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus");
     $tpl->setVariable("CONTENT", $a_data);
     return $tpl->get();
 }
 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;
 }
 /**
  * Returns template HTML.
  *
  * @global ilLanguage $lng
  * @return string
  */
 public function getHtml()
 {
     global $lng;
     $tpl = new ilTemplate("tpl.chatroom_current_smiley_image.html", true, true, "Modules/Chatroom");
     $tpl->setVariable("IMAGE_ALT", $lng->txt("chatroom_current_smiley_image"));
     $tpl->setVariable("IMAGE_PATH", $this->value);
     return $tpl->get();
 }
 private function showCmd()
 {
     $selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST);
     $testSession = $this->testSessionFactory->getSession();
     $this->skillEvaluation->init()->evaluate($testSession->getActiveId(), $testSession->getLastFinishedPass(), $testSession->getUserId());
     $evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($testSession->getUserId(), $selectedSkillProfile);
     $personalSkillsGUI = $this->buildPersonalSkillsGUI($testSession->getUserId(), $selectedSkillProfile);
     $this->tpl->setContent($this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI));
 }
 public function getHtml()
 {
     global $ilCtrl;
     $tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
     $tpl->setVariable("FIELD_ID", $this->getPostVar());
     $tpl->setVariable("AJAX_LINK", $ilCtrl->getLinkTargetByClass("ildatacollectionrecordeditgui", "searchObjects"));
     $tpl->setVariable("LOADER_PATH", ilUtil::getImagePath("loader.gif"));
     return $this->title_input->getToolbarHTML() . "<br /><br />" . $this->search_input->getTableFilterHTML() . $this->hidden_input->getToolbarHTML() . " <a href='#' id='search_button_" . $this->getPostVar() . "'>Search</a>" . $tpl->get();
 }
 /**
  * Get HTML for calendar
  */
 function getHTML()
 {
     global $lng;
     $ftpl = new ilTemplate("tpl.calendar_block_frame.html", true, true, "Services/Calendar");
     $tpl = new ilTemplate("tpl.calendar_block.html", true, true, "Services/Calendar");
     $this->addMiniMonth($tpl);
     $ftpl->setVariable("BLOCK_TITLE", $lng->txt("calendar"));
     $ftpl->setVariable("CONTENT", $tpl->get());
     return $ftpl->get();
 }
 /**
  * Save config
  */
 public function save()
 {
     $form = new ilCertificateConfigFormGUI($this);
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->pl->txt('msg_save_config'), true);
         $this->ctrl->redirect($this, 'configure');
     } else {
         $form->setValuesByPost();
         $this->tpl->setContent($form->getHTML());
     }
 }
 private function showSkillThresholdsCmd()
 {
     $table = $this->buildTableGUI();
     $skillLevelThresholdList = $this->buildSkillLevelThresholdList();
     $skillLevelThresholdList->loadFromDb();
     $table->setSkillLevelThresholdList($skillLevelThresholdList);
     $assignmentList = $this->buildSkillQuestionAssignmentList();
     $assignmentList->loadFromDb();
     $table->setData($assignmentList->getUniqueAssignedSkills());
     $this->tpl->setContent($this->ctrl->getHTML($table));
 }
 /**
  * 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 HTML for calendar
  */
 function getHTML()
 {
     global $lng;
     $ftpl = new ilTemplate("tpl.calendar_block_frame.html", true, true, "Services/Calendar");
     $tpl = new ilTemplate("tpl.calendar_block.html", true, true, "Services/Calendar");
     $this->addMiniMonth($tpl);
     $ftpl->setVariable("IMG_BLOCK", ilUtil::getImagePath("icon_cals_s.png"));
     $ftpl->setVariable("BLOCK_TITLE", $lng->txt("calendar"));
     $ftpl->setVariable("CONTENT", $tpl->get());
     $ftpl->setVariable("ALT_BLOCK", $lng->txt("icon") . " " . $lng->txt("calendar"));
     return $ftpl->get();
 }
 /**
  * @return string
  */
 public function getHtml()
 {
     global $ilCtrl;
     $tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
     $tpl->setVariable("FIELD_ID", $this->getPostVar());
     $tpl->setVariable("AJAX_LINK", $ilCtrl->getLinkTargetByClass("ildatacollectionrecordeditgui", "searchObjects"));
     $tpl->setVariable("LOADER_PATH", ilUtil::getImagePath("loader.svg"));
     $out = $this->title_input->getToolbarHTML();
     $out .= "<a href='#' style='display:inline-block;' id='remove_{$this->getPostVar()}'>" . ilGlyphGUI::get(ilGlyphGUI::REMOVE) . "</a>";
     $out .= $this->search_input->getTableFilterHTML();
     $out .= $this->hidden_input->getToolbarHTML();
     $out .= "<a href='#' id='search_button_" . $this->getPostVar() . "'>" . $this->lng->txt('search') . "</a>";
     $out .= $tpl->get();
     return $out;
 }
Esempio n. 13
0
 /**
  * Render
  */
 public function getHTML()
 {
     global $tpl;
     if (!$this->isValid()) {
         return;
     }
     $this->initJS();
     $chart = new ilTemplate("tpl.grid2.html", true, true, "Services/Chart");
     $chart->setVariable("ID", $this->id);
     $chart->setVariable("WIDTH", $this->width);
     $chart->setVariable("HEIGHT", $this->height);
     $data = array();
     foreach ($this->data as $idx => $series) {
         $data[] = $series->getData();
     }
     include_once "./Services/JSON/classes/class.ilJsonUtil.php";
     $cfg = array();
     $cfg["series"] = array("bubbles" => array("active" => true, "show" => true, "bubblelabel" => array("show" => true), "linewidth" => 2));
     $cfg["grid"] = array("hoverable" => true, "clickable" => true, "editable" => true);
     if ($ticks = $this->getTicks()) {
         foreach ($ticks as $axis => $def) {
             if (is_array($def)) {
                 foreach ($def as $k => $v) {
                     $cfg[$axis . "axis"]["ticks"][] = array($k, $v);
                 }
             }
         }
     }
     if ($this->x_min !== false) {
         $cfg["xaxis"]["min"] = $this->x_min;
     }
     if ($this->x_max !== false) {
         $cfg["xaxis"]["max"] = $this->x_max;
     }
     if ($this->y_min !== false) {
         $cfg["yaxis"]["min"] = $this->y_min;
     }
     if ($this->y_max !== false) {
         $cfg["yaxis"]["max"] = $this->y_max;
     }
     //ticks: [[1, "m"], [2, "n"], [3, "o"], [4, "p"], [5, "q"], [6, "r"], [7, "s"]]
     //echo ilJsonUtil::encode($cfg);
     $chart->setVariable("CFG", ilJsonUtil::encode($cfg));
     $chart->setVariable("DATA", ilJsonUtil::encode($data));
     $ret = $chart->get();
     //echo htmlentities($ret);
     return $ret;
 }
 public function showAttachments()
 {
     /**
      * @var $ilToolbar ilToolbarGUI
      */
     global $ilToolbar;
     $this->tpl->setTitle($this->lng->txt('mail'));
     require_once 'Services/Form/classes/class.ilFileInputGUI.php';
     $attachment = new ilFileInputGUI($this->lng->txt('upload'), 'userfile');
     $attachment->setRequired(true);
     $attachment->setSize(20);
     $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'uploadFile'), true);
     $ilToolbar->addInputItem($attachment);
     $ilToolbar->addFormButton($this->lng->txt('upload'), 'uploadFile');
     require_once 'Services/Mail/classes/class.ilMailAttachmentTableGUI.php';
     $table = new ilMailAttachmentTableGUI($this, 'showAttachments');
     $mailData = $this->umail->getSavedData();
     $files = $this->mfile->getUserFilesData();
     $data = array();
     $counter = 0;
     foreach ($files as $file) {
         $checked = false;
         if (is_array($mailData['attachments']) && in_array($file['name'], $mailData['attachments'])) {
             $checked = true;
         }
         $data[$counter] = array('checked' => $checked, 'filename' => $file['name'], 'filesize' => (int) $file['size'], 'filecreatedate' => (int) $file['ctime']);
         ++$counter;
     }
     $table->setData($data);
     $this->tpl->setContent($table->getHtml());
     $this->tpl->show();
 }
 private function showPasswordFormCmd()
 {
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     require_once 'Services/Form/classes/class.ilPasswordInputGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTitle($this->lng->txt("tst_password_form"));
     $form->setDescription($this->lng->txt("tst_password_introduction"));
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->addCommandButton(self::CMD_SAVE_ENTERED_PASSWORD, $this->lng->txt("submit"));
     $form->addCommandButton(self::CMD_BACK_TO_INFO_SCREEN, $this->lng->txt("cancel"));
     $inp = new ilPasswordInputGUI($this->lng->txt("tst_password"), 'password');
     $inp->setRequired(true);
     $inp->setRetype(false);
     $form->addItem($inp);
     $this->tpl->setVariable($this->parentGUI->getContentBlockName(), $this->ctrl->getHTML($form));
 }
 function render()
 {
     global $ilUser;
     $tpl = new ilTemplate("tpl.prop_datetime.html", true, true, "Services/Form");
     $tpl->setCurrentBlock("prop_time");
     if ($this->getMode() == self::MODE_SELECT) {
         if (is_a($this->getDate(), 'ilDate')) {
             $date_info = $this->getDate()->get(IL_CAL_FKT_GETDATE, '', 'UTC');
         } elseif (is_a($this->getDate(), 'ilDateTime')) {
             $date_info = $this->getDate()->get(IL_CAL_FKT_GETDATE, '', $ilUser->getTimeZone());
         } else {
             $this->setDate(new ilDateTime(time(), IL_CAL_UNIX));
             $date_info = $this->getDate()->get(IL_CAL_FKT_GETDATE, '', $ilUser->getTimeZone());
         }
         // display invalid input again
         if (is_array($this->invalid_input)) {
             $date_info['year'] = $this->invalid_input['y'];
             $date_info['mon'] = $this->invalid_input['m'];
             $date_info['mday'] = $this->invalid_input['d'];
         }
     }
     if ($this->getMode() == self::MODE_SELECT) {
         $tpl->setVariable("TIME_SELECT", ilUtil::makeTimeSelect($this->getPostVar() . "[time]", !$this->getShowSeconds(), $date_info['hours'], $date_info['minutes'], $date_info['seconds'], true, array('minute_steps' => $this->getMinuteStepSize(), 'disabled' => $this->getDisabled())));
     }
     $tpl->parseCurrentBlock();
     return $tpl->get();
 }
Esempio n. 17
0
 /**
  * Display mark schema
  * @param ilPropertyFormGUI $ects_form
  */
 protected function showMarkSchema(ilPropertyFormGUI $ects_form = null)
 {
     if (!$this->object->canEditMarks()) {
         ilUtil::sendInfo($this->lng->txt('cannot_edit_marks'));
     }
     $this->toolbar->setFormAction($this->ctrl->getFormAction($this, 'showMarkSchema'));
     if ($this->object->canEditMarks()) {
         require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
         $create_simple_mark_schema_button = ilSubmitButton::getInstance();
         $create_simple_mark_schema_button->setCaption($this->lng->txt('tst_mark_create_simple_mark_schema'), false);
         $create_simple_mark_schema_button->setCommand('addSimpleMarkSchema');
         $this->toolbar->addButtonInstance($create_simple_mark_schema_button);
     }
     require_once 'Modules/Test/classes/tables/class.ilMarkSchemaTableGUI.php';
     $mark_schema_table = new ilMarkSchemaTableGUI($this, 'showMarkSchema', '', $this->object);
     $content_parts = array($mark_schema_table->getHTML());
     if ($this->objectSupportsEctsGrades() && $this->object->canEditEctsGrades()) {
         if (!$ects_form instanceof ilPropertyFormGUI) {
             $ects_form = $this->getEctsForm();
             $this->populateEctsForm($ects_form);
         }
         $content_parts[] = $ects_form->getHTML();
     }
     $this->tpl->setContent(implode('<br />', $content_parts));
 }
Esempio n. 18
0
 function __showRolesTable($a_result_set, $a_from = "")
 {
     if (!$this->ilAccess->checkAccess("cat_administrate_users", "", $_GET["ref_id"])) {
         ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
         $this->ctrl->redirect($this, "");
     }
     $tbl =& $this->parent_gui->__initTableGUI();
     $tpl =& $tbl->getTemplateObject();
     // SET FORMAACTION
     $tpl->setCurrentBlock("tbl_form_header");
     $this->ctrl->setParameter($this, 'obj_id', $_GET['obj_id']);
     $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $tpl->parseCurrentBlock();
     // SET FOOTER BUTTONS
     $tpl->setVariable("COLUMN_COUNTS", 4);
     $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
     $tpl->setCurrentBlock("tbl_action_button");
     $tpl->setVariable("BTN_NAME", "assignSave");
     $tpl->setVariable("BTN_VALUE", $this->lng->txt("change_assignment"));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("tbl_action_row");
     $tpl->setVariable("TPLPATH", $this->tpl->tplPath);
     $tpl->parseCurrentBlock();
     $tmp_obj =& ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
     $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
     $tbl->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment"));
     $tbl->setHeaderNames(array('', $this->lng->txt("title"), $this->lng->txt('description'), $this->lng->txt("type")));
     $tbl->setHeaderVars(array("", "title", "description", "type"), array("ref_id" => $this->object->getRefId(), "cmd" => "assignRoles", "obj_id" => $_GET['obj_id'], "cmdClass" => "ilobjcategorygui", "cmdNode" => $_GET["cmdNode"]));
     $tbl->setColumnWidth(array("4%", "35%", "45%", "16%"));
     $this->set_unlimited = true;
     $this->parent_gui->__setTableGUIBasicData($tbl, $a_result_set, $a_from, true);
     $tbl->render();
     $this->tpl->setVariable("ROLES_TABLE", $tbl->tpl->get());
     return true;
 }
 public function insert($a_tpl)
 {
     global $lng;
     $subtpl = new ilTemplate("tpl.mail_new_placeholders.html", false, false, "Services/Mail");
     $subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('mail_nacc_use_placeholder'));
     $subtpl->setVariable('TXT_PLACEHOLDERS_ADVISE', sprintf($lng->txt('placeholders_advise'), '<br />'));
     $subtpl->setVariable('TXT_MAIL_SALUTATION', $lng->txt('mail_nacc_salutation'));
     $subtpl->setVariable('TXT_FIRST_NAME', $lng->txt('firstname'));
     $subtpl->setVariable('TXT_LAST_NAME', $lng->txt('lastname'));
     $subtpl->setVariable('TXT_LOGIN', $lng->txt('mail_nacc_login'));
     $subtpl->setVariable('TXT_ILIAS_URL', $lng->txt('mail_nacc_ilias_url'));
     $subtpl->setVariable('TXT_CLIENT_NAME', $lng->txt('mail_nacc_client_name'));
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $subtpl->get());
     $a_tpl->parseCurrentBlock();
 }
 private function showFormCmd(ilPropertyFormGUI $form = null)
 {
     if ($form === null) {
         $form = $this->buildForm();
     }
     $this->tpl->setContent($this->ctrl->getHTML($form));
 }
 /**
  * list fields
  */
 public function listFields()
 {
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     $tables = $this->parent_obj->object->getTables();
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     $table_selection = new ilSelectInputGUI('', 'table_id');
     $table_selection->setOptions($options);
     $table_selection->setValue($this->table_id);
     $this->toolbar->setFormAction($this->ctrl->getFormActionByClass("ilDataCollectionFieldListGUI", "doTableSwitch"));
     $this->toolbar->addText($this->lng->txt("dcl_table"));
     $this->toolbar->addInputItem($table_selection);
     $this->toolbar->addFormButton($this->lng->txt('change'), 'doTableSwitch');
     $this->toolbar->addSeparator();
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "create"));
     $this->toolbar->addSeparator();
     $this->ctrl->setParameterByClass("ildatacollectiontableeditgui", "table_id", $this->table_id);
     $this->toolbar->addButton($this->lng->txt("dcl_table_settings"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "edit"));
     $this->toolbar->addButton($this->lng->txt("dcl_delete_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "confirmDelete"));
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_field"), $this->ctrl->getLinkTargetByClass("ildatacollectionfieldeditgui", "create"));
     // requested not to implement this way...
     //        $tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     require_once './Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php';
     $list = new ilDataCollectionFieldListTableGUI($this, $this->ctrl->getCmd(), $this->table_id);
     $this->tpl->setContent($list->getHTML());
 }
 public function startImport()
 {
     $form = $this->initForm("startImport");
     if (!$form->checkInput()) {
         $this->tpl->setContent($form->getHTML());
     } else {
         $file = $form->getInput("import_file");
         $importer = new ilOrgUnitSimpleImport();
         try {
             $file_path = $file["tmp_name"];
             $file_type = pathinfo($file["name"], PATHINFO_EXTENSION);
             $file_name = pathinfo($file["name"], PATHINFO_FILENAME);
             if ($file_type == "zip") {
                 $extract_path = $file_path . '_extracted/';
                 $extracted_file = $extract_path . $file_name . '/manifest.xml';
                 $zip = new ZipArchive();
                 $res = $zip->open($file_path);
                 if ($res === true) {
                     $zip->extractTo($extract_path);
                     $zip->close();
                     if (file_exists($extracted_file)) {
                         $file_path = $extracted_file;
                     }
                 }
             }
             $importer->simpleImport($file_path);
         } catch (Exception $e) {
             $this->ilLog->write($e->getMessage() . " - " . $e->getTraceAsString());
             ilUtil::sendFailure($this->lng->txt("import_failed"), true);
             $this->ctrl->redirect($this, "render");
         }
         $this->displayImportResults($importer);
     }
 }
 /**
  * This form is used to show a message to the user.
  * @param string $text
  */
 public function showMessageForm($text)
 {
     ilStartUpGUI::initStartUpTemplate('tpl.pwassist_message.html', true);
     $this->tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('password_assistance'));
     $this->tpl->setVariable('IMG_PAGEHEADLINE', ilUtil::getImagePath('icon_auth_b.png'));
     $this->tpl->setVariable('TXT_TEXT', str_replace("\\n", '<br />', $text));
     $this->tpl->show();
 }
Esempio n. 24
0
 protected function renderFullscreen()
 {
     global $tpl, $lng, $ilMainMenu;
     if (!ilImprint::isActive()) {
         ilUtil::redirect("ilias.php?baseClass=ilPersonalDesktopGUI");
     }
     $tpl->getStandardTemplate();
     $this->setRawPageContent(true);
     $html = $this->showPage();
     $itpl = new ilTemplate("tpl.imprint.html", true, true, "Services/Imprint");
     $itpl->setVariable("PAGE_TITLE", $lng->txt("imprint"));
     $itpl->setVariable("IMPRINT", $html);
     unset($html);
     $tpl->setContent($itpl->get());
     $ilMainMenu->showLogoOnly(true);
     echo $tpl->show("DEFAULT", true, false);
     exit;
 }
Esempio n. 25
0
 public function confirmDelete()
 {
     $conf = new ilConfirmationGUI();
     $conf->setFormAction($this->ctrl->getFormAction($this));
     $conf->setHeaderText($this->pl->txt('msg_confirm_delete'));
     $conf->setConfirm($this->pl->txt('check_delete'), self::CMD_DELETE);
     $conf->setCancel($this->pl->txt('check_cancel'), self::CMD_INDEX);
     $this->tpl->setContent($conf->getHTML());
 }
 private function showVirtualPassCmd()
 {
     $testSession = $this->testSessionFactory->getSession();
     if (!$this->object->getShowPassDetails()) {
         $executable = $this->object->isExecutable($testSession, $testSession->getUserId());
         if ($executable["executable"]) {
             $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
         }
     }
     $this->tabs->setBackTarget($this->lng->txt('tst_results_back_introduction'), $this->ctrl->getLinkTargetByClass('ilobjtestgui', 'participants'));
     $toolbar = $this->buildUserTestResultsToolbarGUI();
     $this->ctrl->setParameter($this, 'pdf', '1');
     $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, 'showVirtualPass'));
     $this->ctrl->setParameter($this, 'pdf', '');
     $toolbar->build();
     $virtualSequence = $this->service->buildVirtualSequence($testSession);
     $userResults = $this->service->getVirtualSequenceUserResults($virtualSequence);
     require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
     $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
     $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $virtualSequence);
     $objectivesList->loadObjectivesTitles();
     require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
     $testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $this->objCache);
     $testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
     $testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
     $testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
     $testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
     $testResultHeaderLabelBuilder->initObjectiveOrientedMode();
     $tpl = new ilTemplate('tpl.il_as_tst_virtual_pass_details.html', false, false, 'Modules/Test');
     $tpl->setVariable("TEXT_HEADING", $testResultHeaderLabelBuilder->getVirtualPassDetailsHeaderLabel($objectivesList->getUniqueObjectivesString()));
     $command_solution_details = "";
     if ($this->object->getShowSolutionDetails()) {
         $command_solution_details = "outCorrectSolution";
     }
     $questionAnchorNav = false;
     if ($this->object->canShowSolutionPrintview()) {
         $questionAnchorNav = true;
         $list_of_answers = $this->getPassListOfAnswers($userResults, $testSession->getActiveId(), null, $this->object->getShowSolutionListComparison(), false, false, false, true, $objectivesList, $testResultHeaderLabelBuilder);
         $tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
     }
     $overview = $this->getPassDetailsOverview($userResults, $testSession->getActiveId(), null, $this, "showVirtualPass", $command_solution_details, $questionAnchorNav, $objectivesList);
     $tpl->setVariable("PASS_DETAILS", $overview);
     $this->populateContent($this->ctrl->getHTML($toolbar) . $tpl->get());
 }
 private function showConfirmation(ilPropertyFormGUI $form)
 {
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmation = new ilConfirmationGUI();
     $confirmation->setHeaderText($this->lng->txt('tst_trigger_result_refreshing'));
     $confirmation->setFormAction($this->ctrl->getFormAction($this));
     $confirmation->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
     $confirmation->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_SAVE_FORM);
     foreach ($form->getInputItemsRecursive() as $key => $item) {
         //vd("$key // {$item->getType()} // ".json_encode($_POST[$item->getPostVar()]));
         switch ($item->getType()) {
             case 'section_header':
                 continue;
             case 'datetime':
                 list($date, $time) = explode(' ', $item->getDate()->get(IL_CAL_DATETIME));
                 if ($item->getMode() == ilDateTimeInputGUI::MODE_SELECT) {
                     list($y, $m, $d) = explode('-', $date);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][y]", $y);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][m]", $m);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][d]", $d);
                     if ($item->getShowTime()) {
                         list($h, $m, $s) = explode(':', $time);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][h]", $h);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][m]", $m);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][s]", $s);
                     }
                 } else {
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date]", $date);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[time]", $time);
                 }
                 break;
             case 'duration':
                 $confirmation->addHiddenItem("{$item->getPostVar()}[MM]", (int) $item->getMonths());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[dd]", (int) $item->getDays());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[hh]", (int) $item->getHours());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[mm]", (int) $item->getMinutes());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[ss]", (int) $item->getSeconds());
                 break;
             case 'checkboxgroup':
                 if (is_array($item->getValue())) {
                     foreach ($item->getValue() as $option) {
                         $confirmation->addHiddenItem("{$item->getPostVar()}[]", $option);
                     }
                 }
                 break;
             case 'checkbox':
                 if ($item->getChecked()) {
                     $confirmation->addHiddenItem($item->getPostVar(), 1);
                 }
                 break;
             default:
                 $confirmation->addHiddenItem($item->getPostVar(), $item->getValue());
         }
     }
     $this->tpl->setContent($this->ctrl->getHTML($confirmation));
 }
Esempio n. 28
0
 /**
  * Update (save) type
  */
 protected function update()
 {
     $form = new ilOrgUnitTypeFormGUI($this, new ilOrgUnitType((int) $_GET['type_id']));
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
         $this->ctrl->redirect($this);
     } else {
         $this->tpl->setContent($form->getHTML());
     }
 }
Esempio n. 29
0
 /**
  * shows language select box
  */
 function showLangSel($a_name, $a_value = "")
 {
     $tpl = new ilTemplate("tpl.lang_selection.html", true, true, "Services/MetaData");
     $languages = ilMDLanguageItem::_getLanguages();
     foreach ($languages as $code => $text) {
         $tpl->setCurrentBlock("lg_option");
         $tpl->setVariable("VAL_LG", $code);
         $tpl->setVariable("TXT_LG", $text);
         if ($a_value != "" && $a_value == $code) {
             $tpl->setVariable("SELECTED", "selected");
         }
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
     $tpl->setVariable("SEL_NAME", $a_name);
     $return = $tpl->get();
     unset($tpl);
     return $return;
 }
 /**
  * Enable all settings - Confirmation
  */
 private function showResetTemplateConfirmationCmd()
 {
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmationGUI = new ilConfirmationGUI();
     $confirmationGUI->setFormAction($this->ctrl->getFormAction($this));
     $confirmationGUI->setHeaderText($this->lng->txt("test_confirm_template_reset"));
     $confirmationGUI->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
     $confirmationGUI->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_RESET_TPL);
     $this->tpl->setContent($this->ctrl->getHTML($confirmationGUI));
 }