コード例 #1
0
 /**
  * Contructor
  *
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     $this->type = 'ps';
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng->loadLanguageModule('ps');
     ilObjPrivacySecurityGUI::$ERROR_MESSAGE = array(ilSecuritySettings::$SECURITY_SETTINGS_ERR_CODE_AUTO_HTTPS => $this->lng->txt("ps_error_message_https_header_missing"), ilSecuritySettings::$SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE => $this->lng->txt('https_not_possible'), ilSecuritySettings::$SECURITY_SETTINGS_ERR_CODE_HTTP_NOT_AVAILABLE => $this->lng->txt('http_not_possible'), ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH => $this->lng->txt('ps_error_message_invalid_password_min_length'), ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH => $this->lng->txt('ps_error_message_invalid_password_max_length'), ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE => $this->lng->txt('ps_error_message_invalid_password_max_age'), ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS => $this->lng->txt('ps_error_message_invalid_login_max_attempts'), ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2 => $this->lng->txt('ps_error_message_password_min2_because_chars_numbers'), ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3 => $this->lng->txt('ps_error_message_password_min3_because_chars_numbers_sc'), ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MAX_LENGTH_LESS_MIN_LENGTH => $this->lng->txt('ps_error_message_password_max_less_min'));
 }
コード例 #2
0
 /**
  * Builds tabs and subtabs using given $tabs, $config and $command
  * parameters.
  * @param ilTabsGUI $tabs
  * @param array     $config
  * @param array     $command
  */
 private function buildTabs(ilTabsGUI $tabs, $config, $command)
 {
     /**
      * @var $rbacsystem ilRbacSystem
      */
     global $rbacsystem;
     require_once 'Modules/Chatroom/classes/class.ilChatroom.php';
     foreach ($config as $id => $tabDefinition) {
         if (!ilChatroom::checkUserPermissions($tabDefinition['permission'], $this->gui->getRefId(), false)) {
             continue;
         } else {
             if (isset($tabDefinition['enabled']) && !$tabDefinition['enabled']) {
                 continue;
             }
         }
         $tabs->addTab($id, $this->getLabel($tabDefinition, $id), $tabDefinition['link']);
         if ($command[0] == $id && isset($tabDefinition['subtabs']) && is_array($tabDefinition['subtabs'])) {
             foreach ($tabDefinition['subtabs'] as $subid => $subTabDefinition) {
                 if (!$rbacsystem->checkAccess($subTabDefinition['permission'], $this->gui->getRefId())) {
                     continue;
                 } else {
                     if (isset($subTabDefinition['enabled']) && !$subTabDefinition['enabled']) {
                         continue;
                     }
                 }
                 $tabs->addSubTab($subid, $this->getLabel($subTabDefinition, $subid), $subTabDefinition['link']);
             }
         }
     }
 }
コード例 #3
0
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->type = 'reps';
     $this->lng->loadLanguageModule('rep');
     $this->lng->loadLanguageModule('cmps');
 }
コード例 #4
0
 /**
  * Contructor
  *
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     global $lng;
     $this->type = 'pdts';
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $lng->loadLanguageModule("pd");
 }
コード例 #5
0
 /**
  * Contructor
  *
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     $this->type = 'mcts';
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng->loadLanguageModule('mcst');
     $this->initMediaCastSettings();
 }
コード例 #6
0
 /**
  * @param      $a_data
  * @param      $a_id
  * @param bool $a_call_by_reference
  * @param bool $a_prepare_output
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     $this->type = 'bibs';
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng->loadLanguageModule('bibl');
     //Check Permissions globally for all SubGUIs. We only check write permissions
     $this->checkPermission('write');
 }
コード例 #7
0
 /**
  * Constructor
  *
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     global $lng;
     $this->type = 'cals';
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng = $lng;
     $this->lng->loadLanguageModule('dateplaner');
     $this->lng->loadLanguageModule('jscalendar');
 }
コード例 #8
0
 function ilObjMediaObjectGUI($a_data, $a_id = 0, $a_call_by_reference = false, $a_prepare_output = false)
 {
     global $lng, $ilCtrl;
     $this->ctrl =& $ilCtrl;
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng =& $lng;
     $this->back_title = "";
     $this->type = "mob";
 }
コード例 #9
0
 /**
  * save object
  * @access	public
  */
 public function saveObject()
 {
     global $rbacadmin;
     // create and insert forum in objecttree
     $newObj = parent::saveObject();
     // put here object specific stuff
     // always send a message
     ilUtil::sendSuccess($this->lng->txt("object_added"), true);
     $this->ctrl->redirect($this);
 }
コード例 #10
0
 /**
  * Contructor
  *
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     global $ilCtrl;
     $this->type = 'skmg';
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng->loadLanguageModule('skmg');
     include_once "./Services/Skill/classes/class.ilSkillTree.php";
     $this->skill_tree = new ilSkillTree();
     $ilCtrl->saveParameter($this, "obj_id");
 }
コード例 #11
0
 /**
  * Save object
  */
 function saveObject()
 {
     global $rbacadmin;
     // create and insert forum in objecttree
     $newObj = parent::saveObject();
     // put here object specific stuff
     // always send a message
     ilUtil::sendInfo($this->lng->txt("object_added"), true);
     ilUtil::redirect($this->getReturnLocation("save", $this->ctrl->getLinkTarget($this, "", "", false, false)));
 }
コード例 #12
0
 /**
  * save object
  * @access	public
  */
 function saveObject()
 {
     global $rbacadmin;
     // create and insert forum in objecttree
     $newObj = parent::saveObject();
     // put here object specific stuff
     // always send a message
     ilUtil::sendSuccess($this->lng->txt("object_added"), true);
     $this->ctrl->redirect($this);
     //header("Location:".$this->getReturnLocation("save","adm_object.php?".$this->link_params));
     //exit();
 }
コード例 #13
0
 /**
  * Goto item group
  */
 function _goto($a_target)
 {
     global $ilAccess, $ilErr, $lng, $tree;
     $targets = explode('_', $a_target);
     $ref_id = $targets[0];
     $par_id = $tree->getParentId($ref_id);
     if ($ilAccess->checkAccess("read", "", $par_id)) {
         include_once "./Services/Link/classes/class.ilLink.php";
         ilUtil::redirect(ilLink::_getLink($par_id));
         exit;
     } else {
         if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
             ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
             ilObjectGUI::_gotoRepositoryRoot();
         }
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
 }
コード例 #14
0
 /**
  * redirect script
  *
  * @param	string		$a_target
  */
 public static function _goto($a_target, $a_access_code = "")
 {
     global $ilAccess, $ilErr, $lng;
     // see ilObjSurveyAccess::_checkGoto()
     include_once "./Services/Utilities/classes/class.ilUtil.php";
     if (strlen($a_access_code)) {
         $_SESSION["anonymous_id"][ilObject::_lookupObjId($a_target)] = $a_access_code;
         $_GET["baseClass"] = "ilObjSurveyGUI";
         $_GET["cmd"] = "infoScreen";
         $_GET["ref_id"] = $a_target;
         include "ilias.php";
         exit;
     }
     if ($ilAccess->checkAccess("read", "", $a_target)) {
         $_GET["baseClass"] = "ilObjSurveyGUI";
         $_GET["cmd"] = "infoScreen";
         $_GET["ref_id"] = $a_target;
         include "ilias.php";
         exit;
     } else {
         if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
             ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
             ilObjectGUI::_gotoRepositoryRoot();
         }
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
 }
コード例 #15
0
 /**
  * Perform delete
  */
 public function performDelete()
 {
     $this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
     include_once './Services/Object/classes/class.ilObjectGUI.php';
     $_SESSION['saved_post'] = $_POST['id'];
     $object = new ilObjectGUI(array(), 0, false, false);
     $object->confirmedDeleteObject();
     return true;
 }
コード例 #16
0
 /**
  * called by prepare output
  */
 function setTitleAndDescription()
 {
     parent::setTitleAndDescription();
     $this->tpl->setDescription($this->object->getDescription());
 }
コード例 #17
0
 /**
  * Redirect script to call a test with the question pool reference id
  * 
  * Redirect script to call a test with the question pool reference id
  *
  * @param integer $a_target The reference id of the question pool
  * @access	public
  */
 public static function _goto($a_target)
 {
     global $ilAccess, $ilErr, $lng;
     if ($ilAccess->checkAccess("write", "", $a_target)) {
         $_GET["baseClass"] = "ilObjQuestionPoolGUI";
         $_GET["cmd"] = "questions";
         $_GET["ref_id"] = $a_target;
         include_once "ilias.php";
         exit;
     } else {
         if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
             ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
             ilObjectGUI::_gotoRepositoryRoot();
         }
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
 }
コード例 #18
0
 /**
  * Import file
  *
  * @param
  * @return
  */
 function importFileObject($parent_id = null)
 {
     try {
         return parent::importFileObject();
     } catch (ilManifestFileNotFoundImportException $e) {
         // since there is no manifest xml we assume that this is an HTML export file
         $this->createFromDirectory($e->getTmpDir());
     }
 }
コード例 #19
0
 /**
  * goto target group
  */
 function _goto($a_user)
 {
     global $ilAccess, $ilErr, $lng;
     $a_target = USER_FOLDER_ID;
     if ($ilAccess->checkAccess("read", "", $a_target)) {
         ilUtil::redirect("ilias.php?baseClass=ilAdministrationGUI&ref_id=" . $a_target . "&jmpToUser="******"read", "", ROOT_FOLDER_ID)) {
             ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
             ilObjectGUI::_gotoRepositoryRoot();
         }
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
 }
コード例 #20
0
 /**
  * goto target group
  */
 public static function _goto($a_target)
 {
     global $ilAccess, $ilErr, $lng;
     if ($ilAccess->checkAccess("read", "", $a_target)) {
         ilObjectGUI::_gotoRepositoryNode($a_target);
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
 }
コード例 #21
0
 /**
  * Set the locator for admin mode
  *(Overwritten from ilObjectGUI, called by prepareOutput)
  */
 function addAdminLocatorItems()
 {
     global $ilLocator;
     if (!ilObjLanguageAccess::_isPageTranslation()) {
         parent::addAdminLocatorItems(true);
         // #13881
         $ilLocator->addItem($this->lng->txt("languages"), $this->ctrl->getLinkTargetByClass("ilobjlanguagefoldergui", ""));
         $ilLocator->addItem($this->lng->txt("meta_l_" . $this->object->getTitle()), $this->ctrl->getLinkTarget($this, "view"));
     }
 }
コード例 #22
0
 /**
  * Contructor
  *
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     $this->type = "blga";
     parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng->loadLanguageModule("blog");
 }
コード例 #23
0
 /**
  * redirect script
  *
  * @param	string		$a_target
  */
 function _goto($a_target, $a_target_ref_id = "")
 {
     global $rbacsystem, $ilErr, $lng, $ilAccess;
     // determine learning object
     $lm_id = ilLMObject::_lookupContObjID($a_target);
     // get all references
     $ref_ids = ilObject::_getAllReferences($lm_id);
     // always try passed ref id first
     if (in_array($a_target_ref_id, $ref_ids)) {
         $ref_ids = array_merge(array($a_target_ref_id), $ref_ids);
     }
     // check read permissions
     foreach ($ref_ids as $ref_id) {
         // Permission check
         if ($ilAccess->checkAccess("read", "", $ref_id)) {
             // don't redirect anymore, just set parameters
             // (goto.php includes  "ilias.php")
             $_GET["baseClass"] = "ilLMPresentationGUI";
             $_GET["obj_id"] = $a_target;
             $_GET["ref_id"] = $ref_id;
             include_once "ilias.php";
             exit;
         }
     }
     if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
         ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle($lm_id)), true);
         include_once "./Services/Object/classes/class.ilObjectGUI.php";
         ilObjectGUI::_gotoRepositoryRoot();
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
 }
コード例 #24
0
 /**
  * should be overwritten to add object specific items
  * (repository items are preloaded)
  */
 function addAdminLocatorItems()
 {
     global $ilLocator;
     if ($_GET["admin_mode"] == "settings") {
         parent::addAdminLocatorItems(true);
         $ilLocator->addItem(ilObject::_lookupTitle(ilObject::_lookupObjId($_GET["ref_id"])), $this->ctrl->getLinkTargetByClass("ilobjstylesettingsgui", "view"));
         if ($_GET["obj_id"] > 0) {
             $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "edit"));
         }
     } else {
         //?
     }
 }
コード例 #25
0
 /**
  * Contructor
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
 {
     $this->type = 'frma';
     parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
     $this->lng->loadLanguageModule('forum');
 }
コード例 #26
0
 /**
  * Prepare the standard template for output
  * (Overwritten from ilObjectGUI)
  */
 function prepareOutput()
 {
     if ($this->_isPageTranslation()) {
         // show the pure translation page without menu, tabs etc.
         $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_translate.html", "Services/Language");
         $this->tpl->setHeaderPageTitle($this->lng->txt("translation"));
         $this->tpl->setTitle($this->lng->txt("translation") . " " . $this->lng->txt("meta_l_" . $this->object->key));
         $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lng_b.png"), $this->lng->txt("obj_" . $this->object->getType()));
     } else {
         // show the full page framework
         parent::prepareOutput();
     }
 }
コード例 #27
0
 /**
  * redirect script
  *
  * @param	string		$a_target
  */
 function _goto($a_target)
 {
     global $ilAccess, $ilErr, $lng;
     if ($ilAccess->checkAccess("read", "", $a_target)) {
         $_GET["baseClass"] = "ilLMPresentationGUI";
         $_GET["ref_id"] = $a_target;
         include "ilias.php";
         exit;
     } else {
         if ($ilAccess->checkAccess("visible", "", $a_target)) {
             $_GET["baseClass"] = "ilLMPresentationGUI";
             $_GET["ref_id"] = $a_target;
             $_GET["cmd"] = "infoScreen";
             include "ilias.php";
             exit;
         } else {
             if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
                 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
                 ilObjectGUI::_gotoRepositoryRoot();
             }
         }
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
 }
コード例 #28
0
 /**
  * goto target course
  */
 function _goto($a_target)
 {
     global $ilAccess, $ilErr, $lng;
     $parts = explode("_", $a_target);
     if ($ilAccess->checkAccess("write", "", $parts[0])) {
         $_GET["cmd"] = "";
         $_GET["baseClass"] = "ilSAHSEditGUI";
         $_GET["ref_id"] = $parts[0];
         $_GET["obj_id"] = $parts[1];
         include "ilias.php";
         exit;
     }
     if ($ilAccess->checkAccess("visible", "", $parts[0])) {
         $_GET["cmd"] = "infoScreen";
         $_GET["baseClass"] = "ilSAHSPresentationGUI";
         $_GET["ref_id"] = $parts[0];
         include "ilias.php";
         exit;
     } else {
         if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
             ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle(ilObject::_lookupObjId($parts[0]))), true);
             ilObjectGUI::_gotoRepositoryRoot();
         }
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
 }
コード例 #29
0
 /**
  * redirect script
  *
  * @param	string		$a_target
  */
 public static function _goto($a_target, $a_raw)
 {
     global $ilErr, $lng, $ilAccess;
     $ass_id = null;
     $parts = explode("_", $a_raw);
     if (sizeof($parts) == 2) {
         $ass_id = (int) $parts[1];
     }
     if ($ilAccess->checkAccess("read", "", $a_target)) {
         if ($ass_id) {
             $_GET["ass_id_goto"] = $ass_id;
         }
         $_GET["ref_id"] = $a_target;
         $_GET["cmd"] = "showOverview";
         $_GET["baseClass"] = "ilExerciseHandlerGUI";
         include "ilias.php";
         exit;
     } else {
         if ($ilAccess->checkAccess("visible", "", $a_target)) {
             $_GET["ref_id"] = $a_target;
             $_GET["cmd"] = "infoScreen";
             $_GET["baseClass"] = "ilExerciseHandlerGUI";
             include "ilias.php";
             exit;
         } else {
             if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
                 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"), ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
                 ilObjectGUI::_gotoRepositoryRoot();
             }
         }
     }
     $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
 }
コード例 #30
0
 /**
  * Constructor
  * @access public
  */
 public function __construct($a_data, $a_id, $a_call_by_reference)
 {
     $this->type = 'mail';
     parent::__construct($a_data, $a_id, $a_call_by_reference, false);
     $this->lng->loadLanguageModule('mail');
 }