/**
  * @param $a_parent_obj
  * @param string $a_parent_cmd
  * @param srCertificateType $type
  */
 public function __construct($a_parent_obj, $a_parent_cmd, srCertificateType $type)
 {
     global $ilCtrl, $ilToolbar;
     $this->setId('cert_type_signatures');
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->type = $type;
     $this->pl = ilCertificatePlugin::getInstance();
     $this->ctrl = $ilCtrl;
     $this->toolbar = $ilToolbar;
     $this->setRowTemplate('tpl.type_signatures_row.html', $this->pl->getDirectory());
     $this->initColumns();
     $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
     $this->toolbar->addButton($this->pl->txt('add_new_signature'), $this->ctrl->getLinkTarget($a_parent_obj, 'addSignature'));
     $this->buildData();
 }
コード例 #2
0
 public function __construct($a_parent_obj, $a_parent_cmd)
 {
     global $ilCtrl, $ilToolbar;
     $this->setId('cert_type_table');
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->pl = ilCertificatePlugin::getInstance();
     $this->ctrl = $ilCtrl;
     $this->toolbar = $ilToolbar;
     $this->setRowTemplate('tpl.type_row.html', $this->pl->getDirectory());
     $this->initColumns();
     $this->addColumn($this->pl->txt('actions'));
     $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
     $this->toolbar->addButton($this->pl->txt('add_new_type'), $this->ctrl->getLinkTargetByClass('srcertificatetypegui', 'addType'));
     $data = srCertificateType::getArray();
     $this->setData($data);
 }
コード例 #3
0
 /**
  * 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());
 }
 /**
  * @param $a_parent_obj
  * @param string $a_parent_cmd
  * @param srCertificateType $type
  */
 public function __construct($a_parent_obj, $a_parent_cmd, srCertificateType $type)
 {
     global $ilCtrl, $ilToolbar;
     $this->setId('cert_type_placeholders');
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->type = $type;
     $this->pl = ilCertificatePlugin::getInstance();
     $this->ctrl = $ilCtrl;
     $this->toolbar = $ilToolbar;
     $this->setRowTemplate('tpl.type_placeholders_row.html', $this->pl->getDirectory());
     $this->initColumns();
     $this->addColumn($this->pl->txt('actions'));
     $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
     $this->toolbar->addButton($this->pl->txt('add_new_placeholder'), $this->ctrl->getLinkTargetByClass('srcertificatetypegui', 'addPlaceholder'));
     $this->buildData();
     $this->setTitle($this->pl->txt('custom_placeholders'));
 }
コード例 #5
0
 protected function showPreviewCertificateInToolbar()
 {
     if ($this->definition) {
         if (is_file($this->definition->getType()->getCertificateTemplatesPath(true))) {
             $this->toolbar->addButton($this->pl->txt('preview_certificate'), $this->ctrl->getLinkTarget($this, 'previewCertificate'));
         } else {
             ilUtil::sendInfo($this->pl->txt('msg_info_current_type_no_invalid_tempalte'));
         }
     }
 }
コード例 #6
0
 public function view()
 {
     $this->checkPermission("read");
     parent::renderObject();
     $this->tabs_gui->setTabActive("view_content");
     $this->tabs_gui->removeSubTab("page_editor");
     if ($this->ilAccess->checkAccess("write", "", $_GET["ref_id"]) and $this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
         $this->toolbar->addButton($this->lng->txt("simple_import"), $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleImportGUI", "importScreen"));
         $this->toolbar->addButton($this->lng->txt("simple_user_import"), $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleUserImportGUI", "userImportScreen"));
     }
 }
コード例 #7
0
 /**
  * Shows all made bookings.
  *
  * @global type $tpl
  */
 function showBookingsObject()
 {
     $toolbar = new ilToolbarGUI();
     if ($this->permission->checkPrivilege(PRIVC::ADD_OWN_BOOKINGS)) {
         $toolbar->addButton($this->lng->txt('rep_robj_xrs_booking_add'), $this->ctrl->getLinkTargetByClass("ilobjroomsharinggui", "showSearch"));
     }
     include_once "Customizing/global/plugins/Services/Repository/RepositoryObject/RoomSharing/classes/appointments/bookings/class.ilRoomSharingBookingsTableGUI.php";
     $bookingsTable = new ilRoomSharingBookingsTableGUI($this, 'showBookings', $this->ref_id);
     $bookingsTable->initFilter();
     $bookingsTable->getItems();
     $plink = new ilPermanentLinkGUI('xrs', $this->ref_id);
     $this->tpl->setContent($toolbar->getHTML() . $bookingsTable->getHTML() . $plink->getHTML());
 }
コード例 #8
0
 /**
  * Render list of booking objects
  *
  * uses ilBookingObjectsTableGUI
  */
 function render()
 {
     global $tpl, $ilCtrl, $lng, $ilAccess;
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         include_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
         $bar = new ilToolbarGUI();
         $bar->addButton($lng->txt('book_add_object'), $ilCtrl->getLinkTarget($this, 'create'));
         $bar = $bar->getHTML();
     }
     $tpl->setPermanentLink('book', $this->ref_id);
     include_once 'Modules/BookingManager/classes/class.ilBookingObjectsTableGUI.php';
     $table = new ilBookingObjectsTableGUI($this, 'render', $this->ref_id, $this->pool_id, $this->pool_has_schedule, $this->pool_overall_limit);
     $tpl->setContent($bar . $table->getHTML());
 }
コード例 #9
0
 public function view()
 {
     if (!$this->ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         if ($this->ilAccess->checkAccess("visible", "", $_GET["ref_id"])) {
             ilUtil::sendFailure($this->lng->txt("msg_no_perm_read"));
             $this->ctrl->redirectByClass('ilinfoscreengui', '');
         }
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->WARNING);
     }
     parent::renderObject();
     $this->tabs_gui->setTabActive("view_content");
     $this->tabs_gui->removeSubTab("page_editor");
     $this->tabs_gui->removeSubTab("ordering");
     // Mantis 0014728
     if ($this->ilAccess->checkAccess("write", "", $_GET["ref_id"]) and $this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
         $this->toolbar->addButton($this->lng->txt("simple_import"), $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleImportGUI", "importScreen"));
         $this->toolbar->addButton($this->lng->txt("simple_user_import"), $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleUserImportGUI", "userImportScreen"));
     }
 }
コード例 #10
0
 /**
  * Show a list of all rooms.
  */
 public function showRoomsObject()
 {
     if (!$this->permission->checkPrivilege(PRIVC::ACCESS_ROOMS)) {
         ilUtil::sendFailure($this->lng->txt("rep_robj_xrs_no_permission_for_action"));
         $this->ctrl->redirectByClass('ilinfoscreengui', 'showSummary', 'showSummary');
         return false;
     }
     $roomsTable = new ilRoomSharingRoomsTableGUI($this, 'showRooms', $this->ref_id);
     $roomsTable->initFilter();
     $roomsTable->getItems($roomsTable->getCurrentFilter());
     $toolbar = new ilToolbarGUI();
     if ($this->permission->checkPrivilege(PRIVC::ADD_ROOMS)) {
         $toolbar->addButton($this->lng->txt('rep_robj_xrs_add_room'), $this->ctrl->getLinkTargetByClass('ilroomsharingroomgui', 'addRoom'));
     }
     // the commands (functions) to be called when the correspondent buttons are clicked
     $roomsTable->setResetCommand("resetRoomFilter");
     $roomsTable->setFilterCommand("applyRoomFilter");
     $this->tpl->setContent($toolbar->getHTML() . $roomsTable->getHTML());
 }
コード例 #11
0
 /**
  * Render list of booking schedules
  *
  * uses ilBookingSchedulesTableGUI
  */
 function render()
 {
     global $tpl, $lng, $ilCtrl, $ilAccess;
     include_once 'Modules/BookingManager/classes/class.ilBookingSchedulesTableGUI.php';
     $table = new ilBookingSchedulesTableGUI($this, 'render', $this->ref_id);
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         // if we have schedules but no objects - show info
         if (sizeof($table->getData())) {
             include_once "Modules/BookingManager/classes/class.ilBookingObject.php";
             if (!sizeof(ilBookingObject::getList(ilObject::_lookupObjId($this->ref_id)))) {
                 ilUtil::sendInfo($lng->txt("book_type_warning"));
             }
         }
         include_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
         $bar = new ilToolbarGUI();
         $bar->addButton($lng->txt('book_add_schedule'), $ilCtrl->getLinkTarget($this, 'create'));
         $bar = $bar->getHTML();
     }
     $tpl->setContent($bar . $table->getHTML());
 }
コード例 #12
0
 /**
  * Insert page snippet from media pool
  */
 function insertFromPool($a_post_cmd = "edpost", $a_submit_cmd = "create_mob")
 {
     global $ilCtrl, $ilAccess, $ilTabs, $tpl, $lng;
     if ($_SESSION["cont_media_pool"] != "" && $ilAccess->checkAccess("write", "", $_SESSION["cont_media_pool"]) && ilObject::_lookupType(ilObject::_lookupObjId($_SESSION["cont_media_pool"])) == "mep") {
         $html = "";
         $tb = new ilToolbarGUI();
         $ilCtrl->setParameter($this, "subCmd", "poolSelection");
         $tb->addButton($lng->txt("cont_select_media_pool"), $ilCtrl->getLinkTarget($this, "insert"));
         $html = $tb->getHTML();
         $ilCtrl->setParameter($this, "subCmd", "");
         include_once "./Modules/MediaPool/classes/class.ilObjMediaPool.php";
         include_once "./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php";
         $pool = new ilObjMediaPool($_SESSION["cont_media_pool"]);
         $ilCtrl->setParameter($this, "subCmd", "insertFromPool");
         $mpool_table = new ilMediaPoolTableGUI($this, "insert", $pool, "mep_folder", ilMediaPoolTableGUI::IL_MEP_SELECT_CONTENT);
         $mpool_table->setInsertCommand("create_incl");
         $html .= $mpool_table->getHTML();
         $tpl->setContent($html);
     } else {
         $this->poolSelection();
     }
 }
コード例 #13
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;
 }
コード例 #14
0
 protected function showQuestionSelectionCmd()
 {
     $this->prepareSummaryPage();
     $this->testSequence->loadQuestions($this->dynamicQuestionSetConfig, $this->testSession->getTaxonomyFilterSelection());
     $this->testSequence->cleanupQuestions($this->testSession);
     require_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
     $toolbarGUI = new ilToolbarGUI();
     $toolbarGUI->addButton($this->getEnterTestButtonLangVar(), $this->ctrl->getLinkTarget($this, self::CMD_SHOW_QUESTION));
     $data = $this->buildQuestionsTableDataArray($this->testSequence->getFilteredQuestionList(), $this->getMarkedQuestions());
     $tableGUI = $this->buildFilteredQuestionsTableGUI();
     $tableGUI->setData($data);
     $content = $this->ctrl->getHTML($toolbarGUI);
     $content .= $this->ctrl->getHTML($tableGUI);
     $this->tpl->setVariable('TABLE_LIST_OF_QUESTIONS', $content);
     if ($this->object->getEnableProcessingTime()) {
         $this->outProcessingTime($this->testSession->getActiveId());
     }
 }
コード例 #15
0
 /**
  * Add new search button
  * @return 
  */
 protected function addNewSearchButton()
 {
     include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
     $toolbar = new ilToolbarGUI();
     $toolbar->addButton($this->lng->txt('search_new'), $this->ctrl->getLinkTarget($this, 'showSearch'));
     $this->tpl->setVariable('ACTION_BUTTONS', $toolbar->getHTML());
 }
コード例 #16
0
 /**
  * list questions of question pool
  */
 function questionsObject()
 {
     global $rbacsystem, $ilUser, $ilCtrl, $ilDB, $lng, $ilPluginAdmin;
     if (get_class($this->object) == "ilObjTest") {
         if ($_GET["calling_test"] > 0) {
             $ref_id = $_GET["calling_test"];
             $q_id = $_GET["q_id"];
             if ($_REQUEST['test_express_mode']) {
                 if ($q_id) {
                     ilUtil::redirect("ilias.php?ref_id=" . $ref_id . "&q_id=" . $q_id . "&test_express_mode=1&cmd=showPage&cmdClass=iltestexpresspageobjectgui&baseClass=ilObjTestGUI");
                 } else {
                     ilUtil::redirect("ilias.php?ref_id=" . $ref_id . "&test_express_mode=1&cmd=showPage&cmdClass=iltestexpresspageobjectgui&baseClass=ilObjTestGUI");
                 }
             } else {
                 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&ref_id=" . $ref_id . "&cmd=questions");
             }
         }
     } else {
         if (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
             $ref_id = (int) $_GET['calling_consumer'];
             $consumer = ilObjectFactory::getInstanceByRefId($ref_id);
             if ($consumer instanceof ilQuestionEditingFormConsumer) {
                 ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
             }
             require_once 'Services/Link/classes/class.ilLink.php';
             ilUtil::redirect(ilLink::_getLink($ref_id));
         }
     }
     $this->object->purgeQuestions();
     // reset test_id SESSION variable
     $_SESSION["test_id"] = "";
     require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
     $taxIds = ilObjTaxonomy::getUsageOfObject($this->object->getId());
     $table_gui = $this->buildQuestionBrowserTableGUI($taxIds);
     $table_gui->setPreventDoubleSubmission(false);
     if ($rbacsystem->checkAccess('write', $_GET['ref_id'])) {
         $toolbar = new ilToolbarGUI();
         $toolbar->addButton($this->lng->txt("ass_create_question"), $this->ctrl->getLinkTarget($this, 'createQuestionForm'));
         $this->tpl->setContent($this->ctrl->getHTML($toolbar) . $this->ctrl->getHTML($table_gui));
     } else {
         $this->tpl->setContent($this->ctrl->getHTML($table_gui));
     }
     if ($this->object->getShowTaxonomies()) {
         $this->lng->loadLanguageModule('tax');
         require_once 'Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php';
         foreach ($taxIds as $taxId) {
             if ($taxId != $this->object->getNavTaxonomyId()) {
                 continue;
             }
             $taxExp = new ilTaxonomyExplorerGUI($this, 'showNavTaxonomy', $taxId, 'ilobjquestionpoolgui', 'questions');
             if (!$taxExp->handleCommand()) {
                 $this->tpl->setLeftContent($taxExp->getHTML() . " ");
             }
             break;
         }
     }
 }
コード例 #17
0
 /**
  * Creates a toolbar for the form which is used for editing class properties. A button for
  * deleting the corresponding class is added if a user has the privilege of doing so.
  *
  * @return \ilToolbarGUI
  */
 private function createEditClassFormToolbar()
 {
     $toolbar = new ilToolbarGUI();
     if ($this->permission->checkPrivilege(PRIVC::DELETE_CLASS)) {
         $toolbar->addButton($this->lng->txt("rep_robj_xrs_class_confirm_deletion"), $this->ctrl->getLinkTarget($this, "renderConfirmClassDeletion"));
     }
     return $toolbar;
 }
コード例 #18
0
 /**
  * Impementation of abstract method getMainContent
  *
  * @access public
  * @return
  */
 public function getMainContent()
 {
     global $lng, $ilTabs, $ilAccess, $ilUser;
     // see bug #7452
     //		$ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
     include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
     $tpl = new ilTemplate("tpl.container_page.html", true, true, "Services/Container");
     if ($GLOBALS['ilAccess']->checkAccess('write', '', $this->getContainerObject()->getRefId())) {
         // check for results
         include_once './Modules/Course/classes/Objectives/class.ilLOUserResults.php';
         if (ilLOUserResults::hasResults($this->getContainerObject()->getId(), $GLOBALS['ilUser']->getId())) {
             include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
             $ilToolbar = new ilToolbarGUI();
             $ilToolbar->addButton($lng->txt('crs_reset_results'), $GLOBALS['ilCtrl']->getLinkTargetByClass(get_class($this->getContainerGUI()), 'reset'));
         }
     }
     // Feedback
     // @todo
     //		$this->__showFeedBack();
     $this->items = $this->getContainerObject()->getSubItems($this->getContainerGUI()->isActiveAdministrationPanel());
     $is_manage = $this->getContainerGUI()->isActiveAdministrationPanel();
     $is_order = $this->getContainerGUI()->isActiveOrdering();
     include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
     $this->loc_settings = ilLOSettings::getInstanceByObjId($this->getContainerObject()->getId());
     $this->initRenderer();
     if (!$is_manage && !$is_order) {
         // currently inactive
         // $this->showStatus($tpl);
     }
     if (!$is_manage) {
         $this->showObjectives($tpl, $is_order);
         // $this->showMaterials($tpl,self::MATERIALS_TESTS, false, !$is_order);
         // check for results
         include_once './Modules/Course/classes/Objectives/class.ilLOUserResults.php';
         $has_results = ilLOUserResults::hasResults($this->getContainerObject()->getId(), $ilUser->getId());
         if ($this->loc_settings->getInitialTest() && $this->loc_settings->isGeneralInitialTestVisible() && !$this->loc_settings->isInitialTestStart() && !$has_results) {
             $this->output_html .= $this->renderTest($this->loc_settings->getInitialTest(), null, true, true);
         } else {
             if ($this->loc_settings->getQualifiedTest() && $this->loc_settings->isGeneralQualifiedTestVisible()) {
                 $this->output_html .= $this->renderTest($this->loc_settings->getQualifiedTest(), null, false, true);
             }
         }
         $this->showMaterials($tpl, self::MATERIALS_OTHER, false, !$is_order);
     } else {
         $this->showMaterials($tpl, null, $is_manage);
     }
     // reset results by setting or for admins
     include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
     if (ilLOSettings::getInstanceByObjId($this->getContainerObject()->getId())->isResetResultsEnabled() or $GLOBALS['ilAccess']->checkAccess('write', '', $this->getContainerObject()->getRefId())) {
         if ($has_results) {
             if (!$is_manage && !$is_order) {
                 $this->showButton('askReset', $lng->txt('crs_reset_results'));
             }
         }
     }
     $tpl->setVariable('CONTAINER_PAGE_CONTENT', $this->output_html);
     return $tpl->get();
 }
コード例 #19
0
 /**
  * Show Java Server Settings
  */
 function showJavaServerObject()
 {
     global $tpl;
     $tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.java_settings.html', 'Modules/SystemFolder');
     $GLOBALS['lng']->loadLanguageModule('search');
     include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
     $toolbar = new ilToolbarGUI();
     $toolbar->addButton($this->lng->txt('lucene_create_ini'), $this->ctrl->getLinkTarget($this, 'createJavaServerIni'));
     $tpl->setVariable('ACTION_BUTTONS', $toolbar->getHTML());
     $this->initJavaServerForm();
     $this->setServerInfoSubTabs("java_server");
     $tpl->setVariable('SETTINGS_TABLE', $this->form->getHTML());
 }
コード例 #20
0
ファイル: class.ilObjTestGUI.php プロジェクト: bheyser/qplskl
 /**
  * @param $ilToolbar
  * @param $context
  */
 private function populateQuestionBrowserToolbarButtons(ilToolbarGUI $toolbar, $context)
 {
     require_once 'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
     $this->ctrl->setParameterByClass('ilTestQuestionBrowserTableGUI', ilTestQuestionBrowserTableGUI::CONTEXT_PARAMETER, $context);
     $this->ctrl->setParameterByClass('ilTestQuestionBrowserTableGUI', ilTestQuestionBrowserTableGUI::MODE_PARAMETER, ilTestQuestionBrowserTableGUI::MODE_BROWSE_POOLS);
     $toolbar->addButton($this->lng->txt("tst_browse_for_qpl_questions"), $this->ctrl->getLinkTargetByClass('ilTestQuestionBrowserTableGUI', ilTestQuestionBrowserTableGUI::CMD_BROWSE_QUESTIONS));
     $this->ctrl->setParameterByClass('ilTestQuestionBrowserTableGUI', ilTestQuestionBrowserTableGUI::MODE_PARAMETER, ilTestQuestionBrowserTableGUI::MODE_BROWSE_TESTS);
     $toolbar->addButton($this->lng->txt("tst_browse_for_tst_questions"), $this->ctrl->getLinkTargetByClass('ilTestQuestionBrowserTableGUI', ilTestQuestionBrowserTableGUI::CMD_BROWSE_QUESTIONS));
 }
コード例 #21
0
 /**
  * shows a table with existing hints
  * 
  * @access	private
  * @global	ilTemplate	$tpl
  */
 private function showListCmd()
 {
     global $ilCtrl, $tpl, $lng;
     $this->initHintOrderingClipboardNotification();
     require_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
     require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsTableGUI.php';
     $toolbar = new ilToolbarGUI();
     $questionHintList = ilAssQuestionHintList::getListByQuestionId($this->questionOBJ->getId());
     if ($this->hintOrderingClipboard->hasStored()) {
         $questionHintList = $this->getQuestionHintListWithoutHintStoredInOrderingClipboard($questionHintList);
         $toolbar->addButton($lng->txt('tst_questions_hints_toolbar_cmd_reset_ordering_clipboard'), $ilCtrl->getLinkTarget($this, self::CMD_RESET_ORDERING_CLIPBOARD));
     } else {
         $toolbar->addButton($lng->txt('tst_questions_hints_toolbar_cmd_add_hint'), $ilCtrl->getLinkTargetByClass('ilAssQuestionHintGUI', ilAssQuestionHintGUI::CMD_SHOW_FORM));
     }
     $table = new ilAssQuestionHintsTableGUI($this->questionOBJ, $questionHintList, $this, self::CMD_SHOW_LIST, ilAssQuestionHintsTableGUI::TBL_MODE_ADMINISTRATION, $this->hintOrderingClipboard);
     $tpl->setContent($ilCtrl->getHtml($toolbar) . $ilCtrl->getHtml($table));
 }
コード例 #22
0
 /**
  * Main function of ilRoomSharingFloorPlansGUI. Creates an instance of
  * RoomSharingFloorPlansTableGUI to display a table that contains all
  * uploaded floor plans. If the user has 'write' permissions, a button for
  * adding a new floor plan is displayed.
  */
 public function renderObject()
 {
     if (!$this->permission->checkPrivilege(PRIVC::ACCESS_FLOORPLANS)) {
         ilUtil::sendFailure($this->lng->txt("rep_robj_xrs_no_permission_for_action"));
         $this->ctrl->redirectByClass('ilinfoscreengui', 'showSummary', 'showSummary');
         return false;
     }
     // floor plans only addable by users with write permissions
     if ($this->permission->checkPrivilege(PRIVC::ADD_FLOORPLANS)) {
         $bar = new ilToolbarGUI();
         $bar->addButton($this->lng->txt('rep_robj_xrs_floor_plans_add'), $this->ctrl->getLinkTarget($this, 'create'));
         $bar_content = $bar->getHTML();
     }
     $table = new ilRoomSharingFloorPlansTableGUI($this, 'render', $this->ref_id);
     $this->tpl->setContent($bar_content . $table->getHTML());
 }
コード例 #23
0
 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"));
 }
コード例 #24
0
 /**
  * Handles the save command of the form for editing an existing room.
  */
 public function saveRoom()
 {
     if (!$this->permission->checkPrivilege(PRIVC::EDIT_ROOMS)) {
         ilUtil::sendFailure($this->lng->txt("rep_robj_xrs_no_permission_for_action"), true);
         $this->ctrl->redirectByClass('ilinfoscreengui', 'showSummary', 'showSummary');
         return false;
     }
     $toolbar = new ilToolbarGUI();
     if ($this->permission->checkPrivilege(PRIVC::ACCESS_ROOMS)) {
         $toolbar->addButton($this->lng->txt('rep_robj_xrs_back_to_rooms'), $this->ctrl->getLinkTargetByClass('ilroomsharingroomsgui', "showRooms"));
     }
     $this->form_gui = $this->initForm("edit");
     $this->form_gui->setValuesByPost();
     if ($this->form_gui->checkInput()) {
         try {
             $this->room_obj->setName($this->form_gui->getInput("name"));
             $this->room_obj->setType($this->form_gui->getInput("type"));
             $this->room_obj->setMinAlloc($this->form_gui->getInput("min_alloc"));
             $this->room_obj->setMaxAlloc($this->form_gui->getInput("max_alloc"));
             $this->room_obj->setFileId($this->form_gui->getInput("file_id"));
             $this->room_obj->resetAttributes();
             foreach ($this->getSetAttributeValuesFromForm() as $set_attribute_values) {
                 $this->room_obj->addAttribute($set_attribute_values['id'], $set_attribute_values['count']);
             }
             $this->room_obj->save();
             $this->showRoom();
         } catch (ilRoomSharingRoomException $exc) {
             ilUtil::sendFailure($this->lng->txt($exc->getMessage()), true);
             $this->form_gui->setValuesByPost();
             $this->tpl->setContent($toolbar->getHTML() . $this->form_gui->getHTML());
         }
     } else {
         $this->form_gui->setValuesByPost();
         $this->tpl->setContent($toolbar->getHTML() . $this->form_gui->getHTML());
     }
 }
コード例 #25
0
 /**
  * Show participants table
  * @return void 
  */
 protected function membersObject()
 {
     global $tree, $ilUser;
     $this->checkPermission('write');
     $this->tabs_gui->setTabActive('event_edit_members');
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.sess_members.html', 'Modules/Session');
     include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
     $toolbar = new ilToolbarGUI();
     $toolbar->addButton($this->lng->txt('sess_gen_attendance_list'), $this->ctrl->getLinkTarget($this, 'attendanceList'));
     $this->tpl->setVariable('ACTION_BUTTONS', $toolbar->getHTML());
     $members_obj = $this->initContainer(true);
     include_once './Modules/Session/classes/class.ilEventParticipants.php';
     // Save hide/show table settings
     $this->setShowHidePrefs();
     // Admins
     if (count($admins = $members_obj->getAdmins())) {
         include_once './Modules/Session/classes/class.ilSessionParticipantsTableGUI.php';
         if ($ilUser->getPref('sess_admin_hide')) {
             $table = new ilSessionParticipantsTableGUI($this, ilSessionParticipantsTableGUI::TYPE_ADMIN, false);
             $this->ctrl->setParameter($this, 'admin_hide', 0);
             $table->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'), '', ilUtil::getImagePath('edit_add.png'));
             $this->ctrl->clearParameters($this);
         } else {
             $table = new ilSessionParticipantsTableGUI($this, ilSessionParticipantsTableGUI::TYPE_ADMIN, true);
             $this->ctrl->setParameter($this, 'admin_hide', 1);
             $table->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'), '', ilUtil::getImagePath('edit_remove.png'));
             $this->ctrl->clearParameters($this);
         }
         $table->addCommandButton('updateMembers', $this->lng->txt('save'));
         $table->setTitle($this->lng->txt('event_tbl_admins'), 'icon_usr.png', $this->lng->txt('event_tbl_admins'));
         $table->enableRegistration($this->object->enabledRegistration());
         $table->setParticipants($admins);
         $table->parse();
         $this->tpl->setVariable('ADMINS', $table->getHTML());
     }
     // Tutors
     if (count($tutors = $members_obj->getTutors())) {
         include_once './Modules/Session/classes/class.ilSessionParticipantsTableGUI.php';
         if ($ilUser->getPref('sess_tutor_hide')) {
             $table = new ilSessionParticipantsTableGUI($this, ilSessionParticipantsTableGUI::TYPE_TUTOR, false);
             $this->ctrl->setParameter($this, 'tutor_hide', 0);
             $table->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'), '', ilUtil::getImagePath('edit_add.png'));
             $this->ctrl->clearParameters($this);
         } else {
             $table = new ilSessionParticipantsTableGUI($this, ilSessionParticipantsTableGUI::TYPE_TUTOR, true);
             $this->ctrl->setParameter($this, 'tutor_hide', 1);
             $table->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'), '', ilUtil::getImagePath('edit_remove.png'));
             $this->ctrl->clearParameters($this);
         }
         $table->addCommandButton('updateMembers', $this->lng->txt('save'));
         $table->setTitle($this->lng->txt('event_tbl_tutors'), 'icon_usr.png', $this->lng->txt('event_tbl_admins'));
         $table->enableRegistration($this->object->enabledRegistration());
         $table->setParticipants($tutors);
         $table->parse();
         $this->tpl->setVariable('TUTORS', $table->getHTML());
     }
     // Members
     if (count($members = $members_obj->getMembers())) {
         include_once './Modules/Session/classes/class.ilSessionParticipantsTableGUI.php';
         if ($ilUser->getPref('sess_member_hide')) {
             $table = new ilSessionParticipantsTableGUI($this, ilSessionParticipantsTableGUI::TYPE_MEMBER, false);
             $this->ctrl->setParameter($this, 'member_hide', 0);
             $table->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'), '', ilUtil::getImagePath('edit_add.png'));
             $this->ctrl->clearParameters($this);
         } else {
             $table = new ilSessionParticipantsTableGUI($this, ilSessionParticipantsTableGUI::TYPE_MEMBER, true);
             $this->ctrl->setParameter($this, 'member_hide', 1);
             $table->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'), '', ilUtil::getImagePath('edit_remove.png'));
             $this->ctrl->clearParameters($this);
         }
         $table->addCommandButton('updateMembers', $this->lng->txt('save'));
         $table->setTitle($this->lng->txt('event_tbl_members'), 'icon_usr.png', $this->lng->txt('event_tbl_admins'));
         $table->enableRegistration($this->object->enabledRegistration());
         $table->setParticipants($members);
         $table->parse();
         $this->tpl->setVariable('MEMBERS', $table->getHTML());
     }
 }
コード例 #26
0
 /**
  * shows the overview page with all entries in a table
  */
 public function showContent()
 {
     global $ilAccess, $tpl, $lng, $ilToolbar, $ilCtrl, $ilTabs;
     // if user has read permission and object is online OR user has write permissions
     if ($ilAccess->checkAccess('read', "", $this->object->getRefId()) && $this->object->getOnline() || $ilAccess->checkAccess('write', "", $this->object->getRefId())) {
         $ilTabs->setTabActive("content");
         include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
         $ilToolbar = new ilToolbarGUI();
         $ilToolbar->addButton($lng->txt("download_original_file"), $ilCtrl->getLinkTargetByClass("ilBibliographicDetailsGUI", "sendFile"));
         include_once "./Modules/Bibliographic/classes/class.ilBibliographicRecordListTableGUI.php";
         $table = new ilDataBibliographicRecordListTableGUI($this, $this->cmd);
         $html = $table->getHTML();
         $tpl->setContent($html);
         //Permanent Link
         $tpl->setPermanentLink("bibl", $this->object->getRefId());
     } else {
         $object_title = ilObject::_lookupTitle(ilObject::_lookupObjId($_GET["ref_id"]));
         ilUtil::sendFailure(sprintf($this->lng->txt("msg_no_perm_read_item"), $object_title), true);
         //redirect to repository without any parameters
         unset($_GET);
         ilObjectGUI::_gotoRepositoryRoot();
     }
 }
コード例 #27
0
 /**
  *
  */
 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());
 }
コード例 #28
0
 /**
  * The toolbar basically consists a button for adding new classes to the table. The button is
  * only disabled if the creation of new classes is granted.
  *
  * @return \ilToolbarGUI
  */
 private function createToolbar()
 {
     $toolbar = new ilToolbarGUI();
     if ($this->permission->checkPrivilege(PRIVC::ADD_CLASS)) {
         $target = $this->ctrl->getLinkTarget($this, "renderAddClassForm");
         $toolbar->addButton($this->lng->txt("rep_robj_xrs_privileges_class_new"), $target);
     }
     return $toolbar;
 }
コード例 #29
0
 /**
  * Show toolbar
  * @param string $a_tpl_var Name of template variable
  * @return 
  */
 protected function showToolbar($a_tpl_var)
 {
     if (!$this->checkPermissionBool('write')) {
         return;
     }
     include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
     $tool = new ilToolbarGUI();
     $tool->setFormAction($this->ctrl->getFormAction($this));
     $tool->addButton($this->lng->txt('webr_add'), $this->ctrl->getLinkTarget($this, 'addLink'));
     $this->tpl->setVariable($a_tpl_var, $tool->getHTML());
     return;
 }
コード例 #30
0
 /**
  * show administration panel
  */
 function showAdministrationPanel(&$tpl)
 {
     global $ilAccess, $lng;
     $lng->loadLanguageModule('cntr');
     if ($this->isActiveAdministrationPanel()) {
         // #11545
         $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
         include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
         $toolbar = new ilToolbarGUI();
         $this->ctrl->setParameter($this, "type", "");
         $this->ctrl->setParameter($this, "item_ref_id", "");
         if (!$_SESSION["clipboard"]) {
             if ($this->object->gotItems()) {
                 $toolbar->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
                 $toolbar->addFormButton($this->lng->txt('delete_selected_items'), 'delete');
                 $toolbar->addFormButton($this->lng->txt('move_selected_items'), 'cut');
                 $toolbar->addFormButton($this->lng->txt('copy_selected_items'), 'copy');
                 $toolbar->addFormButton($this->lng->txt('link_selected_items'), 'link');
                 // add download button if multi download enabled
                 $folder_set = new ilSetting("fold");
                 if ($folder_set->get("enable_multi_download") == true) {
                     $toolbar->addSeparator();
                     $toolbar->addFormButton($this->lng->txt('download_selected_items'), 'download');
                 }
             }
             if ($this->object->getType() == 'crs') {
                 if ($this->object->gotItems()) {
                     $toolbar->addSeparator();
                 }
                 $toolbar->addButton($this->lng->txt('cntr_adopt_content'), $this->ctrl->getLinkTargetByClass('ilObjectCopyGUI', 'initSourceSelection'));
             }
         } else {
             //$GLOBALS["tpl"]->addAdminPanelCommand("paste",
             //    $this->lng->txt("paste_clipboard_items"));
             $toolbar->addFormButton($this->lng->txt('paste_clipboard_items'), 'paste');
             if ($_SESSION["clipboard"]["cmd"] == "link") {
                 //$GLOBALS["tpl"]->addAdminPanelCommand("initAndDisplayLinkIntoMultipleObjects",
                 //	$this->lng->txt("paste_clipboard_items_into_multiple_objects"));
                 /*$toolbar->addFormButton(
                 			$this->lng->txt('paste_clipboard_items_into_multiple_objects'),
                 			'initAndDisplayLinkIntoMultipleObjects'
                 		);*/
             }
             $toolbar->addFormButton($this->lng->txt('clear_clipboard'), 'clear');
             if ($this->isMultiDownloadEnabled()) {
                 $toolbar->addSeparator();
                 $toolbar->addFormButton($this->lng->txt('download_selected_items'), 'download');
             }
         }
         $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, $this->object->gotItems() && !$_SESSION["clipboard"] ? true : false, $this->object->gotItems() && !$_SESSION["clipboard"] ? true : false);
         // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
         if ($this->object->gotItems()) {
             $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
         }
     } else {
         if ($this->edit_order) {
             if ($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
                 include_once './Services/Container/classes/class.ilContainer.php';
                 if ($this->isActiveOrdering()) {
                     // #11843
                     $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
                     include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
                     $toolbar = new ilToolbarGUI();
                     $this->ctrl->setParameter($this, "type", "");
                     $this->ctrl->setParameter($this, "item_ref_id", "");
                     $toolbar->addFormButton($this->lng->txt('sorting_save'), 'saveSorting');
                     $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, true, false);
                     /*																																			
                     $GLOBALS["tpl"]->addAdminPanelCommand("saveSorting",
                     	$this->lng->txt('sorting_save'));
                     
                     // button should appear at bottom, too
                     $GLOBALS["tpl"]->admin_panel_bottom = true;					 
                     */
                 }
             }
         } else {
             if ($this->isMultiDownloadEnabled()) {
                 // #11843
                 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
                 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
                 $toolbar = new ilToolbarGUI();
                 $this->ctrl->setParameter($this, "type", "");
                 $this->ctrl->setParameter($this, "item_ref_id", "");
                 $toolbar->addFormButton($this->lng->txt('download_selected_items'), 'download');
                 $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, $this->object->gotItems() ? true : false, $this->object->gotItems() ? true : false);
             }
         }
     }
 }