/** * Get administration tabs * @param ilTabsGUI $tabs_gui */ public function getAdminTabs(ilTabsGUI $tabs_gui) { /** * @var $rbacsystem ilRbacSystem */ global $rbacsystem; if ($rbacsystem->checkAccess('read', $this->object->getRefId())) { $tabs_gui->addTarget('overview', $this->ctrl->getLinkTarget($this, 'overview')); } if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) { $tabs_gui->addTarget('perm_settings', $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), 'perm'), array('perm', 'info', 'owner'), 'ilpermissiongui'); } }
/** * @param $active_tab_id */ protected function setSubTabsSettings($active_tab_id) { $next_class = $this->ctrl->getNextClass($this); $cmd = $this->ctrl->getCmd(); $this->tabs_gui->addSubTab('edit_settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'editSettings')); $this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("obj_multilinguality"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations")); $ilOrgUnitType = $this->object->getOrgUnitType(); if ($ilOrgUnitType instanceof ilOrgUnitType) { if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) { $this->tabs_gui->addSubTab('edit_advanced_settings', $this->lng->txt('orgu_adv_settings'), $this->ctrl->getLinkTarget($this, 'editAdvancedSettings')); } } $this->tabs_gui->setSubTabActive($active_tab_id); switch ($next_class) { case 'iltranslationgui': $this->tabs_gui->setSubTabActive("edit_translations"); break; case '': switch ($cmd) { case 'editSettings': $this->tabs_gui->setSubTabActive('edit_settings'); break; case 'editAdvancedSettings': case 'updateAdvancedSettings': $this->tabs_gui->setSubTabActive('edit_advanced_settings'); break; } break; } return; }
/** * @param array $a_set */ public function fillRow($a_set) { $ilUDFCheck = ilUDFCheck::find($a_set['id']); $ilUDFCheckGUI = new ilUDFCheckGUI($this->parent_obj); foreach ($this->getSelectableColumns() as $k => $v) { if ($k == 'actions') { $this->ctrl->setParameter($this->parent_obj, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId()); $this->ctrl->setParameter($ilUDFCheckGUI, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId()); $current_selection_list = new ilAdvancedSelectionListGUI(); $current_selection_list->setListTitle($this->pl->txt('check_actions')); $current_selection_list->setId('check_actions' . $ilUDFCheck->getId()); $current_selection_list->setUseImages(false); $current_selection_list->addItem($this->pl->txt('check_edit'), 'check_edit', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_EDIT)); $current_selection_list->addItem($this->pl->txt('check_delete'), 'check_delete', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_CONFIRM_DELETE)); $this->tpl->setCurrentBlock('td'); $this->tpl->setVariable('VALUE', $current_selection_list->getHTML()); $this->tpl->parseCurrentBlock(); continue; } if ($this->isColumnSelected($k)) { if ($a_set[$k]) { $this->tpl->setCurrentBlock('td'); $this->tpl->setVariable('VALUE', is_array($a_set[$k]) ? implode(", ", $a_set[$k]) : $a_set[$k]); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock('td'); $this->tpl->setVariable('VALUE', ' '); $this->tpl->parseCurrentBlock(); } } } }
public function showPage() { global $lng, $ilToolbar; /** * @var $ilToolbar ilToolbarGUI */ // :TODO: temporary legend of available placeholders if ($this->getOutputMode() == IL_PAGE_EDIT) { $delete_button = ilLinkButton::getInstance(); $delete_button->setCaption('dcl_empty_view'); $delete_button->setUrl($this->ctrl->getLinkTarget($this, 'confirmDelete')); $ilToolbar->addButtonInstance($delete_button); $activation_button = ilLinkButton::getInstance(); if ($this->getPageObject()->getActive()) { $activation_button->setCaption('dcl_deactivate_view'); $activation_button->setUrl($this->ctrl->getLinkTarget($this, 'deactivate')); } else { $activation_button->setCaption('dcl_activate_view'); $activation_button->setUrl($this->ctrl->getLinkTarget($this, 'activate')); } $ilToolbar->addButtonInstance($activation_button); $legend = ilDataCollectionRecordViewViewdefinition::getAvailablePlaceholders($this->table_id); if (sizeof($legend)) { $this->setPrependingHtml("<span class=\"small\">" . $this->lng->txt("dcl_legend_placeholders") . ": " . implode(" ", $legend) . "</span>"); } } return parent::showPage(); }
/** * */ protected function showUnitsOfCategory() { /** * @var $ilToolbar ilToolbarGUI */ global $ilToolbar; $category = $this->getCategoryById((int) $_GET['category_id'], false); $this->tpl->addJavaScript("./Services/JavaScript/js/Basic.js"); $this->tpl->addJavaScript("./Services/Form/js/Form.js"); $this->lng->loadLanguageModule('form'); require_once 'Modules/TestQuestionPool/classes/tables/class.ilUnitTableGUI.php'; $ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, $this->getUnitCategoryOverviewCommand())); if ($this->isCRUDContext()) { $ilToolbar->addButton($this->lng->txt('un_add_unit'), $this->ctrl->getLinkTarget($this, 'showUnitCreationForm')); } $table = new ilUnitTableGUI($this, 'showUnitsOfCategory', $category); $units = $this->repository->loadUnitsForCategory($category->getId()); $data = array(); foreach ($units as $unit) { /** * @var $unit assFormulaQuestionUnit */ $data[] = array('unit_id' => $unit->getId(), 'unit' => $unit->getUnit(), 'baseunit' => $unit->getBaseunitTitle(), 'baseunit_id' => $unit->getBaseUnit(), 'factor' => $unit->getFactor(), 'sequence' => $unit->getSequence()); } $table->setData($data); $this->tpl->setContent($table->getHTML()); }
/** * builds the question set config form and initialises the fields * with the config currently saved in database * * @return ilPropertyFormGUI $form */ private function buildForm() { $this->questionSetConfig->loadFromDb($this->testOBJ->getTestId()); require_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setId("tst_form_dynamic_question_set_config"); $form->setTitle($this->lng->txt('tst_form_dynamic_question_set_config')); $form->setTableWidth("100%"); $hiddenInputTaxSelectOptAsyncUrl = new ilHiddenInputGUI('taxSelectOptAsyncUrl'); $hiddenInputTaxSelectOptAsyncUrl->setValue($this->ctrl->getLinkTarget($this, self::CMD_GET_TAXONOMY_OPTIONS_ASYNC, '', true)); $form->addItem($hiddenInputTaxSelectOptAsyncUrl); if ($this->testOBJ->participantDataExist()) { $pool = new ilNonEditableValueGUI($this->lng->txt('tst_input_dynamic_question_set_source_questionpool'), 'source_qpl_title'); $pool->setValue($this->questionSetConfig->getSourceQuestionPoolSummaryString($this->lng, $this->tree)); $pool->setDisabled(true); $form->addItem($pool); } else { $poolInput = new ilSelectInputGUI($this->lng->txt('tst_input_dynamic_question_set_source_questionpool'), 'source_qpl_id'); $poolInput->setOptions($this->buildQuestionPoolSelectInputOptionArray($this->testOBJ->getAvailableQuestionpools(true, false, false, true, true))); $poolInput->setValue($this->questionSetConfig->getSourceQuestionPoolId()); $poolInput->setRequired(true); $form->addItem($poolInput); } $questionOderingInput = new ilRadioGroupInputGUI($this->lng->txt('tst_input_dynamic_question_set_question_ordering'), 'question_ordering'); $questionOderingInput->setValue($this->questionSetConfig->getOrderingTaxonomyId() ? self::QUESTION_ORDERING_TYPE_TAXONOMY : self::QUESTION_ORDERING_TYPE_UPDATE_DATE); $optionOrderByDate = new ilRadioOption($this->lng->txt('tst_input_dynamic_question_set_question_ordering_by_date'), self::QUESTION_ORDERING_TYPE_UPDATE_DATE, $this->lng->txt('tst_inp_dyn_quest_set_quest_ordering_by_date_desc')); $questionOderingInput->addOption($optionOrderByDate); $optionOrderByTax = new ilRadioOption($this->lng->txt('tst_input_dynamic_question_set_question_ordering_by_tax'), self::QUESTION_ORDERING_TYPE_TAXONOMY, $this->lng->txt('tst_inp_dyn_quest_set_quest_ordering_by_tax_desc')); $orderTaxInput = new ilSelectInputGUI($this->lng->txt('tst_input_dynamic_question_set_ordering_tax'), 'ordering_tax'); $orderTaxInput->setInfo($this->lng->txt('tst_input_dynamic_question_set_ordering_tax_description')); $orderTaxInput->setValue($this->questionSetConfig->getOrderingTaxonomyId()); $orderTaxInput->setRequired(true); $orderTaxInput->setOptions($this->buildTaxonomySelectInputOptionArray($this->questionSetConfig->getSourceQuestionPoolId())); $optionOrderByTax->addSubItem($orderTaxInput); $questionOderingInput->addOption($optionOrderByTax); $form->addItem($questionOderingInput); $taxFilterInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dynamic_question_set_taxonomie_filter_enabled'), 'tax_filter_enabled'); $taxFilterInput->setValue(1); $taxFilterInput->setChecked($this->questionSetConfig->isTaxonomyFilterEnabled()); $form->addItem($taxFilterInput); $answStatusFilterInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dyn_quest_set_answer_status_filter_enabled'), 'answer_status_filter_enabled'); $answStatusFilterInput->setValue(1); $answStatusFilterInput->setChecked($this->questionSetConfig->isAnswerStatusFilterEnabled()); $form->addItem($answStatusFilterInput); $previousQuestionsListInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dyn_quest_set_prev_quest_list_enabled'), 'prev_quest_list_enabled'); $previousQuestionsListInput->setValue(1); $previousQuestionsListInput->setChecked($this->questionSetConfig->isPreviousQuestionsListEnabled()); $form->addItem($previousQuestionsListInput); if ($this->testOBJ->participantDataExist()) { $questionOderingInput->setDisabled(true); $taxFilterInput->setDisabled(true); $answStatusFilterInput->setDisabled(true); $previousQuestionsListInput->setDisabled(true); } else { $form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt('save')); } return $form; }
protected function initToolbar() { if ($this->getActions() && $this->getActions()->getAction("edit")) { $toolbar = new ilToolbarGUI(); $toolbar->addButton($this->getAddButtonTxt(), $this->ctrl->getLinkTarget($this->parent_obj, "add")); $this->setToolbar($toolbar); } }
/** * Display all types in a table with actions to edit/delete */ protected function listTypes() { $button = ilLinkButton::getInstance(); $button->setCaption('orgu_type_add'); $button->setUrl($this->ctrl->getLinkTarget($this, 'add')); $this->toolbar->addButtonInstance($button); $table = new ilOrgUnitTypeTableGUI($this, 'listTypes'); $this->tpl->setContent($table->getHTML()); }
/** * @param array $a_set */ public function fillRow($a_set) { $il_obj_entry = ilBibliographicEntry::getInstance($this->parent_obj->object->getFiletype(), $a_set['entry_id']); $this->tpl->setVariable('SINGLE_ENTRY', $il_obj_entry->getOverwiew()); //Detail-Link $this->ctrl->setParameter($this->parent_obj, ilObjBibliographicGUI::P_ENTRY_ID, $a_set['entry_id']); $this->tpl->setVariable('DETAIL_LINK', $this->ctrl->getLinkTarget($this->parent_obj, 'showDetails')); // generate/render links to libraries $settings = ilBibliographicSetting::getAll(); $arr_library_link = array(); foreach ($settings as $set) { if ($set->getShowInList()) { $arr_library_link[] = $set->getButton($this->parent_obj->object, $il_obj_entry); } } if (count($arr_library_link)) { $this->tpl->setVariable('LIBRARY_LINK', implode('<br/>', $arr_library_link)); } }
/** * Set Subtabs * */ protected function setSubTabs() { if ($this->definition !== NULL) { $this->tabs->addSubTab('show_certificates', 'Show Certificates', $this->ctrl->getLinkTarget($this, 'showCertificates')); } $this->tabs->addSubTab('show_definition', 'Definition settings', $this->ctrl->getLinkTarget($this, 'showDefinition')); if ($this->definition !== NULL) { $this->tabs->addSubTab('show_placeholders', 'Placeholders', $this->ctrl->getLinkTarget($this, 'showPlaceholders')); } }
public function setTabs() { $this->tabs_gui->addSubTab("show_staff", sprintf($this->lng->txt("local_staff"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showStaff")); if ($this->ilAccess->checkAccess("view_learning_progress_rec", "", $this->parent_object->getRefId())) { $this->tabs_gui->addSubTab("show_staff_rec", sprintf($this->lng->txt("rec_staff"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showStaffRec")); } if ($this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) { $this->tabs_gui->addSubTab("show_other_roles", sprintf($this->lng->txt("local_other_roles"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showOtherRoles")); } }
protected function setSubTabs() { global $ilSetting; include_once './Services/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php'; if ($ilSetting->get('shib_active') == 0 and ilShibbolethRoleAssignmentRules::getCountRules() == 0) { return false; } // DONE: show sub tabs if there is any role assignment rule $this->tabs_gui->addSubTabTarget('shib_settings', $this->ctrl->getLinkTarget($this, 'settings')); $this->tabs_gui->addSubTabTarget('shib_role_assignment', $this->ctrl->getLinkTarget($this, 'roleAssignment')); return true; }
/** * */ public function confirmDeleteSignature() { $signature = srCertificateSignature::find($_GET['signature_id']); $item_html = $signature->getFirstName() . " " . $signature->getLastName() . '<br>'; $this->tabs->clearTargets(); $this->tabs->setBackTarget($this->pl->txt('common_back'), $this->ctrl->getLinkTarget($this, 'view')); ilUtil::sendQuestion($this->pl->txt('signatures_confirm_delete')); $toolbar = new ilToolbarGUI(); $this->ctrl->saveParameter($this, 'signature_id'); $toolbar->addButton($this->pl->txt('confirm'), $this->ctrl->getLinkTarget($this, 'deleteSignature')); $toolbar->addButton($this->pl->txt('cancel'), $this->ctrl->getLinkTarget($this, 'showSignatures')); $this->tpl->setContent($item_html . '</br>' . $toolbar->getHTML()); }
protected function getSettingsTemplateMessageHTML() { if ($this->settingsTemplate) { global $tpl; $link = $this->ctrl->getLinkTarget($this, self::CMD_SHOW_RESET_TPL_CONFIRM); $link = "<a href=\"" . $link . "\">" . $this->lng->txt("test_using_template_link") . "</a>"; $msgHTML = $tpl->getMessageHTML(sprintf($this->lng->txt("test_using_template"), $this->settingsTemplate->getTitle(), $link), "info"); $msgHTML = "<div style=\"margin-top:10px\">{$msgHTML}</div>"; } else { $msgHTML = ''; } return $msgHTML; }
public function setTabs() { if ($this->access->checkAccess('read', '', $this->object->getRefId())) { $this->tabs->addTab('edit', $this->txt('pad'), $this->ctrl->getLinkTarget($this, 'editContent')); } $this->addInfoTab(); if ($this->access->checkAccess('read', '', $this->object->getRefId())) { $this->tabs->addTab('timeslider', $this->txt('timeslider'), $this->ctrl->getLinkTarget($this, 'timeSlider')); } if ($this->access->checkAccess('write', '', $this->object->getRefId())) { $this->tabs->addTab('properties', $this->txt('properties'), $this->ctrl->getLinkTarget($this, 'editProperties')); } $this->addPermissionTab(); }
/** * @global $ilToolbar ilToolbarGUI; * * @return bool */ public function view() { global $ilToolbar; /** * @var $ilToolbar ilToolbarGUI; */ $b = ilLinkButton::getInstance(); $b->setCaption('add'); $b->setUrl($this->ctrl->getLinkTarget($this, 'add')); $b->setPrimary(true); $ilToolbar->addButtonInstance($b); $a_table = $this->initTable(); $this->parent_gui->tpl->setContent($a_table->getHTML()); return true; }
/** * Creates an output of the solution of an answer compared to the correct solution * * @access public */ protected function outCorrectSolution() { if (!$this->object->getShowSolutionDetails()) { ilUtil::sendInfo($this->lng->txt("no_permission"), true); $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen"); } $testSession = $this->testSessionFactory->getSession(); $activeId = $testSession->getActiveId(); if (!($activeId > 0)) { $this->ctrl->redirectByClass("ilobjtestgui", "infoScreen"); } $this->ctrl->saveParameter($this, "pass"); $pass = (int) $_GET['pass']; $questionId = (int) $_GET['evaluation']; if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) { $testSequence = $this->testSequenceFactory->getSequenceByActiveIdAndPass($activeId, $pass); $testSequence->loadFromDb(); $testSequence->loadQuestions(); require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php'; $objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession); $objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $testSequence); $objectivesList->loadObjectivesTitles(); } else { $objectivesList = null; } global $ilTabs; if ($this instanceof ilTestEvalObjectiveOrientedGUI) { $ilTabs->setBackTarget($this->lng->txt("tst_back_to_virtual_pass"), $this->ctrl->getLinkTarget($this, 'showVirtualPass')); } else { $ilTabs->setBackTarget($this->lng->txt("tst_back_to_pass_details"), $this->ctrl->getLinkTarget($this, 'outUserPassDetails')); } include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $this->tpl->setCurrentBlock("ContentStyle"); $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0)); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("SyntaxStyle"); $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath()); $this->tpl->parseCurrentBlock(); $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print"); if ($this->object->getShowSolutionAnswersOnly()) { $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print_hide_content.css", "Modules/Test"), "print"); } $solution = $this->getCorrectSolutionOutput($questionId, $activeId, $pass, $objectivesList); $this->tpl->setContent($solution); }
/** * @param ilTabsGUI $tabs_gui */ public function getAdminTabs(ilTabsGUI $tabs_gui) { /** * @var $rbacsystem ilRbacSystem */ global $rbacsystem; if ($rbacsystem->checkAccess('read', $this->object->getRefId())) { $tabs_gui->addTarget('settings', $this->ctrl->getLinkTarget($this, 'settings'), array('saveSettings', 'settings', '', 'view'), '', ''); } if ($rbacsystem->checkAccess('read', $this->object->getRefId())) { $tabs_gui->addTarget('tos_agreement_by_lng', $this->ctrl->getLinkTarget($this, 'showAgreementByLanguage'), array('reset', 'confirmReset', 'showAgreementByLanguage', 'resetAgreementByLanguageFilter', 'applyAgreementByLanguageFilter'), '', ''); } if ($rbacsystem->checkAccess('read', $this->object->getRefId()) && $rbacsystem->checkAccess('read', USER_FOLDER_ID)) { $tabs_gui->addTarget('tos_acceptance_history', $this->ctrl->getLinkTarget($this, 'showAcceptanceHistory'), array('showAcceptanceHistory', 'resetAcceptanceHistoryFilter', 'applyAcceptanceHistoryFilter'), '', ''); } if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) { $tabs_gui->addTarget('perm_settings', $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), 'perm'), array('perm', 'info', 'owner'), 'ilpermissiongui'); } }
private function handleTabs() { $this->tabs->activateTab('assQuestions'); $this->tabs->addSubTab('tstRandQuestSetGeneralConfig', $this->lng->txt('tst_rnd_quest_cfg_tab_general'), $this->ctrl->getLinkTarget($this, self::CMD_SHOW_GENERAL_CONFIG_FORM)); $this->tabs->addSubTab('tstRandQuestSetPoolConfig', $this->lng->txt('tst_rnd_quest_cfg_tab_pool'), $this->ctrl->getLinkTarget($this, self::CMD_SHOW_SRC_POOL_DEF_LIST)); switch ($this->ctrl->getCmd(self::CMD_SHOW_GENERAL_CONFIG_FORM)) { case self::CMD_SHOW_GENERAL_CONFIG_FORM: case self::CMD_SAVE_GENERAL_CONFIG_FORM: $this->tabs->activateSubTab('tstRandQuestSetGeneralConfig'); break; case self::CMD_SHOW_SRC_POOL_DEF_LIST: case self::CMD_SAVE_SRC_POOL_DEF_LIST: case self::CMD_DELETE_SINGLE_SRC_POOL_DEF: case self::CMD_DELETE_MULTI_SRC_POOL_DEFS: case self::CMD_SHOW_CREATE_SRC_POOL_DEF_FORM: case self::CMD_SAVE_CREATE_SRC_POOL_DEF_FORM: case self::CMD_SHOW_EDIT_SRC_POOL_DEF_FORM: case self::CMD_SAVE_EDIT_SRC_POOL_DEF_FORM: $this->tabs->activateSubTab('tstRandQuestSetPoolConfig'); break; } }
public function getTabs(&$tabs_gui) { if ($this->ilAccess->checkAccess('read', '', $this->object->getRefId())) { $this->tabs_gui->addTab("view_content", $this->lng->txt("content"), $this->ctrl->getLinkTarget($this, "")); $this->tabs_gui->addTab("info_short", "Info", $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")); } //Tabs for OrgUnits exclusive root! if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) { if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) { $this->tabs_gui->addTab("orgu_staff", $this->lng->txt("orgu_staff"), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", "showStaff")); } if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) { $this->tabs_gui->addTab("settings", $this->lng->txt("settings"), $this->ctrl->getLinkTargetByClass("ilTranslationGUI", "editTranslations")); } if (ilObjOrgUnitAccess::_checkAccessAdministrateUsers($this->object->getRefId())) { $this->tabs_gui->addTab("administrate_users", $this->lng->txt("administrate_users"), $this->ctrl->getLinkTargetByClass("ilLocalUserGUI", "index")); } } if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) { $this->tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilorgunitexportgui', ''), 'export', 'ilorgunitexportgui'); } parent::getTabs($tabs_gui); }
private function getDeleteHref($sourcePoolDefinitionId) { $href = $this->ctrl->getLinkTarget($this->parent_obj, ilTestRandomQuestionSetConfigGUI::CMD_DELETE_SINGLE_SRC_POOL_DEF); $href = ilUtil::appendUrlParameterString($href, "src_pool_def_id=" . $sourcePoolDefinitionId, true); return $href; }
private function buildQuestionSelectionSubTabLink() { $href = $this->ctrl->getLinkTarget($this, self::CMD_SHOW_SRC_POOL_DEF_LIST); $label = $this->lng->txt('tst_rnd_quest_cfg_tab_pool'); return "<a href=\"{$href}\">{$label}</a>"; }
protected function initBackButton() { $this->setBackButtonName($this->txt("back", false)); $this->setBackButtonTarget($this->ctrl->getLinkTarget($this->parent_gui, "index")); }
private function extendExportGUI() { $this->toolbar->addButton($this->lng->txt("simple_xml"), $this->ctrl->getLinkTarget($this, "simpleExport")); $this->toolbar->addButton($this->lng->txt("simple_xls"), $this->ctrl->getLinkTarget($this, "simpleExportExcel")); }
/** * @param ilForumTopic $thread */ public function fillRow(ilForumTopic $thread) { /** * @var $ilUser ilObjUser */ global $ilUser; $this->ctrl->setParameter($this->getParentObject(), 'thr_pk', $thread->getId()); if ('mergeThreads' == $this->parent_cmd) { $checked = $this->max_count == 1 || isset($_POST['thread_ids']) && in_array($thread->getId(), $_POST['thread_ids']); $this->tpl->setVariable('VAL_CHECK', ilUtil::formRadioButton($checked, 'thread_ids[]', $thread->getId())); } else { if ('showThreads' == $this->parent_cmd) { $this->tpl->setVariable('VAL_CHECK', ilUtil::formCheckbox(isset($_POST['thread_ids']) && in_array($thread->getId(), $_POST['thread_ids']) ? true : false, 'thread_ids[]', $thread->getId())); } else { if ($thread->isSticky()) { $this->tpl->setVariable('VAL_SORTING_NAME', 'thread_sorting[' . $thread->getId() . ']'); $this->tpl->setVariable('VAL_SORTING', (int) $this->position * 10); } else { $this->tpl->setVariable('VAL_CHECK', ''); } $this->position++; } } $subject = ''; if ($thread->isSticky()) { $subject .= '<span class="light">[' . $this->lng->txt('sticky') . ']</span> '; } if ($thread->isClosed()) { $subject .= '<span class="light">[' . $this->lng->txt('topic_close') . ']</span> '; } if (!$ilUser->isAnonymous() && $this->ilias->getSetting('forum_notification') != 0 && $thread->getUserNotificationEnabled()) { $subject .= '<span class="light">[' . $this->lng->txt('forums_notification_enabled') . ']</span> '; } $num_posts = $thread->getNumPosts(); $num_unread = $thread->getNumUnreadPosts(); $num_new = $thread->getNumNewPosts(); if ($num_posts > 0) { $subject = '<div><a href="' . $this->ctrl->getLinkTarget($this->getParentObject(), 'viewThread') . '">' . $thread->getSubject() . '</a></div>' . $subject; } else { $subject = $thread->getSubject() . $subject; } $this->tpl->setVariable('VAL_SUBJECT', $subject); // Author $this->ctrl->setParameter($this->getParentObject(), 'backurl', urlencode($this->ctrl->getLinkTargetByClass("ilrepositorygui", ""))); $this->ctrl->setParameter($this->getParentObject(), 'user', $thread->getUserId()); $authorinfo = new ilForumAuthorInformation($thread->getUserId(), $thread->getUserAlias(), $thread->getImportName(), array('class' => 'il_ItemProperty', 'href' => $this->ctrl->getLinkTarget($this->getParentObject(), 'showUser'))); $this->tpl->setVariable('VAL_AUTHOR', $authorinfo->getLinkedAuthorName()); $topicStats = $num_posts; if (!$ilUser->isAnonymous()) { if ($num_unread > 0) { $topicStats .= '<br /><span class="alert ilWhiteSpaceNowrap">' . $this->lng->txt('unread') . ': ' . $num_unread . '</span>'; } if ($num_new > 0 && $this->getOverviewSetting() == 0) { $topicStats .= '<br /><span class="alert ilWhiteSpaceNowrap">' . $this->lng->txt('new') . ': ' . $num_new . '</span>'; } } $this->tpl->setVariable('VAL_ARTICLE_STATS', $topicStats); $this->tpl->setVariable('VAL_NUM_VISIT', $thread->getVisits()); // Last posting if ($num_posts > 0) { if ($this->getIsModerator()) { $objLastPost = $thread->getLastPost(); } else { $objLastPost = $thread->getLastActivePost(); } if (is_object($objLastPost)) { $authorinfo = new ilForumAuthorInformation($objLastPost->getUserId(), $objLastPost->getUserAlias(), $objLastPost->getImportName(), array('href' => $this->ctrl->getLinkTarget($this->getParentObject(), 'viewThread') . '#' . $objLastPost->getId())); $this->tpl->setVariable('VAL_LP_DATE', '<div class="ilWhiteSpaceNowrap">' . ilDatePresentation::formatDate(new ilDateTime($objLastPost->getCreateDate(), IL_CAL_DATETIME)) . '</div>' . '<div class="ilWhiteSpaceNowrap">' . $this->lng->txt('from') . ' ' . $authorinfo->getLinkedAuthorName() . '</div>'); } } // Row style $css_row = $this->css_row; if ($thread->isSticky()) { $css_row = $css_row == 'tblrow1' ? 'tblstickyrow1' : 'tblstickyrow2'; } $this->tpl->setVariable('CSS_ROW', $css_row); $this->ctrl->setParameter($this->getParentObject(), 'thr_pk', ''); $this->ctrl->setParameter($this->getParentObject(), 'user', ''); $this->ctrl->setParameter($this->getParentObject(), 'backurl', ''); }