/**
  * 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();
 }
 /**
  * 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;
 }
 /**
  * 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();
 }
 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();
 }
 /**
  * cmd function
  */
 function perminfo()
 {
     $tpl = new ilTemplate("tpl.info_layout.html", false, false, "Services/AccessControl");
     $tpl->setVariable("INFO_SUMMARY", $this->accessStatusInfo());
     $tpl->setVariable("INFO_PERMISSIONS", $this->accessPermissionsTable());
     $tpl->setVariable("INFO_ROLES", $this->availableRolesTable());
     $tpl->setVariable("INFO_REMARK_INTERRUPTED", $this->lng->txt('info_remark_interrupted'));
     $this->tpl->setVariable("ADM_CONTENT", $tpl->get());
     $this->addToolbar();
 }
 /**
  * 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();
 }
Example #7
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;
 }
 /**
  * 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();
 }
 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();
 }
 /**
  * @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;
 }
 /**
  * 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());
 }
 public function show()
 {
     require_once 'class.ilTestEvaluationGUI.php';
     require_once './Services/PDFGeneration/classes/class.ilPDFGeneration.php';
     global $ilUser;
     $template = new ilTemplate("tpl.il_as_tst_submission_review.html", TRUE, TRUE, "Modules/Test");
     $this->ilCtrl->setParameter($this, "skipfinalstatement", 1);
     $template->setVariable("FORMACTION", $this->ilCtrl->getFormAction($this->testOutputGUI, 'redirectBack') . '&reviewed=1');
     $template->setVariable("BUTTON_CONTINUE", $this->lng->txt("btn_next"));
     $template->setVariable("BUTTON_BACK", $this->lng->txt("btn_previous"));
     if ($this->test->getListOfQuestionsEnd()) {
         $template->setVariable("CANCEL_CMD", 'outQuestionSummary');
     } else {
         $template->setVariable("CANCEL_CMD", 'backFromSummary');
     }
     $active = $this->test->getActiveIdOfUser($ilUser->getId());
     $testevaluationgui = new ilTestEvaluationGUI($this->test);
     $results = $this->test->getTestResult($active, $this->testSession->getPass());
     $results_output = $testevaluationgui->getPassListOfAnswers($results, $active, $this->testSession->getPass(), false, false, false, false);
     if ($this->test->getShowExamviewPdf()) {
         $template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
         global $ilSetting;
         $inst_id = $ilSetting->get('inst_id', null);
         $path = ilUtil::getWebspaceDir() . '/assessment/' . $this->testOutputGUI->object->getId() . '/exam_pdf';
         if (!is_dir($path)) {
             ilUtil::makeDirParents($path);
         }
         $filename = $path . '/exam_N' . $inst_id . '-' . $this->testOutputGUI->object->getId() . '-' . $active . '-' . $this->testSession->getPass() . '.pdf';
         require_once 'class.ilTestPDFGenerator.php';
         ilTestPDFGenerator::generatePDF($results_output, ilTestPDFGenerator::PDF_OUTPUT_FILE, $filename);
         $template->setVariable("PDF_FILE_LOCATION", $filename);
     } else {
         $template->setCurrentBlock('prevent_double_form_subm');
         $template->touchBlock('prevent_double_form_subm');
         $template->parseCurrentBlock();
     }
     if ($this->test->getShowExamviewHtml()) {
         if ($this->test->getListOfQuestionsEnd()) {
             $template->setVariable("CANCEL_CMD_BOTTOM", 'outQuestionSummary');
         } else {
             $template->setVariable("CANCEL_CMD_BOTTOM", 'backFromSummary');
         }
         $template->setVariable("BUTTON_CONTINUE_BOTTOM", $this->lng->txt("btn_next"));
         $template->setVariable("BUTTON_BACK_BOTTOM", $this->lng->txt("btn_previous"));
         $template->setVariable('HTML_REVIEW', $results_output);
     }
     $this->tpl->setVariable($this->getContentBlockName(), $template->get());
 }
Example #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;
 }
Example #14
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;
 }
 protected function updateRoleAssignmentRule()
 {
     global $ilAccess, $ilErr;
     if (!$ilAccess->checkAccess('write', '', $this->ref_id)) {
         ilUtil::sendFailure($this->lng->txt('permission_denied'), true);
         $this->roleAssignment();
         return false;
     }
     $this->initFormRoleAssignment();
     if (!$this->form->checkInput() or $err = $this->checkInput((int) $_REQUEST['rule_id'])) {
         if ($err) {
             ilUtil::sendFailure($this->lng->txt($err));
         }
         $this->tabs_gui->setSubTabActive('shib_role_assignment');
         $this->form->setValuesByPost();
         $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.shib_role_assignment.html', 'Services/AuthShibboleth');
         $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
         return true;
     }
     $this->showLocalRoleSelection('update');
     $this->rule->update();
     ilUtil::sendSuccess($this->lng->txt('settings_saved'));
     $this->roleAssignment();
     return true;
 }
 /**
  * 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();
 }
 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));
 }
 /**
  * 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();
 }
 /**
  * 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();
 }
 /**
  * @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();
 }
 /**
  * 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());
 }
Example #22
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;
 }
 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());
 }
 function getHTML()
 {
     global $ilObjDataCache;
     $tpl = new ilTemplate('tpl.search_user_filter.html', true, true, 'Services/Search');
     $tpl->setVariable("FILTER_ACTION", $this->ctrl->getFormAction($this));
     $tpl->setVariable("TBL_TITLE", $this->lng->txt('trac_lp_filter'));
     $tpl->setVariable("TXT_LOGIN", $this->lng->txt('login'));
     $tpl->setVariable("TXT_FIRSTNAME", $this->lng->txt('firstname'));
     $tpl->setVariable("TXT_LASTNAME", $this->lng->txt('lastname'));
     $tpl->setVariable("BTN_REFRESH", $this->lng->txt('trac_refresh'));
     $tpl->setVariable("QUERY", ilUtil::prepareFormOutput($this->filter->getQueryString('login')));
     $tpl->setVariable("FIRSTNAME", ilUtil::prepareFormOutput($this->filter->getQueryString('firstname')));
     $tpl->setVariable("LASTNAME", ilUtil::prepareFormOutput($this->filter->getQueryString('lastname')));
     return $tpl->get();
 }
 /**
  * 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;
 }
 /**
  * Get content HTML for main column.
  */
 function getMainContent()
 {
     global $ilBench, $ilAccess;
     $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);
     }
     return $tpl->get();
 }
 /**
  * Render item
  * (modified class name in links and respect disabled status)
  */
 function render($a_mode = "property_form")
 {
     global $lng, $ilCtrl, $ilObjDataCache, $tree;
     // modification:
     $tpl = new ilTemplate("tpl.prop_glos_select.html", true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/Flashcards");
     // modification.
     $tpl->setVariable("POST_VAR", $this->getPostVar());
     $tpl->setVariable("ID", $this->getFieldId());
     $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
     // modification:
     if (!$this->getDisabled()) {
         switch ($a_mode) {
             case "property_form":
                 $parent_gui = "ilpropertyformgui";
                 break;
             case "table_filter":
                 $parent_gui = get_class($this->getParent());
                 break;
         }
         $ilCtrl->setParameterByClass("ilglossaryselectorinputgui", "postvar", $this->getPostVar());
         $tpl->setVariable("TXT_SELECT", $this->getSelectText());
         $tpl->setVariable("HREF_SELECT", $ilCtrl->getLinkTargetByClass(array($parent_gui, "ilformpropertydispatchgui", "ilglossaryselectorinputgui"), "showRepositorySelection"));
         if ($this->getValue() > 0) {
             $tpl->setVariable("TXT_RESET", $lng->txt("reset"));
             $tpl->setVariable("HREF_RESET", $ilCtrl->getLinkTargetByClass(array($parent_gui, "ilformpropertydispatchgui", "ilglossaryselectorinputgui"), "reset"));
         }
     }
     // modification.
     if ($this->getValue() > 0 && $this->getValue() != ROOT_FOLDER_ID) {
         // modification:
         require_once "Services/Locator/classes/class.ilLocatorGUI.php";
         $loc_gui = new ilLocatorGUI();
         $loc_gui->addContextItems($this->getValue());
         $tpl->setVariable("TXT_ITEM", $loc_gui->getHTML());
         // modification.
     } else {
         $nd = $tree->getNodeData(ROOT_FOLDER_ID);
         $title = $nd["title"];
         if ($title == "ILIAS") {
             $title = $lng->txt("repository");
         }
         if (in_array($nd["type"], $this->getClickableTypes())) {
             $tpl->setVariable("TXT_ITEM", $title);
         }
     }
     return $tpl->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();
 }
 /**
  * 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();
 }
 public function insert($a_tpl)
 {
     global $lng;
     $subtpl = new ilTemplate("tpl.invoice_number_placeholders.html", false, false, "Services/Payment");
     $subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('placeholders'));
     $subtpl->setVariable('TXT_PLACEHOLDERS_ADVICE', $lng->txt('inv_number_placeholder_advice'));
     $subtpl->setVariable('TXT_CURRENT_TIMESTAMP', $lng->txt('current_timestamp'));
     $subtpl->setVariable('TXT_INSTALLATION_ID', $lng->txt('installation_id'));
     $subtpl->setVariable('TXT_USER_ID', $lng->txt('user_id'));
     $subtpl->setVariable('TXT_DAY', $lng->txt('day'));
     $subtpl->setVariable('TXT_MONTH', $lng->txt('month'));
     $subtpl->setVariable('TXT_YEAR', $lng->txt('year'));
     $subtpl->setVariable('TXT_INCREMENTAL_NUMBER', $lng->txt('incremental_number'));
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $subtpl->get());
     $a_tpl->parseCurrentBlock();
 }