コード例 #1
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());
 }
コード例 #2
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();
     }
 }
コード例 #3
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());
     }
 }
コード例 #4
0
 /**
  * show selection screen for print view
  */
 function showPrintViewSelection()
 {
     global $ilUser, $lng;
     include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
     if (!$this->lm->isActivePrintView()) {
         return;
     }
     include_once "./Modules/LearningModule/classes/class.ilStructureObject.php";
     //$this->tpl = new ilTemplate("tpl.lm_toc.html", true, true, true);
     $this->tpl->setCurrentBlock("ContentStyle");
     if (!$this->offlineMode()) {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->lm->getStyleSheetId()));
     } else {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", "content_style/content.css");
     }
     $this->tpl->parseCurrentBlock();
     $this->renderPageTitle();
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->getStandardTemplate();
     $this->tpl->setVariable("TABS", $this->lm_gui->setilLMMenu($this->offlineMode(), $this->getExportFormat(), "print", true));
     $this->ilLocator();
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_print_selection.html", "Modules/LearningModule");
     // set title header
     $this->tpl->setTitle($this->lm->getTitle());
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
     /*$this->tpl->setVariable("TXT_BACK", $this->lng->txt("back"));
     		$this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
     		$this->tpl->setVariable("LINK_BACK",
     			$this->ctrl->getLinkTargetByClass("illmpresentationgui", ""));*/
     $this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormaction($this));
     $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
     if (!is_array($_POST["item"])) {
         if ($_GET["obj_id"] != "") {
             $_POST["item"][$_GET["obj_id"]] = "y";
         } else {
             $_POST["item"][1] = "y";
         }
     }
     $this->initPrintViewSelectionForm();
     foreach ($nodes as $node) {
         // check page activation
         $active = ilLMPage::_lookupActive($node["obj_id"], $this->lm->getType(), $this->lm_set->get("time_scheduled_page_activation"));
         if ($node["type"] == "pg" && !$active) {
             continue;
         }
         $text = $img_scr = $img_alt = "";
         $disabled = false;
         $checked = false;
         switch ($node["type"]) {
             // page
             case "pg":
                 $text = ilLMPageObject::_getPresentationTitle($node["obj_id"], $this->lm->getPageHeader(), $this->lm->isActiveNumbering(), $this->lm_set->get("time_scheduled_page_activation"), false, 0, $this->lang);
                 if (($ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) && $this->lm_gui->object->getPublicAccessMode() == "selected") {
                     if (!ilLMObject::_isPagePublic($node["obj_id"])) {
                         $disabled = true;
                         $text .= " (" . $this->lng->txt("cont_no_access") . ")";
                     }
                 }
                 $img_src = ilUtil::getImagePath("icon_pg.svg");
                 $img_alt = $lng->txt("icon") . " " . $lng->txt("pg");
                 break;
                 // learning module
             // learning module
             case "du":
                 $text = $this->lm->getTitle();
                 $img_src = ilUtil::getImagePath("icon_lm.svg");
                 $img_alt = $lng->txt("icon") . " " . $lng->txt("obj_lm");
                 break;
                 // chapter
             // chapter
             case "st":
                 $text = ilStructureObject::_getPresentationTitle($node["obj_id"], $this->lm->isActiveNumbering(), $this->lm_set->get("time_scheduled_page_activation"), 0, $this->lang);
                 if (($ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) && $this->lm_gui->object->getPublicAccessMode() == "selected") {
                     if (!ilLMObject::_isPagePublic($node["obj_id"])) {
                         $disabled = true;
                         $text .= " (" . $this->lng->txt("cont_no_access") . ")";
                     }
                 }
                 $img_src = ilUtil::getImagePath("icon_st.svg");
                 $img_alt = $lng->txt("icon") . " " . $lng->txt("st");
                 break;
         }
         if (!ilObjContentObject::_checkPreconditionsOfPage($this->lm->getRefId(), $this->lm->getId(), $node["obj_id"])) {
             $text .= " (" . $this->lng->txt("cont_no_access") . ")";
         }
         $this->nl->addListNode($node["obj_id"], $text, $node["parent"], $checked, $disabled, $img_src, $img_alt);
     }
     // check for free page
     if ($_GET["obj_id"] > 0 && !$this->lm_tree->isInTree($_GET["obj_id"])) {
         $text = ilLMPageObject::_getPresentationTitle($_GET["obj_id"], $this->lm->getPageHeader(), $this->lm->isActiveNumbering(), $this->lm_set->get("time_scheduled_page_activation"), false, 0, $this->lang);
         if (($ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) && $this->lm_gui->object->getPublicAccessMode() == "selected") {
             if (!ilLMObject::_isPagePublic($_GET["obj_id"])) {
                 $disabled = true;
                 $text .= " (" . $this->lng->txt("cont_no_access") . ")";
             }
         }
         $img_src = ilUtil::getImagePath("icon_pg.svg");
         $id = $_GET["obj_id"];
         $checked = true;
         $this->nl->addListNode($id, $text, 0, $checked, $disabled, $img_src, $img_alt);
     }
     $f = $this->form->getHTML();
     // submit toolbar
     $tb = new ilToolbarGUI();
     $tb->addFormButton($lng->txt("cont_show_print_view"), "showPrintView");
     $this->tpl->setVariable("TOOLBAR", $tb->getHTML());
     $this->tpl->setVariable("ITEM_SELECTION", $f);
     $this->tpl->show();
 }
コード例 #5
0
 /**
  * Show paste tree
  */
 public function showPasteTreeObject()
 {
     global $ilTabs, $ilToolbar;
     $ilTabs->setTabActive('view_content');
     if (!in_array($_SESSION['clipboard']['cmd'], array('link', 'copy', 'cut'))) {
         $message = __METHOD__ . ": Unknown action.";
         $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
     }
     $cmd = $_SESSION['clipboard']['cmd'];
     //
     $exp = $this->getTreeSelectorGUI($cmd);
     if ($exp->handleCommand()) {
         return;
     }
     $output = $exp->getHTML();
     $txt_var = $cmd == "copy" ? "copy" : "paste";
     // toolbars
     $t = new ilToolbarGUI();
     $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
     $t->addFormButton($this->lng->txt($txt_var), "performPasteIntoMultipleObjects");
     $t->addSeparator();
     $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
     $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
     $t->setCloseFormTag(false);
     $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), " ");
     $output = $t->getHTML() . $output;
     $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), " ");
     $t->setCloseFormTag(true);
     $t->setOpenFormTag(false);
     $output .= "<br />" . $t->getHTML();
     $this->tpl->setContent($output);
 }
コード例 #6
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());
 }
コード例 #7
0
 function linkChecker()
 {
     global $ilias, $ilUser, $tpl;
     $this->__initLinkChecker();
     $this->setTabs();
     $this->setContentSubTabs("link_check");
     require_once './Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
     $toolbar = new ilToolbarGUI();
     if ((bool) $ilias->getSetting('cron_web_resource_check')) {
         include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
         include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
         $chb = new ilCheckboxInputGUI($this->lng->txt('link_check_message_a'), 'link_check_message');
         $chb->setValue(1);
         $chb->setChecked((bool) ilLinkCheckNotify::_getNotifyStatus($ilUser->getId(), $this->object->getId()));
         $chb->setOptionTitle($this->lng->txt('link_check_message_b'));
         $toolbar->addInputItem($chb);
         $toolbar->addFormButton($this->lng->txt('save'), 'saveLinkCheck');
         $toolbar->setFormAction($this->ctrl->getLinkTarget($this, 'saveLinkCheck'));
     }
     $tgui = new ilLinkCheckerTableGUI($this, 'linkChecker');
     $tgui->setLinkChecker($this->link_checker_obj)->setRowHandler($this)->setRefreshButton($this->lng->txt('refresh'), 'refreshLinkCheck');
     return $tpl->setContent($tgui->prepareHTML()->getHTML() . $toolbar->getHTML());
 }
コード例 #8
0
 /**
  * Assign materials to skill level
  *
  * @param
  * @return
  */
 function assignMaterial()
 {
     global $tpl, $ilUser, $ilCtrl, $ilTabs, $lng, $ilSetting;
     if (!$ilSetting->get("disable_personal_workspace")) {
         ilUtil::sendInfo($lng->txt("skmg_ass_materials_from_workspace") . " » <a href='ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToWorkspace'>" . $lng->txt("personal_workspace") . "</a>");
     }
     $ilCtrl->saveParameter($this, "skill_id");
     $ilCtrl->saveParameter($this, "level_id");
     $ilCtrl->saveParameter($this, "tref_id");
     $ilCtrl->saveParameter($this, "basic_skill_id");
     $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, "assignMaterials"));
     // get ws tree
     include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
     $tree = new ilWorkspaceTree($ilUser->getId());
     // get access handler
     include_once "./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
     $acc_handler = new ilWorkspaceAccessHandler($tree);
     // get es explorer
     include_once "./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php";
     $exp = new ilWorkspaceExplorer(ilWorkspaceExplorer::SEL_TYPE_CHECK, '', 'skill_wspexpand', $tree, $acc_handler);
     $exp->setTargetGet('wsp_id');
     $exp->setFiltered(false);
     $exp->removeAllFormItemTypes();
     $exp->addFormItemForType("file");
     $exp->addFormItemForType("tstv");
     $exp->addFormItemForType("excv");
     if ($_GET['skill_wspexpand'] == '') {
         // not really used as session is already set [see above]
         $expanded = $tree->readRootId();
     } else {
         $expanded = $_GET['skill_wspexpand'];
     }
     $exp->setCheckedItems(array((int) $_POST['wsp_id']));
     $exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'assignMaterial'));
     $exp->setPostVar('wsp_id[]');
     $exp->setExpand($expanded);
     $exp->setOutput(0);
     // fill template
     $mtpl = new ilTemplate("tpl.materials_selection.html", true, true, "Services/Skill");
     $mtpl->setVariable("EXP", $exp->getOutput());
     // toolbars
     $tb = new ilToolbarGUI();
     $tb->addFormButton($lng->txt("select"), "selectMaterial");
     $tb->setFormAction($ilCtrl->getFormAction($this));
     $tb->setOpenFormTag(true);
     $tb->setCloseFormTag(false);
     $mtpl->setVariable("TOOLBAR1", $tb->getHTML());
     $tb->setOpenFormTag(false);
     $tb->setCloseFormTag(true);
     $mtpl->setVariable("TOOLBAR2", $tb->getHTML());
     $tpl->setContent($mtpl->get());
 }
コード例 #9
0
 /**
  * Shows a card
  * Implemented here to ensure a common look & feel for all training modes
  * This method needs $_GET["card_id"] to be set
  */
 protected function showCard()
 {
     $card_id = (int) $_GET["card_id"];
     $this->ctrl->saveParameter($this, "card_id");
     $tpl = $this->plugin->getTemplate("tpl.training_show_card.html");
     // show the status text
     if ($text = $this->getTrainingStatusText()) {
         $tpl->setVariable("TRAINING_STATUS_TEXT", $text);
     }
     // show the flashcard
     $this->plugin->includeClass("class.ilFlashcardGUI.php");
     $card = $this->object->getCard($card_id);
     if (!is_object($card)) {
         $tpl->setVariable("CARD_PRESENTATION", $this->plugin->txt('card_is_deleted'));
     } else {
         $card_gui = new ilFlashcardGUI($this, $this->object->getCard($card_id));
         $tpl->setVariable("CARD_PRESENTATION", $card_gui->getCardForTrainingHTML());
     }
     // show the training actions for the card
     require_once "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php";
     $toolbar = new ilToolbarGUI();
     $toolbar->setFormAction($this->ctrl->getFormAction($this));
     $actions = $this->getCardActions($card_id);
     foreach ($actions as $action) {
         $toolbar->addFormButton($action["txt"], $action["cmd"]);
     }
     if (count($actions) > 1) {
         $toolbar->addSeparator();
     }
     $toolbar->addFormButton($this->txt("cancel_training"), "cancelTraining");
     $tpl->setVariable("CARD_ACTIONS", $toolbar->getHTML());
     $this->tpl->setContent($tpl->get());
 }
コード例 #10
0
 function manageObject()
 {
     global $ilUser, $objDefinition, $ilCtrl, $lng;
     $objects = array();
     $this->manage = true;
     $this->setAvailableDetailLevels(1, 1);
     $top_tb = new ilToolbarGUI();
     $top_tb->setFormAction($ilCtrl->getFormAction($this));
     $top_tb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
     if ($this->view == self::VIEW_SELECTED_ITEMS) {
         $top_tb->addFormButton($lng->txt("remove"), "confirmRemove");
     } else {
         $top_tb->addFormButton($lng->txt("pd_unsubscribe_memberships"), "confirmRemove");
     }
     $top_tb->addSeparator();
     $top_tb->addFormButton($lng->txt("cancel"), "getHTML");
     $top_tb->setCloseFormTag(false);
     $bot_tb = new ilToolbarGUI();
     $bot_tb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
     if ($this->view == self::VIEW_SELECTED_ITEMS) {
         $bot_tb->addFormButton($lng->txt("remove"), "confirmRemove");
     } else {
         $bot_tb->addFormButton($lng->txt("pd_unsubscribe_memberships"), "confirmRemove");
     }
     $bot_tb->addSeparator();
     $bot_tb->addFormButton($lng->txt("cancel"), "getHTML");
     $bot_tb->setOpenFormTag(false);
     return $top_tb->getHTML() . $this->getHTML() . $bot_tb->getHTML();
 }
コード例 #11
0
 /**
  * Get confirmation screen HTML.
  *
  * @return	string		HTML code.
  */
 public final function getHTML()
 {
     global $lng;
     ilUtil::sendQuestion($this->getHeaderText());
     include_once "./Services/Utilities/classes/class.ilConfirmationTableGUI.php";
     // delete/handle items
     if (count($this->item) > 0) {
         $ctab = new ilConfirmationTableGUI($this->use_images);
         $ctab->setData($this->item);
         // other buttons
         foreach ($this->buttons as $b) {
             $ctab->addCommandButton($b["cmd"], $b["txt"]);
         }
         $ctab->addCommandButton($this->confirm_cmd, $this->confirm_txt);
         $ctab->addCommandButton($this->cancel_cmd, $this->cancel_txt);
         $ctab->setFormAction($this->getFormAction());
         foreach ($this->hidden_item as $hidden_item) {
             $ctab->addHiddenInput($hidden_item["var"], $hidden_item["value"]);
         }
         if ($this->form_name) {
             $ctab->setFormName($this->form_name);
         }
         return $ctab->getHTML();
     } else {
         $tb = new ilToolbarGUI();
         $tb->setFormAction($this->getFormAction());
         $tb->addFormButton($this->confirm_txt, $this->confirm_cmd);
         $tb->addFormButton($this->cancel_txt, $this->cancel_cmd);
         return $tb->getHTML();
     }
 }
コード例 #12
0
 /**
  * Insert media object from pool
  */
 function insertFromPool($a_change_obj_ref = false)
 {
     global $ilCtrl, $ilAccess, $ilTabs, $tpl, $lng, $ilToolbar;
     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");
         if ($a_change_obj_ref) {
             $tb->addButton($lng->txt("cont_switch_to_media_pool"), $ilCtrl->getLinkTarget($this, "changeObjectReference"));
         } else {
             $tb->addButton($lng->txt("cont_switch_to_media_pool"), $ilCtrl->getLinkTarget($this, "insert"));
         }
         $ilCtrl->setParameter($this, "subCmd", "");
         $html = $tb->getHTML();
         $this->getTabs($ilTabs, true, $a_change_obj_ref);
         $ilTabs->setSubTabActive("cont_mob_from_media_pool");
         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");
         $tcmd = $a_change_obj_ref ? "changeObjectReference" : "insert";
         $tmode = $a_change_obj_ref ? ilMediaPoolTableGUI::IL_MEP_SELECT_SINGLE : ilMediaPoolTableGUI::IL_MEP_SELECT;
         $mpool_table = new ilMediaPoolTableGUI($this, $tcmd, $pool, "mep_folder", $tmode);
         $html .= $mpool_table->getHTML();
         $tpl->setContent($html);
     } else {
         $this->poolSelection($a_change_obj_ref);
     }
 }
コード例 #13
0
 /**
  * Render item
  */
 function render($a_mode = "property_form")
 {
     global $lng, $ilCtrl, $ilObjDataCache, $tree;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initPanel();
     $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/Explorer2/js/Explorer2.js");
     $tpl = new ilTemplate("tpl.prop_expl_select.html", true, true, "Services/UIComponent/Explorer2");
     // set values
     $val = $this->getValue();
     if (is_array($val)) {
         $val_txt = $sep = "";
         foreach ($val as $v) {
             $tpl->setCurrentBlock("node_hid");
             $tpl->setVariable("HID_NAME", $this->getPostVar() . "[]");
             $tpl->setVariable("HID_VAL", $v);
             $tpl->parseCurrentBlock();
             $val_txt .= $sep . $this->getTitleForNodeId($v);
             $sep = ", ";
             $this->explorer_gui->setNodeOpen($v);
             $this->explorer_gui->setNodeSelected($v);
         }
         $tpl->setVariable("VAL_TXT", $val_txt);
     } else {
         if ($val != "") {
             $tpl->setCurrentBlock("node_hid");
             $tpl->setVariable("HID_NAME", $this->getPostVar());
             $tpl->setVariable("HID_VAL", $val);
             $tpl->parseCurrentBlock();
             $tpl->setVariable("VAL_TXT", $this->getTitleForNodeId($val));
             $this->explorer_gui->setNodeOpen($val);
             $this->explorer_gui->setNodeSelected($val);
         }
     }
     $tpl->setVariable("POST_VAR", $this->getPostVar());
     $tpl->setVariable("ID", $this->getFieldId());
     //		$tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
     $tpl->setVariable("TXT_SELECT", $lng->txt("select"));
     $tpl->setVariable("TXT_RESET", $lng->txt("reset"));
     $tpl->setVariable("EXPL", $this->explorer_gui->getHTML());
     $top_tb = new ilToolbarGUI();
     $top_tb->addButton($lng->txt("select"), "#", "", "", "", "", "submit ilExplSelectInputButS");
     $top_tb->addButton($lng->txt("cancel"), "#", "", "", "", "", "submit ilExplSelectInputButC");
     $tpl->setVariable("TOP_TB", $top_tb->getHTML());
     $tpl->setVariable("BOT_TB", $top_tb->getHTML());
     //$tpl->setVariable("HREF_SELECT",
     //	$ilCtrl->getLinkTargetByClass(array($parent_gui, "ilformpropertydispatchgui", "ilrepositoryselectorinputgui"),
     //	"showRepositorySelection"));
     /*if ($this->getValue() > 0 && $this->getValue() != ROOT_FOLDER_ID)
     		{
     			$tpl->setVariable("TXT_ITEM",
     				$ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($this->getValue())));
     		}
     		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();
 }
コード例 #14
0
 /**
  * Show Sequencing
  */
 function showSequencing()
 {
     global $tpl, $lng, $ilTabs, $ilToolbar, $ilCtrl;
     $ilTabs->setTabActive("sahs_sequencing");
     include_once "./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php";
     if (!$this->object->getSequencingExpertMode()) {
         $ilToolbar->addButton($lng->txt("sahs_activate_expert_mode"), $ilCtrl->getLinkTarget($this, "confirmExpertMode"));
     } else {
         include_once "./Services/UIComponent/NestedList/classes/class.ilNestedList.php";
         $list = new ilNestedList();
         $t = $this->object->getTree();
         $root_node = $t->getNodeData($t->getRootId());
         $nodes = $this->object->getTree()->getSubtree($root_node);
         foreach ($nodes as $node) {
             if (in_array($node["type"], array("", "chap", "sco"))) {
                 $ntpl = new ilTemplate("tpl.seq_node.html", true, true, "Modules/Scorm2004");
                 $ntpl->setVariable("NODE_ID", $node["child"]);
                 if ($node["type"] == "") {
                     $ntpl->setVariable("TITLE", $this->object->getTitle());
                     $item = new ilSCORM2004Item($this->object->getId(), true);
                 } else {
                     $ntpl->setVariable("TITLE", $node["title"]);
                     $item = new ilSCORM2004Item($node["child"]);
                 }
                 $ntpl->setVariable("SEQ_INFO", ilUtil::prepareFormOutput($item->exportAsXML(false)));
                 $list->addListNode($ntpl->get(), $node["child"], $node["parent"]);
             }
         }
         $tb = new ilToolbarGUI();
         $tb->addFormButton($lng->txt("save"), "saveSequencing");
         $ftpl = new ilTemplate("tpl.sequencing.html", true, true, "Modules/Scorm2004");
         $ftpl->setVariable("CONTENT", $list->getHTML());
         $ftpl->setVariable("FORM_ACTION", $ilCtrl->getFormAction($this));
         $ftpl->setVariable("TB", $tb->getHTML());
         $tpl->setContent($ftpl->get());
     }
 }
コード例 #15
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();
     // Waiting list table
     include_once './Modules/Session/classes/class.ilSessionWaitingList.php';
     $waiting_list = new ilSessionWaitingList($this->object->getId());
     if (count($wait = $waiting_list->getAllUsers())) {
         include_once './Services/Membership/classes/class.ilWaitingListTableGUI.php';
         if ($ilUser->getPref('sess_wait_hide')) {
             $table_gui = new ilWaitingListTableGUI($this, $waiting_list, false);
             $this->ctrl->setParameter($this, 'wait_hide', 0);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'));
             $this->ctrl->clearParameters($this);
         } else {
             $table_gui = new ilWaitingListTableGUI($this, $waiting_list, true);
             $this->ctrl->setParameter($this, 'wait_hide', 1);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'));
             $this->ctrl->clearParameters($this);
         }
         $table_gui->setUsers($wait);
         $table_gui->setTitle($this->lng->txt('grp_header_waiting_list'), 'icon_usr.svg', $this->lng->txt('group_new_registrations'));
         $this->tpl->setVariable('TABLE_WAIT', $table_gui->getHTML());
     }
     // subscribers
     // Subscriber table
     include_once './Services/Membership/classes/class.ilParticipants.php';
     $part = ilParticipants::getInstanceByObjId($this->object->getId());
     if ($part->getSubscribers()) {
         include_once './Services/Membership/classes/class.ilSubscriberTableGUI.php';
         if ($ilUser->getPref('grp_subscriber_hide')) {
             $table_gui = new ilSubscriberTableGUI($this, false, false);
             $this->ctrl->setParameter($this, 'subscriber_hide', 0);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'));
             $this->ctrl->clearParameters($this);
         } else {
             $table_gui = new ilSubscriberTableGUI($this, true, false);
             $this->ctrl->setParameter($this, 'subscriber_hide', 1);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'));
             $this->ctrl->clearParameters($this);
         }
         $table_gui->readSubscriberData();
         $table_gui->setTitle($this->lng->txt('group_new_registrations'), 'icon_usr.svg', $this->lng->txt('group_new_registrations'));
         $this->tpl->setVariable('TABLE_SUB', $table_gui->getHTML());
     }
     // 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'));
             $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'));
             $this->ctrl->clearParameters($this);
         }
         $table->addCommandButton('updateMembers', $this->lng->txt('save'));
         $table->setTitle($this->lng->txt('event_tbl_admins'), 'icon_usr.svg', $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'));
             $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'));
             $this->ctrl->clearParameters($this);
         }
         $table->addCommandButton('updateMembers', $this->lng->txt('save'));
         $table->setTitle($this->lng->txt('event_tbl_tutors'), 'icon_usr.svg', $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'));
             $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'));
             $this->ctrl->clearParameters($this);
         }
         $table->addCommandButton('updateMembers', $this->lng->txt('save'));
         $table->setTitle($this->lng->txt('event_tbl_members'), 'icon_usr.svg', $this->lng->txt('event_tbl_admins'));
         $table->enableRegistration($this->object->enabledRegistration());
         $table->setParticipants($members);
         $table->parse();
         $this->tpl->setVariable('MEMBERS', $table->getHTML());
     }
     $GLOBALS['lng']->loadLanguageModule('mmbr');
     $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
     $this->tpl->setVariable('TXT_SELECTED_USER', $this->lng->txt('mmbr_selected_users'));
     $this->tpl->setVariable('BTN_FOOTER_MAIL', $this->lng->txt('mmbr_btn_mail_selected_users'));
     $this->tpl->setVariable('ARROW_DOWN', ilUtil::getImagePath('arrow_downright.svg'));
 }
コード例 #16
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());
 }
コード例 #17
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());
 }
コード例 #18
0
 /**
  * Get confirmation screen HTML.
  *
  * @return	string		HTML code.
  */
 public final function getHTML()
 {
     global $lng;
     ilUtil::sendQuestion($this->getHeaderText());
     include_once "./Services/Utilities/classes/class.ilConfirmationTableGUI.php";
     // delete/handle items
     if (count($this->item) > 0) {
         $ctab = new ilConfirmationTableGUI($this->use_images);
         $ctab->setData($this->item);
         // other buttons
         foreach ($this->buttons as $b) {
             $ctab->addCommandButton($b["cmd"], $b["txt"]);
         }
         $ctab->addCommandButton($this->confirm_cmd, $this->confirm_txt);
         $ctab->addCommandButton($this->cancel_cmd, $this->cancel_txt);
         $ctab->setFormAction($this->getFormAction());
         foreach ($this->hidden_item as $hidden_item) {
             $ctab->addHiddenInput($hidden_item["var"], $hidden_item["value"]);
         }
         if ($this->form_name) {
             $ctab->setFormName($this->form_name);
         }
         return $ctab->getHTML();
     } else {
         $tb = new ilToolbarGUI();
         $tb->setPreventDoubleSubmission(true);
         $tb->setFormAction($this->getFormAction());
         if ($this->hidden_item) {
             require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
             foreach ($this->hidden_item as $hidden_item) {
                 $hiddenInput = new ilHiddenInputGUI($hidden_item['var']);
                 $hiddenInput->setValue($hidden_item['value']);
                 $tb->addInputItem($hiddenInput);
             }
         }
         require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
         $confirm = ilSubmitButton::getInstance();
         $confirm->setCommand($this->confirm_cmd);
         $confirm->setCaption($this->confirm_txt, false);
         $cancel = ilSubmitButton::getInstance();
         $cancel->setCommand($this->cancel_cmd);
         $cancel->setCaption($this->cancel_txt, false);
         $tb->addButtonInstance($confirm);
         $tb->addButtonInstance($cancel);
         return $tb->getHTML();
     }
 }
コード例 #19
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());
 }
コード例 #20
0
 function manageObject()
 {
     global $ilUser, $objDefinition, $ilCtrl, $lng;
     $objects = array();
     $this->manage = true;
     $this->setAvailableDetailLevels(1, 1);
     $top_tb = new ilToolbarGUI();
     $top_tb->setFormAction($ilCtrl->getFormAction($this));
     $top_tb->setLeadingImage(ilUtil::getImagePath("arrow_upright.png"), $lng->txt("actions"));
     if ($this->view == self::VIEW_MY_OFFERS) {
         $top_tb->addFormButton($lng->txt("remove"), "confirmRemove");
     } else {
         $top_tb->addFormButton($lng->txt("pd_unsubscribe_memberships"), "confirmRemove");
     }
     $top_tb->addSeparator();
     $top_tb->addFormButton($lng->txt("cancel"), "getHTML");
     $top_tb->setCloseFormTag(false);
     $bot_tb = new ilToolbarGUI();
     $bot_tb->setLeadingImage(ilUtil::getImagePath("arrow_downright.png"), $lng->txt("actions"));
     if ($this->view == self::VIEW_MY_OFFERS) {
         $bot_tb->addFormButton($lng->txt("remove"), "confirmRemove");
     } else {
         $bot_tb->addFormButton($lng->txt("pd_unsubscribe_memberships"), "confirmRemove");
     }
     $bot_tb->addSeparator();
     $bot_tb->addFormButton($lng->txt("cancel"), "getHTML");
     $bot_tb->setOpenFormTag(false);
     return $top_tb->getHTML() . $this->getHTML() . $bot_tb->getHTML();
     /*		
     		if($this->view == self::VIEW_MY_OFFERS)
     		{
     			return $top_tb->getHTML().$this->getHTML().$bot_tb->getHTML();
     			
     			foreach($ilUser->getDesktopItems() as $item)
     			{
     				$objects[] = $item;
     			}
     		}
     		else
     		{		 
     			$objtype_groups = $objDefinition->getGroupedRepositoryObjectTypes(
     			   array("cat", "crs", "grp", "fold"));
     
     			foreach($objtype_groups as $grpdata)
     			{							
     				foreach($this->getObjectsByMembership($grpdata["objs"]) as $item)
     				{
     					$objects[] = $item;
     				}
     			}
     		}
     		
     		include_once "Services/PersonalDesktop/classes/class.ilPDSelectedItemsTableGUI.php";
     		$tbl = new ilPDSelectedItemsTableGUI($this, "manage", $objects, $this->view, ($ilUser->getPref("pd_order_items") == 'location'));
     		return $tbl->getHTML();
     */
 }
コード例 #21
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());
     }
 }
コード例 #22
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());
 }
コード例 #23
0
 /**
  * Show target selection
  */
 public function showTargetSelectionTree()
 {
     global $ilTabs, $ilToolbar, $ilCtrl, $tree, $tpl, $objDefinition, $lng;
     $this->tpl = $tpl;
     if ($objDefinition->isContainer($this->getType())) {
         ilUtil::sendInfo($this->lng->txt('msg_copy_clipboard_container'));
     } else {
         ilUtil::sendInfo($this->lng->txt('msg_copy_clipboard'));
     }
     //
     include_once "./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php";
     $exp = new ilRepositorySelectorExplorerGUI($this, "showTargetSelectionTree");
     $exp->setTypeWhiteList(array("root", "cat", "grp", "crs", "fold"));
     $exp->setSelectMode("target", false);
     if ($exp->handleCommand()) {
         return;
     }
     $output = $exp->getHTML();
     // toolbars
     $t = new ilToolbarGUI();
     $t->setFormAction($ilCtrl->getFormAction($this, "saveTarget"));
     if ($objDefinition->isContainer($this->getType())) {
         $t->addFormButton($lng->txt("btn_next"), "saveTarget");
     } else {
         $t->addFormButton($lng->txt("paste"), "saveTarget");
     }
     $t->addSeparator();
     $t->addFormButton($lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
     $t->addFormButton($lng->txt("cancel"), "cancel");
     $t->setCloseFormTag(false);
     $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), " ");
     $output = $t->getHTML() . $output;
     $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), " ");
     $t->setCloseFormTag(true);
     $t->setOpenFormTag(false);
     $output .= "<br />" . $t->getHTML();
     $this->tpl->setContent($output);
     return;
     // old implementation
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html', "Services/Object");
     include_once './Services/Object/classes/class.ilPasteIntoMultipleItemsExplorer.php';
     $exp = new ilPasteIntoMultipleItemsExplorer(ilPasteIntoMultipleItemsExplorer::SEL_TYPE_RADIO, 'ilias.php?baseClass=ilRepositoryGUI&amp;cmd=goto', 'paste_copy_repexpand');
     // Target selection should check for create permission
     $required_perm = 'visible';
     $create_perm = 'create_' . ilObject::_lookupType($this->getSource(), true);
     if ($create_perm) {
         $required_perm .= ',' . $create_perm;
     }
     $exp->setRequiredFormItemPermission($required_perm);
     $exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'showTargetSelectionTree'));
     $exp->setTargetGet('ref_id');
     $exp->setPostVar('target');
     $exp->highlightNode($_GET['ref_id']);
     $exp->setCheckedItems(array((int) $_POST['target']));
     // Filter to container
     foreach (array('cat', 'root', 'crs', 'grp', 'fold') as $container) {
         /*
         if($this->getType() == 'crs' and $container == 'crs')
         {
         	continue;
         }
         */
         $sub = $objDefinition->getSubObjects($container);
         if (!isset($sub[$this->getType()])) {
             $exp->removeFormItemForType($container);
         }
     }
     if ($_GET['paste_copy_repexpand'] == '') {
         $expanded = $tree->readRootId();
     } else {
         $expanded = $_GET['paste_copy_repexpand'];
     }
     $this->tpl->setVariable('FORM_TARGET', '_self');
     $this->tpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this, 'copySelection'));
     $exp->setExpand($expanded);
     // build html-output
     $exp->setOutput(0);
     $output = $exp->getOutput();
     $this->tpl->setVariable('OBJECT_TREE', $output);
     $this->tpl->setVariable('CMD_SUBMIT', 'saveTarget');
     if ($objDefinition->isContainer($this->getType())) {
         $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('btn_next'));
     } else {
         if (!$objDefinition->isPlugin($this->getType())) {
             $submit = $this->lng->txt('obj_' . $this->getType() . '_duplicate');
         } else {
             // get plugin instance
             include_once "Services/Component/classes/class.ilPlugin.php";
             $plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj", ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
             $submit = $plugin->txt('obj_' . $this->getType() . '_duplicate');
         }
         $this->tpl->setVariable('TXT_SUBMIT', $submit);
     }
     $ilToolbar->addButton($this->lng->txt('cancel'), $ilCtrl->getLinkTarget($this, 'cancel'));
 }