当前位置: 首页>>代码示例>>PHP>>正文


PHP ilObject::_lookupObjId方法代码示例

本文整理汇总了PHP中ilObject::_lookupObjId方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObject::_lookupObjId方法的具体用法?PHP ilObject::_lookupObjId怎么用?PHP ilObject::_lookupObjId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilObject的用法示例。


在下文中一共展示了ilObject::_lookupObjId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkAccess

 /**
  * check access to learning progress
  * 
  * @param int $a_ref_id reference ifd of object
  * @param bool $a_allow_only_read read access is sufficient (see courses/groups)
  * @return
  * @static
  */
 public static function checkAccess($a_ref_id, $a_allow_only_read = true)
 {
     global $ilUser, $ilAccess;
     if ($ilUser->getId() == ANONYMOUS_USER_ID) {
         return false;
     }
     include_once "Services/Tracking/classes/class.ilObjUserTracking.php";
     if (!ilObjUserTracking::_enabledLearningProgress()) {
         return false;
     }
     if ($ilAccess->checkAccess('edit_learning_progress', '', $a_ref_id)) {
         return true;
     }
     if (!ilObjUserTracking::_hasLearningProgressLearner()) {
         return false;
     }
     include_once './Services/Tracking/classes/class.ilLPObjSettings.php';
     if (ilLPObjSettings::_lookupMode(ilObject::_lookupObjId($a_ref_id)) == LP_MODE_DEACTIVATED) {
         return false;
     }
     if (!$ilAccess->checkAccess('read', '', $a_ref_id)) {
         return false;
     }
     if ($a_allow_only_read) {
         return true;
     }
     return false;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:36,代码来源:class.ilLearningProgressAccess.php

示例2: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng;
     $this->tpl->setVariable("REF_ID", $a_set["ref_id"]);
     $this->tpl->setVariable("SUBSTYLE", $a_set["substyle"]);
     $this->tpl->setVariable("CATEGORY", ilObject::_lookupTitle(ilObject::_lookupObjId($a_set["ref_id"])));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilSysStyleCatAssignmentTableGUI.php

示例3: checkAccess

 /**
  * check access to learning progress
  * 
  * @param int $a_ref_id reference ifd of object
  * @param bool $a_allow_only_read read access is sufficient (see courses/groups)
  * @return
  * @static
  */
 public static function checkAccess($a_ref_id, $a_allow_only_read = true)
 {
     global $ilUser, $ilAccess;
     if ($ilUser->getId() == ANONYMOUS_USER_ID) {
         return false;
     }
     include_once "Services/Tracking/classes/class.ilObjUserTracking.php";
     if (!ilObjUserTracking::_enabledLearningProgress()) {
         return false;
     }
     if ($ilAccess->checkAccess('edit_learning_progress', '', $a_ref_id)) {
         return true;
     }
     if (!ilObjUserTracking::_hasLearningProgressLearner()) {
         return false;
     }
     include_once './Services/Object/classes/class.ilObjectLP.php';
     $olp = ilObjectLP::getInstance(ilObject::_lookupObjId($a_ref_id));
     if (!$olp->isActive()) {
         return false;
     }
     if (!$ilAccess->checkAccess('read', '', $a_ref_id)) {
         return false;
     }
     if ($a_allow_only_read) {
         return true;
     }
     return false;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:37,代码来源:class.ilLearningProgressAccess.php

示例4: getHTML

 /**
  * Get HTML for navigation history
  */
 function getHTML()
 {
     global $ilNavigationHistory, $lng;
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $selection = new ilAdvancedSelectionListGUI();
     $selection->setFormSelectMode("url_ref_id", "ilNavHistorySelect", true, "goto.php?target=navi_request", "ilNavHistory", "ilNavHistoryForm", "_top", $lng->txt("go"), "ilNavHistorySubmit");
     $selection->setListTitle($lng->txt("last_visited"));
     $selection->setId("lastvisited");
     $selection->setSelectionHeaderClass("MMInactive");
     $selection->setHeaderIcon(ilAdvancedSelectionListGUI::NO_ICON);
     $selection->setItemLinkClass("small");
     $selection->setUseImages(true);
     include_once "./Services/Accessibility/classes/class.ilAccessKey.php";
     $selection->setAccessKey(ilAccessKey::LAST_VISITED);
     $items = $ilNavigationHistory->getItems();
     //$sel_arr = array(0 => "-- ".$lng->txt("last_visited")." --");
     reset($items);
     $cnt = 0;
     foreach ($items as $k => $item) {
         if ($cnt++ > 20) {
             break;
         }
         if (!isset($item["ref_id"]) || !isset($_GET["ref_id"]) || $item["ref_id"] != $_GET["ref_id"] || $k > 0) {
             $obj_id = ilObject::_lookupObjId($item["ref_id"]);
             $selection->addItem($item["title"], $item["ref_id"], $item["link"], ilObject::_getIcon($obj_id, "tiny", $item["type"]), $lng->txt("obj_" . $item["type"]), "_top");
         }
     }
     $html = $selection->getHTML();
     if ($html == "") {
         $selection->addItem($lng->txt("no_items"), "", "#", "", "", "_top");
         $selection->setUseImages(false);
         $html = $selection->getHTML();
     }
     return $html;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:38,代码来源:class.ilNavigationHistoryGUI.php

示例5: showMemberViewSwitch

 /**
  * Show member view switch
  * @return 
  * @param int $a_ref_id
  */
 public static function showMemberViewSwitch($a_ref_id)
 {
     global $ilAccess, $ilCtrl;
     $settings = ilMemberViewSettings::getInstance();
     if (!$settings->isEnabled()) {
         return false;
     }
     global $tpl, $tree, $lng, $ilTabs;
     // No course or group in path => aborting
     if (!$tree->checkForParentType($a_ref_id, 'crs') and !$tree->checkForParentType($a_ref_id, 'grp')) {
         return false;
     }
     // TODO: check edit_permission
     $active = $settings->isActive();
     $type = ilObject::_lookupType(ilObject::_lookupObjId($a_ref_id));
     if (($type == 'crs' or $type == 'grp') and $ilAccess->checkAccess('write', '', $a_ref_id)) {
         $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_ref_id);
         $ilCtrl->setParameterByClass("ilrepositorygui", "mv", "1");
         $ilCtrl->setParameterByClass("ilrepositorygui", "set_mode", "flat");
         $ilTabs->addNonTabbedLink("members_view", $lng->txt('mem_view_activate'), $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"));
         $ilCtrl->clearParametersByClass("ilrepositorygui");
         return true;
     }
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilMemberViewGUI.php

示例6: __construct

 /**
  * Constructor
  *
  * @access public
  * @param
  * @return
  */
 public function __construct($a_parent_obj, $a_parent_cmd, $a_pool_ref_id)
 {
     global $lng, $ilCtrl;
     $this->setId("cont_qpl");
     $this->pool_ref_id = $a_pool_ref_id;
     $this->pool_obj_id = ilObject::_lookupObjId($a_pool_ref_id);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle(ilObject::_lookupTitle($this->pool_obj_id));
     //		$qplSetting = new ilSetting("qpl");
     $this->setFormName('sa_quest_browser');
     //		$this->addColumn('','f','1%');
     $this->addColumn($this->lng->txt("title"), 'title', '');
     $this->addColumn($this->lng->txt("cont_question_type"), 'ttype', '');
     $this->addColumn($this->lng->txt("actions"), '', '');
     //		$this->setPrefix('q_id');
     //		$this->setSelectAllCheckbox('q_id');
     $this->setRowTemplate("tpl.copy_sa_quest_row.html", "Services/COPage");
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
     $this->setDefaultOrderField("title");
     $this->setDefaultOrderDirection("asc");
     //			$this->setFilterCommand('filterQuestionBrowser');
     //			$this->setResetCommand('resetQuestionBrowser');
     $this->initFilter();
     $this->getQuestions();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilCopySelfAssQuestionTableGUI.php

示例7: putparam

    function putparam($ref_id, $obj_id, $version, $aicc_data)
    {
        //aiccdata is a non standard ini format
        //$data=parse_ini_file($tmpFilename, TRUE);
        $data = $this->parseAICCData($aicc_data);
        $hacp_id = ilObject::_lookupObjId($ref_id);
        //choose either insert or update to be able to inherit superclass
        global $ilDB, $ilUser, $ilLog;
        $this->update = array();
        $this->insert = array();
        if (is_object($ilUser)) {
            $user_id = $ilUser->getId();
            foreach ($data as $key => $value) {
                $set = $ilDB->queryF('
				SELECT * FROM scorm_tracking WHERE user_id = %s
				AND sco_id = %s
				AND lvalue = %s
				AND obj_id = %s', array('integer', 'integer', 'text', 'integer'), array($user_id, $obj_id, $key, $hacp_id));
                if ($rec = $ilDB->fetchAssoc($set)) {
                    $this->update[] = array("left" => $key, "right" => $value);
                } else {
                    $this->insert[] = array("left" => $key, "right" => $value);
                }
            }
        }
        //store
        $this->store($hacp_id, $obj_id, 0);
        $response = new ilHACPResponse($ref_id, $obj_id);
        $response->sendOk();
    }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilObjHACPTracking.php

示例8: getItems

 protected function getItems($a_content_obj, $a_group_obj)
 {
     global $ilUser, $tree;
     $counter = 0;
     $items = ilUtil::_getObjectsByOperations($this->type, 'write', $ilUser->getId(), -1);
     $items_obj_id = array();
     $items_ids = array();
     foreach ($items as $ref_id) {
         $obj_id = ilObject::_lookupObjId($ref_id);
         $items_ids[$obj_id] = $ref_id;
         $items_obj_id[] = $obj_id;
     }
     $items_obj_id = ilUtil::_sortIds($items_obj_id, 'object_data', 'title', 'obj_id');
     $assigned_ids = array();
     $assigned = $a_group_obj->getAssignedItems();
     if ($assigned) {
         foreach ($assigned as $item) {
             $assigned_ids[] = $item['target_ref_id'];
         }
     }
     $data = array();
     foreach ($items_obj_id as $obj_id) {
         $item_id = $items_ids[$obj_id];
         if ($tree->checkForParentType($item_id, 'adm')) {
             continue;
         }
         $obj_id = ilObject::_lookupObjId($item_id);
         $data[] = array('id' => $item_id, 'title' => ilObject::_lookupTitle($obj_id), 'description' => ilObject::_lookupDescription($obj_id), 'path' => $this->__formatPath($tree->getPathFull($item_id)), 'assigned' => in_array($item_id, $assigned_ids));
     }
     $this->setData($data);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:31,代码来源:class.ilCourseGroupingAssignmentTableGUI.php

示例9: __construct

 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_ref_id, $a_print_mode = false)
 {
     global $ilCtrl, $lng, $ilAccess, $lng;
     $this->setId("trsmy");
     $this->ref_id = $a_ref_id;
     $this->obj_id = ilObject::_lookupObjId($a_ref_id);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     if ($a_print_mode) {
         $this->setPrintMode(true);
     }
     $this->parseTitle($this->obj_id, "trac_summary");
     $this->setLimit(9999);
     $this->setShowTemplates(true);
     $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
     $this->addColumn($this->lng->txt("title"), "title");
     $this->setDefaultOrderField("title");
     $labels = $this->getSelectableColumns();
     foreach ($this->getSelectedColumns() as $c) {
         $this->addColumn($labels[$c]["txt"], $c);
     }
     if ($this->ref_id == ROOT_FOLDER_ID) {
         $this->addColumn($this->lng->txt("path"));
         $this->addColumn($this->lng->txt("action"));
     }
     $this->initFilter();
     // $this->setExternalSorting(true);
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
     $this->setRowTemplate("tpl.trac_summary_row.html", "Services/Tracking");
     $this->getItems($a_parent_obj->getObjId(), $a_ref_id);
     $this->anonymized = (bool) (!ilObjUserTracking::_enabledUserRelatedData());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:35,代码来源:class.ilTrSummaryTableGUI.php

示例10: __construct

 public function __construct($a_parent_obj, $a_parent_cmd, array &$a_data, $a_view, $a_by_location = false)
 {
     global $ilCtrl, $tree, $ilUser;
     $this->setId("pdmng");
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->addColumn('', '', '5%');
     $this->addColumn($this->lng->txt("type"), 'type_caption', '1%');
     $this->addColumn($this->lng->txt("title"), 'title', '44%');
     $this->addColumn($this->lng->txt("container"), 'container', '50%');
     $this->setDefaultOrderField("title");
     $this->setRowTemplate("tpl.pd_manage_row.html", "Services/PersonalDesktop");
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
     if ($a_view == ilPDSelectedItemsBlockGUI::VIEW_MY_OFFERS) {
         $this->setTitle($this->lng->txt("pd_my_offers"));
         $this->addMultiCommand('confirmRemove', $this->lng->txt('unsubscribe'));
     } else {
         $this->setTitle($this->lng->txt("pd_my_memberships"));
         $this->addMultiCommand('confirmRemove', $this->lng->txt('crs_unsubscribe'));
     }
     $this->addCommandButton("getHTML", $this->lng->txt("cancel"));
     // root node caption
     $root = $tree->getNodeData(ROOT_FOLDER_ID);
     $root = $root["title"];
     if ($root == "ILIAS") {
         $root = $this->lng->txt("repository");
     }
     foreach ($a_data as $idx => $item) {
         if (!$item["parent_ref"]) {
             unset($a_data[$idx]);
             continue;
         }
         if ($a_view == ilPDSelectedItemsBlockGUI::VIEW_MY_MEMBERSHIPS) {
             $a_data[$idx]["last_admin"] = false;
             switch ($item["type"]) {
                 case "crs":
                     // see ilObjCourseGUI:performUnsubscribeObject()
                     include_once "Modules/Course/classes/class.ilCourseParticipants.php";
                     $members = new ilCourseParticipants($item["obj_id"]);
                     break;
                 case "grp":
                     include_once "Modules/Group/classes/class.ilGroupParticipants.php";
                     $members = new ilGroupParticipants($item["obj_id"]);
                     break;
                 default:
                     // do nothing?
                     continue;
             }
             $a_data[$idx]["last_admin"] = $members->isLastAdmin($ilUser->getId());
         }
         $a_data[$idx]["type_caption"] = $this->lng->txt("obj_" . $item["type"]);
         // parent
         if ($tree->getRootId() != $item["parent_ref"]) {
             $a_data[$idx]["container"] = ilObject::_lookupTitle(ilObject::_lookupObjId($item["parent_ref"]));
         } else {
             $a_data[$idx]["container"] = $root;
         }
     }
     $this->setData($a_data);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:59,代码来源:class.ilPDSelectedItemsTableGUI.php

示例11: __construct

 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $ref_id)
 {
     global $ilCtrl, $lng, $tree;
     $this->setId("trsmtx_" . $ref_id);
     $this->ref_id = $ref_id;
     $this->obj_id = ilObject::_lookupObjId($ref_id);
     $this->in_group = $tree->checkForParentType($this->ref_id, "grp");
     if ($this->in_group) {
         $this->in_group = ilObject::_lookupObjId($this->in_group);
     } else {
         $this->in_course = $tree->checkForParentType($this->ref_id, "crs");
         if ($this->in_course) {
             $this->in_course = ilObject::_lookupObjId($this->in_course);
         }
     }
     // has to be before constructor to work
     $this->initFilter();
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setLimit(9999);
     $this->parseTitle($this->obj_id, "trac_matrix");
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
     $this->setRowTemplate("tpl.user_object_matrix_row.html", "Services/Tracking");
     $this->setDefaultOrderField("login");
     $this->setDefaultOrderDirection("asc");
     $this->setShowTemplates(true);
     $this->addColumn($this->lng->txt("login"), "login");
     $labels = $this->getSelectableColumns();
     $selected = $this->getSelectedColumns();
     foreach ($selected as $c) {
         $title = $labels[$c]["txt"];
         if (isset($labels[$c]["no_permission"]) && (bool) $labels[$c]["no_permission"]) {
             $title .= " (" . $lng->txt("status_no_permission") . ")";
         }
         $tooltip = "";
         if (isset($labels[$c]["icon"])) {
             $alt = $lng->txt($labels[$c]["type"]);
             $icon = '<img src="' . $labels[$c]["icon"] . '" alt="' . $alt . '" />';
             if (sizeof($selected) > 5) {
                 $tooltip = $title;
                 $title = $icon;
             } else {
                 $title = $icon . ' ' . $title;
             }
         }
         if (isset($labels[$c]["id"])) {
             $sort_id = $labels[$c]["id"];
         } else {
             // list cannot be sorted by udf fields (separate query)
             $sort_id = substr($c, 0, 4) == "udf_" ? "" : $c;
         }
         $this->addColumn($title, $sort_id, "", false, "", $tooltip);
     }
     $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:58,代码来源:class.ilTrMatrixTableGUI.php

示例12: __construct

 public function __construct()
 {
     global $lng;
     parent::__construct();
     $this->parent_ref_id = (int) $_GET["ref_id"];
     $this->parent_obj_id = ilObject::_lookupObjId($this->parent_ref_id);
     $this->parent_obj_type = ilObject::_lookupType($this->parent_obj_id);
     $lng->loadLanguageModule("classification");
     $this->setTitle($lng->txt("clsfct_block_title"));
     $this->setFooterInfo($lng->txt("clsfct_block_info"));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilClassificationBlockGUI.php

示例13: verifyObject

 protected function verifyObject($a_ref_id)
 {
     global $ilAccess;
     $this->ref_id = $a_ref_id;
     $this->obj_id = ilObject::_lookupObjId($this->ref_id);
     if (ilObject::_lookupType($this->obj_id) != "xxco") {
         $this->sendError("Wrong object given!");
     }
     if (!$ilAccess->checkAccessOfUser($this->user_id, 'read', '', $this->ref_id)) {
         $this->sendError("No access!");
     }
 }
开发者ID:ilifau,项目名称:ExternalContent,代码行数:12,代码来源:class.ilExternalContentLog.php

示例14: __construct

 /**
  * 
  * @param
  * @return
  */
 public function __construct($a_auth_ref_id)
 {
     global $lng, $ilCtrl, $tpl, $ilTabs, $ilias;
     $this->ctrl = $ilCtrl;
     $this->tabs_gui = $ilTabs;
     $this->lng = $lng;
     $this->lng->loadLanguageModule('shib');
     $this->ilias = $ilias;
     $this->tpl = $tpl;
     $this->ref_id = $a_auth_ref_id;
     $this->obj_id = ilObject::_lookupObjId($this->ref_id);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:17,代码来源:class.ilAuthShibbolethSettingsGUI.php

示例15: getLinkHTML

 public function getLinkHTML($link_name = NULL)
 {
     $value = $this->getValue();
     $link = ilLink::_getStaticLink($value);
     $id = ilObject::_lookupObjId($value);
     if ($link_name) {
         $html = "<a href='" . $link . "'>" . $link_name . "</a>";
     } else {
         $html = "<a href='" . $link . "'>" . ilObject::_lookupTitle($id) . "</a>";
     }
     return $html;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:12,代码来源:class.ilDataCollectionILIASRefField.php


注:本文中的ilObject::_lookupObjId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。