/**
  * Get toolbar
  *
  * @return object toolbar
  */
 function getToolbar()
 {
     global $ilCtrl, $lng, $tpl;
     // toolbar
     $tb = new ilToolbarGUI();
     $tb->setFormAction($ilCtrl->getFormAction($this));
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $options = array("WholePicture" => $lng->txt("cont_WholePicture"), "Rect" => $lng->txt("cont_Rect"), "Circle" => $lng->txt("cont_Circle"), "Poly" => $lng->txt("cont_Poly"));
     $si = new ilSelectInputGUI($lng->txt("cont_shape"), "shape");
     $si->setOptions($options);
     $tb->addInputItem($si, true);
     $tb->addFormButton($lng->txt("cont_add_area"), "addNewArea");
     // highlight mode
     /*		if (strtolower(get_class($this)) == "ilimagemapeditorgui")
     		{
     			$st_item = $this->media_object->getMediaItem("Standard");
     			$tb->addSeparator();
     			$options = ilMapArea::getAllHighlightModes();
     			$hl = new ilSelectInputGUI($lng->txt("cont_highlight_mode"), "highlight_mode");
     			$hl->setOptions($options);
     //			$hl->setValue($st_item->getHighlightMode());
     			$tb->addInputItem($hl, true);
     			$options = ilMapArea::getAllHighlightClasses();
     			$hc = new ilSelectInputGUI($lng->txt("cont_highlight_class"), "highlight_class");
     			$hc->setOptions($options);
     //			$hc->setValue($st_item->getHighlightClass());
     			$tb->addInputItem($hc, false);
     			$tb->addFormButton($lng->txt("cont_set"), "setHighlight");
     		}*/
     return $tb;
 }
 /**
  * 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());
 }
 /**
  * Get toolbar
  *
  * @return object toolbar
  */
 function getToolbar()
 {
     global $ilCtrl, $lng;
     // toolbar
     $tb = new ilToolbarGUI();
     $tb->setFormAction($ilCtrl->getFormAction($this));
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $options = array("Rect" => $lng->txt("cont_Rect"), "Circle" => $lng->txt("cont_Circle"), "Poly" => $lng->txt("cont_Poly"), "Marker" => $lng->txt("cont_marker"));
     $si = new ilSelectInputGUI($lng->txt("cont_trigger_area"), "shape");
     $si->setOptions($options);
     $tb->addInputItem($si, true);
     $tb->addFormButton($lng->txt("add"), "addNewArea");
     return $tb;
 }
Пример #4
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());
 }
 /**
  * @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();
 }
 /**
  * list fields
  */
 public function listFields()
 {
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     $tables = $this->parent_obj->object->getTables();
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     $table_selection = new ilSelectInputGUI('', 'table_id');
     $table_selection->setOptions($options);
     $table_selection->setValue($this->table_id);
     $this->toolbar->setFormAction($this->ctrl->getFormActionByClass("ilDataCollectionFieldListGUI", "doTableSwitch"));
     $this->toolbar->addText($this->lng->txt("dcl_table"));
     $this->toolbar->addInputItem($table_selection);
     $this->toolbar->addFormButton($this->lng->txt('change'), 'doTableSwitch');
     $this->toolbar->addSeparator();
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "create"));
     $this->toolbar->addSeparator();
     $this->ctrl->setParameterByClass("ildatacollectiontableeditgui", "table_id", $this->table_id);
     $this->toolbar->addButton($this->lng->txt("dcl_table_settings"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "edit"));
     $this->toolbar->addButton($this->lng->txt("dcl_delete_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "confirmDelete"));
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_field"), $this->ctrl->getLinkTargetByClass("ildatacollectionfieldeditgui", "create"));
     // requested not to implement this way...
     //        $tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     require_once './Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php';
     $list = new ilDataCollectionFieldListTableGUI($this, $this->ctrl->getCmd(), $this->table_id);
     $this->tpl->setContent($list->getHTML());
 }
 public function __construct(ilCtrl $ctrl, ilTemplate $tpl, ilLanguage $lng)
 {
     $this->ctrl = $ctrl;
     $this->tpl = $tpl;
     $this->lng = $lng;
     parent::__construct();
 }
Пример #8
0
 /**
  * Display mark schema
  * @param ilPropertyFormGUI $ects_form
  */
 protected function showMarkSchema(ilPropertyFormGUI $ects_form = null)
 {
     if (!$this->object->canEditMarks()) {
         ilUtil::sendInfo($this->lng->txt('cannot_edit_marks'));
     }
     $this->toolbar->setFormAction($this->ctrl->getFormAction($this, 'showMarkSchema'));
     if ($this->object->canEditMarks()) {
         require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
         $create_simple_mark_schema_button = ilSubmitButton::getInstance();
         $create_simple_mark_schema_button->setCaption($this->lng->txt('tst_mark_create_simple_mark_schema'), false);
         $create_simple_mark_schema_button->setCommand('addSimpleMarkSchema');
         $this->toolbar->addButtonInstance($create_simple_mark_schema_button);
     }
     require_once 'Modules/Test/classes/tables/class.ilMarkSchemaTableGUI.php';
     $mark_schema_table = new ilMarkSchemaTableGUI($this, 'showMarkSchema', '', $this->object);
     $content_parts = array($mark_schema_table->getHTML());
     if ($this->objectSupportsEctsGrades() && $this->object->canEditEctsGrades()) {
         if (!$ects_form instanceof ilPropertyFormGUI) {
             $ects_form = $this->getEctsForm();
             $this->populateEctsForm($ects_form);
         }
         $content_parts[] = $ects_form->getHTML();
     }
     $this->tpl->setContent(implode('<br />', $content_parts));
 }
 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);
 }
 /**
  * @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'));
 }
 public function __construct(ilCtrl $ctrl, ilLanguage $lng, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
 {
     $this->ctrl = $ctrl;
     $this->lng = $lng;
     $this->questionSetConfigGUI = $questionSetConfigGUI;
     $this->questionSetConfig = $questionSetConfig;
     parent::__construct();
 }
 public function __construct(ilCtrl $ctrl, ilLanguage $lng, $parentGUI, $parentCMD)
 {
     $this->ctrl = $ctrl;
     $this->lng = $lng;
     $this->parentGUI = $parentGUI;
     $this->parentCMD = $parentCMD;
     parent::__construct();
 }
Пример #13
0
 /**
  * Display all types in a table with actions to edit/delete
  */
 protected function listTypes()
 {
     $button = ilLinkButton::getInstance();
     $button->setCaption('orgu_type_add');
     $button->setUrl($this->ctrl->getLinkTarget($this, 'add'));
     $this->toolbar->addButtonInstance($button);
     $table = new ilOrgUnitTypeTableGUI($this, 'listTypes');
     $this->tpl->setContent($table->getHTML());
 }
 /**
  * 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());
 }
 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'));
         }
     }
 }
Пример #16
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"));
     }
 }
 /**
  * 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());
 }
 /**
  * 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();
     }
 }
 public function appendToolbarSwitch(ilToolbarGUI $toolbar, $a_obj_type, $a_ref_id)
 {
     include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
     $tpls = ilDidacticTemplateSettings::getInstanceByObjectType($a_obj_type)->getTemplates();
     if (!count($tpls)) {
         return false;
     }
     // Add template switch
     $toolbar->addText($this->lng->txt('didactic_selected_tpl_option'));
     // Show template options
     $options = array(0 => $this->lng->txt('didactic_default_type'));
     foreach ($tpls as $tpl) {
         $options[$tpl->getId()] = $tpl->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
     $tpl_selection = new ilSelectInputGUI('', 'tplid');
     $tpl_selection->setOptions($options);
     $tpl_selection->setValue(ilDidacticTemplateObjSettings::lookupTemplateId($this->getParentObject()->object->getRefId()));
     $toolbar->addInputItem($tpl_selection);
     // Apply templates switch
     $toolbar->addFormButton($this->lng->txt('change'), 'confirmTemplateSwitch');
     return true;
 }
 /**
  * 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));
 }
Пример #21
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"));
     }
 }
Пример #22
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;
 }
 /**
  *
  */
 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());
 }
 /**
  * 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());
 }
 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();
     */
 }
 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());
 }
Пример #27
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();
     }
 }
 /**
  * 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());
 }
 /**
  * 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() . "&nbsp;");
             }
             break;
         }
     }
 }
Пример #30
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());
 }