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


PHP ilObject::_lookupObjectId方法代码示例

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


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

示例1: handleCode

 /**
  * Handle target parameter
  * @param object $a_target
  * @return 
  */
 public static function handleCode($a_ref_id, $a_type, $a_code)
 {
     global $lng, $tree, $ilUser;
     include_once './Services/Link/classes/class.ilLink.php';
     $lng->loadLanguageModule($a_type);
     try {
         self::useCode($a_code, $a_ref_id);
         $title = ilObject::_lookupTitle(ilObject::_lookupObjectId($a_ref_id));
         ilUtil::sendSuccess(sprintf($lng->txt($a_type . "_admission_link_success_registration"), $title), true);
         ilUtil::redirect(ilLink::_getLink($a_ref_id));
     } catch (ilMembershipRegistrationException $e) {
         switch ($e->getCode()) {
             case 124:
                 //added to waiting list
                 ilUtil::sendSuccess($e->getMessage(), true);
                 break;
             case 123:
                 //object is full
                 ilUtil::sendFailure($lng->txt($a_type . "_admission_link_failure_membership_limited"), true);
                 break;
             case 789:
                 //out of registration period
                 ilUtil::sendFailure($lng->txt($a_type . "_admission_link_failure_registration_period"), true);
                 break;
             default:
                 ilUtil::sendFailure($e->getMessage(), true);
                 break;
         }
         $GLOBALS['ilLog']->logStack();
         $GLOBALS['ilLog']->write($e->getCode() . ': ' . $e->getMessage());
         $parent_id = $tree->getParentId($a_ref_id);
         ilUtil::redirect(ilLink::_getLink($parent_id));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilMembershipRegistrationCodeUtils.php

示例2: __construct

 function __construct()
 {
     global $ilias, $tpl, $ilCtrl, $ilUser, $lng;
     //erase next?
     if ($_REQUEST['learnerId']) {
         $this->userId = $_REQUEST['learnerId'];
     } else {
         $this->userId = $GLOBALS['USER']['usr_id'];
     }
     $this->packageId = (int) $_REQUEST['packageId'];
     $this->jsMode = strpos($_SERVER['HTTP_ACCEPT'], 'text/javascript') !== false;
     $this->page = $_REQUEST['page'];
     $this->slm =& new ilObjSCORM2004LearningModule($_GET["ref_id"], true);
     $this->ilias =& $ilias;
     $this->tpl =& $tpl;
     $this->ctrl =& $ilCtrl;
     $this->packageId = ilObject::_lookupObjectId($_GET['ref_id']);
     $this->ref_id = $_GET['ref_id'];
     $this->userId = $ilUser->getID();
     if ($_GET['envEditor'] != null) {
         $this->envEditor = $_GET['envEditor'];
     } else {
         $this->envEditor = 0;
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:25,代码来源:ilSCORM13Player.php

示例3: __construct

 /**
  * Constructor
  *
  * @param	int		$a_id		Object ID
  * @access	public
  */
 function __construct()
 {
     global $ilias;
     $this->ilias =& $ilias;
     $this->id = $_GET['ref_id'];
     $this->obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
     include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
     $this->type = ilObjSAHSLearningModule::_lookupSubType($this->obj_id);
     $this->read();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilSCORMOfflineMode.php

示例4: getPossibleItems

 public function getPossibleItems($a_ref_id)
 {
     if (!isset(self::$possible_items[$a_ref_id])) {
         $obj_id = ilObject::_lookupObjectId($a_ref_id);
         $items = array();
         // only top-level chapters
         include_once "Services/MetaData/classes/class.ilMDEducational.php";
         $tree = new ilTree($obj_id);
         $tree->setTableNames('lm_tree', 'lm_data');
         $tree->setTreeTablePK("lm_id");
         foreach ($tree->getChilds($tree->readRootId()) as $child) {
             if ($child["type"] == "st") {
                 $child["tlt"] = ilMDEducational::_getTypicalLearningTimeSeconds($obj_id, $child["obj_id"]);
                 $items[$child["obj_id"]] = $child;
             }
         }
         self::$possible_items[$a_ref_id] = $items;
     }
     return self::$possible_items[$a_ref_id];
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:20,代码来源:class.ilLPCollectionOfLMChapters.php

示例5: ilSCORMOfflineMode

     $lng->loadLanguageModule("sop");
     $this->lng =& $lng;
     $this->ctrl =& $ilCtrl;
     $this->ctrl->saveParameter($this, "ref_id");
     $this->offlineMode = new ilSCORMOfflineMode();
     $this->online_icon = 'icon_slm_b.png';
     $this->offline_icon = 'icon_slm_b_offline.png';
     $this->icon = $this->online_icon;
 }
 function executeCommand()
 {
     global $tpl, $ilCtrl;
     $this->lmId = ilObject::_lookupObjectId($_GET["ref_id"]);
     $this->clientIdSop = $this->offlineMode->getClientIdSop();
     $cmd = $ilCtrl->getCmd();
     $this->setOfflineModeTabs($cmd);
     switch ($cmd) {
         case 'offlineMode_il2sopContent':
             ilUtil::deliverFile(ilUtil::getDataDir() . "/lm_data/lm_" . $this->lmId . ".zip", "lm_" . $this->lmId . ".zip");
             break;
         case 'offlineMode_il2sop':
             $this->offlineMode->il2sop();
             break;
         case 'offlineMode_il2sopStop':
             $this->offlineMode->setOfflineMode("online");
             $this->view($this->offlineMode->getOfflineMode(), "msg_export_failure");
             break;
         case 'offlineMode_il2sopOk':
             $this->offlineMode->setOfflineMode("offline");
             $this->view($this->offlineMode->getOfflineMode(), "msg_export_ok");
             break;
         case 'offlineMode_sop2il':
             $this->offlineMode->sop2il();
             break;
         case 'offlineMode_sop2ilStop':
             $this->offlineMode->setOfflineMode("offline");
             $this->view($this->offlineMode->getOfflineMode(), "msg_push_tracking_failure");
             break;
         case 'offlineMode_sop2ilOk':
             $this->offlineMode->setOfflineMode("online");
             $this->view($this->offlineMode->getOfflineMode(), "msg_push_tracking_ok");
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:41,代码来源:class.ilSCORMOfflineModeGUI.php

示例6: initParticipantsObject

 /**
  * 
  */
 private function initParticipantsObject()
 {
     if ($this->getRefId() > 0) {
         global $tree;
         $this->pluginObj->includeClass('class.ilAdobeConnectContainerParticipants.php');
         $parent_ref = $tree->checkForParentType($this->getRefId(), 'grp');
         if (!$parent_ref) {
             $parent_ref = $tree->checkForParentType($this->getRefId(), 'crs');
         }
         $object_id = ilObject::_lookupObjectId($parent_ref);
         $this->participants = ilAdobeConnectContainerParticipants::getInstanceByObjId($object_id);
     }
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:16,代码来源:class.ilObjAdobeConnect.php

示例7: __construct

 /**
  * Constructor
  *
  * @param int $a_id
  * @param int $a_id_type
  * @param int $a_parent_node_id
  */
 function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 {
     global $objDefinition, $tpl, $ilCtrl, $ilErr, $lng, $ilTabs, $tree, $ilAccess;
     if (!isset($ilErr)) {
         $ilErr = new ilErrorHandling();
         $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr, 'errorHandler'));
     } else {
         $this->ilErr =& $ilErr;
     }
     $this->id_type = $a_id_type;
     $this->parent_id = $a_parent_node_id;
     $this->type = $this->getType();
     $this->html = "";
     // use globals instead?
     $this->tabs_gui = $ilTabs;
     $this->objDefinition = $objDefinition;
     $this->tpl = $tpl;
     $this->ctrl = $ilCtrl;
     $this->lng = $lng;
     $params = array();
     switch ($this->id_type) {
         case self::REPOSITORY_NODE_ID:
             $this->node_id = $a_id;
             $this->object_id = ilObject::_lookupObjectId($this->node_id);
             $this->tree = $tree;
             $this->access_handler = $ilAccess;
             $this->call_by_reference = true;
             // needed for prepareOutput()
             $params[] = "ref_id";
             break;
         case self::REPOSITORY_OBJECT_ID:
             $this->object_id = $a_id;
             $this->tree = $tree;
             $this->access_handler = $ilAccess;
             $params[] = "obj_id";
             // ???
             break;
         case self::WORKSPACE_NODE_ID:
             global $ilUser;
             $this->node_id = $a_id;
             include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
             $this->tree = new ilWorkspaceTree($ilUser->getId());
             $this->object_id = $this->tree->lookupObjectId($this->node_id);
             include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
             $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
             $params[] = "wsp_id";
             break;
         case self::WORKSPACE_OBJECT_ID:
             global $ilUser;
             $this->object_id = $a_id;
             include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
             $this->tree = new ilWorkspaceTree($ilUser->getId());
             include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
             $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
             $params[] = "obj_id";
             // ???
             break;
         case self::PORTFOLIO_OBJECT_ID:
             $this->object_id = $a_id;
             include_once './Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php';
             $this->access_handler = new ilPortfolioAccessHandler();
             $params[] = "prt_id";
             break;
         case self::OBJECT_ID:
             $this->object_id = $a_id;
             include_once "Services/Object/classes/class.ilDummyAccessHandler.php";
             $this->access_handler = new ilDummyAccessHandler();
             $params[] = "obj_id";
             break;
     }
     $this->ctrl->saveParameter($this, $params);
     // old stuff for legacy code (obsolete?)
     if (!$this->object_id) {
         $this->creation_mode = true;
     }
     if ($this->node_id) {
         // add parent node id if missing
         if (!$this->parent_id && $this->tree) {
             $this->parent_id = $this->tree->getParentId($this->node_id);
         }
     }
     $this->ref_id = $this->node_id;
     $this->obj_id = $this->object_id;
     $this->assignObject();
     // set context
     if (is_object($this->object)) {
         $this->ctrl->setContext($this->object->getId(), $this->object->getType());
     }
     $this->afterConstructor();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:97,代码来源:class.ilObject2GUI.php

示例8: updateWebLink

 /**
  * update a weblink with id.
  *
  * @param string $session_id    current session
  * @param int $ref_id   refid id of weblink in repository
  * @param string $weblink_xml  xml description
  *
  * @return boolean true, if update successful, false otherwise
  */
 function updateWebLink($sid, $ref_id, $weblink_xml)
 {
     $this->initAuth($sid);
     $this->initIlias();
     if (!$this->__checkSession($sid)) {
         return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
     }
     global $rbacsystem, $tree, $ilLog;
     if (ilObject::_isInTrash($ref_id)) {
         return $this->__raiseError('Cannot perform update since weblink has been deleted.', 'CLIENT_OBJECT_DELETED');
     }
     // get obj_id
     if (!($obj_id = ilObject::_lookupObjectId($ref_id))) {
         return $this->__raiseError('No weblink found for id: ' . $ref_id, 'CLIENT_OBJECT_NOT_FOUND');
     }
     // Check access
     $permission_ok = false;
     foreach ($ref_ids = ilObject::_getAllReferences($obj_id) as $ref_id) {
         if ($rbacsystem->checkAccess('edit', $ref_id)) {
             $permission_ok = true;
             break;
         }
     }
     if (!$permission_ok) {
         return $this->__raiseError('No permission to edit the weblink with id: ' . $ref_id, 'Server');
     }
     $webl = ilObjectFactory::getInstanceByObjId($obj_id, false);
     if (!is_object($webl) or $webl->getType() != "webr") {
         return $this->__raiseError('Wrong obj id or type for weblink with id ' . $ref_id, 'Client');
     }
     try {
         include_once './Modules/WebResource/classes/class.ilWebLinkXmlParser.php';
         $parser = new ilWebLinkXmlParser($webl, $weblink_xml);
         $parser->setMode(ilWebLinkXmlParser::MODE_UPDATE);
         $parser->start();
     } catch (ilSaxParserException $e) {
         return $this->__raiseError($e->getMessage(), 'Client');
     } catch (ilWebLinkXMLParserException $e) {
         return $this->__raiseError($e->getMessage(), 'Client');
     }
     // Check if required
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:52,代码来源:class.ilSoapWebLinkAdministration.php

示例9: newModuleVersion

 /**
  * upload new version of module
  */
 function newModuleVersion()
 {
     $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
     $type = ilObjSAHSLearningModule::_lookupSubType($obj_id);
     // display import form
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.scorm_new_version_import.html", "Modules/ScormAicc");
     $this->tpl->setVariable("TYPE_IMG", ilUtil::getImagePath('icon_slm.png'));
     $this->tpl->setVariable("ALT_IMG", $this->lng->txt("obj_sahs"));
     $this->ctrl->setParameter($this, "new_type", "sahs");
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("BTN_NAME", "newModuleVersionUpload");
     $this->tpl->setVariable("TARGET", ' target="' . ilFrameTargetInfo::_getFrame("MainContent") . '" ');
     $this->tpl->setVariable("TXT_SELECT_LMTYPE", $this->lng->txt("type"));
     if ($type == "scorm2004") {
         $this->tpl->setVariable("TXT_TYPE", $this->lng->txt("lm_type_scorm2004"));
     } else {
         $this->tpl->setVariable("TXT_TYPE", $this->lng->txt("lm_type_scorm"));
     }
     include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
     if (ilUploadFiles::_getUploadDirectory()) {
         $files = ilUploadFiles::_getUploadFiles();
         foreach ($files as $file) {
             $file = htmlspecialchars($file, ENT_QUOTES, "utf-8");
             $this->tpl->setCurrentBlock("option_uploaded_file");
             $this->tpl->setVariable("UPLOADED_FILENAME", $file);
             $this->tpl->setVariable("TXT_UPLOADED_FILENAME", $file);
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("select_uploaded_file");
         $this->tpl->setVariable("TXT_SELECT_FROM_UPLOAD_DIR", $this->lng->txt("cont_select_from_upload_dir"));
         $this->tpl->setVariable("TXT_UPLOADED_FILE", $this->lng->txt("cont_uploaded_file"));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable("TXT_UPLOAD", $this->lng->txt("upload"));
     $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
     $this->tpl->setVariable("TXT_IMPORT_LM", $this->lng->txt("import_sahs"));
     $this->tpl->setVariable("TXT_SELECT_FILE", $this->lng->txt("select_file"));
     // gives out the limit as a little notice
     $this->tpl->setVariable("TXT_FILE_INFO", $this->lng->txt("file_notice") . " " . $this->getMaxFileSize());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:43,代码来源:class.ilObjSCORMLearningModuleGUI.php

示例10: addCrsGrpMembers

 /**
  * @param integer $ref_id ref_id of ilias ac-object
  * @param integer $sco_id
  * @param array   $member_ids
  */
 public function addCrsGrpMembers($ref_id, $sco_id, $member_ids = null)
 {
     global $tree;
     $parent_crs_ref = $tree->checkForParentType($ref_id, 'crs');
     $parent_grp_ref = $tree->checkForParentType($ref_id, 'grp');
     $type = null;
     $obj_id = 0;
     if ($parent_crs_ref && empty($parent_grp_ref)) {
         $obj_id = ilObject::_lookupObjectId($parent_crs_ref);
         include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
         $oParticipants = ilCourseParticipants::_getInstanceByObjId($obj_id);
         $type = 'crs';
     } else {
         if ($parent_grp_ref) {
             $obj_id = ilObject::_lookupObjectId($parent_grp_ref);
             include_once 'Modules/Group/classes/class.ilGroupParticipants.php';
             $oParticipants = ilGroupParticipants::_getInstanceByObjId($obj_id);
             $type = 'grp';
         }
     }
     if ($type == 'crs' || $type == 'grp') {
         $role_map = ilAdobeConnectServer::getRoleMap();
         $owner_id = ilObject::_lookupOwner(ilObject::_lookupObjectId($ref_id));
         /** @var $oParticipants  ilGroupParticipants | ilCourseParticipants */
         $admins = $oParticipants->getAdmins();
         $tutors = $oParticipants->getTutors();
         $members = $oParticipants->getMembers();
         if (is_array($member_ids) && count($member_ids) > 0) {
             $all_participants = $member_ids;
             $admins = array_uintersect($member_ids, $admins, 'strcmp');
             $tutors = array_uintersect($member_ids, $tutors, 'strcmp');
             $members = array_uintersect($member_ids, $members, 'strcmp');
         } else {
             $all_participants = array_unique(array_merge($admins, $tutors, $members));
         }
         $this->pluginObj->includeClass('class.ilAdobeConnectRoles.php');
         $xavcRoles = new ilAdobeConnectRoles($ref_id);
         if (ilAdobeConnectServer::getSetting('user_assignment_mode') != ilAdobeConnectServer::ASSIGN_USER_SWITCH) {
             foreach ($all_participants as $user_id) {
                 $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
                 //check if there is an adobe connect account at the ac-server
                 $ilAdobeConnectUser = new ilAdobeConnectUserUtil($user_id);
                 $ilAdobeConnectUser->ensureAccountExistance();
                 // add to desktop
                 if (ilAdobeConnectServer::getSetting('add_to_desktop') == 1) {
                     ilObjUser::_addDesktopItem($user_id, $ref_id, 'xavc');
                 }
             }
         }
         // receive breeze session
         $session = self::getSession();
         $this->pluginObj->includeClass('class.ilXAVCMembers.php');
         if ($session != NULL && $this->xmlApi->login($this->adminLogin, $this->adminPass, $session)) {
             foreach ($admins as $user_id) {
                 $xavcRoles->addAdministratorRole($user_id);
                 $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
                 // local member table
                 $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
                 $status = $role_map[$type . '_admin'];
                 $xavcMemberObj->setStatus($status);
                 $xavcMemberObj->setScoId($sco_id);
                 if ($is_member) {
                     $xavcMemberObj->updateXAVCMember();
                 } else {
                     $xavcMemberObj->insertXAVCMember();
                 }
                 $xavc_login = ilXAVCMembers::_lookupXAVCLogin($user_id);
                 if (!empty($xavc_login)) {
                     $this->xmlApi->updateMeetingParticipant($sco_id, $xavc_login, $session, $status);
                 }
             }
             foreach ($tutors as $user_id) {
                 if (($xavc_login = ilXAVCMembers::_lookupXAVCLogin($user_id)) != $this->adminLogin && $user_id != $owner_id) {
                     $xavcRoles->addAdministratorRole($user_id);
                     $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
                     // local member table
                     $xavcMemberObj = new ilXAVCMembers($ref_id, $user_id);
                     $status = $role_map[$type . '_tutor'];
                     $xavcMemberObj->setStatus($status);
                     $xavcMemberObj->setScoId($sco_id);
                     if ($is_member) {
                         $xavcMemberObj->updateXAVCMember();
                     } else {
                         $xavcMemberObj->insertXAVCMember();
                     }
                     if (!empty($xavc_login)) {
                         $this->xmlApi->updateMeetingParticipant($sco_id, $xavc_login, $session, $status);
                     }
                 }
             }
             foreach ($members as $user_id) {
                 if (($xavc_login = ilXAVCMembers::_lookupXAVCLogin($user_id)) != $this->adminLogin && $user_id != $owner_id) {
                     $xavcRoles->addMemberRole($user_id);
                     $is_member = ilXAVCMembers::_isMember($user_id, $ref_id);
                     // local member table
//.........这里部分代码省略.........
开发者ID:HochschuleLuzern,项目名称:ILIAS_AdobeConnectPlugin,代码行数:101,代码来源:class.ilObjAdobeConnect.php

示例11: details

 function details()
 {
     global $ilToolbar, $ilCtrl, $rbacsystem;
     // Show back button to crs if called from crs. Otherwise if called from personal desktop or administration
     // show back to list
     if ((int) $_GET['crs_id']) {
         $this->ctrl->setParameter($this, 'details_id', (int) $_GET['crs_id']);
         $ilToolbar->addButton($this->lng->txt('trac_view_crs'), $this->ctrl->getLinkTarget($this, 'details'));
     } elseif ($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP or $this->getMode() == self::LP_CONTEXT_ADMINISTRATION or $this->getMode() == self::LP_CONTEXT_USER_FOLDER) {
         $ilToolbar->addButton($this->lng->txt('trac_view_list'), $this->ctrl->getLinkTarget($this, 'show'));
     }
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_progress_container.html', 'Services/Tracking');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($ilCtrl->getFormAction($this));
     $this->__appendUserInfo($info, $this->tracked_user);
     $this->__appendLPDetails($info, $this->details_obj_id, $this->tracked_user->getId());
     $this->__showObjectDetails($info, $this->details_obj_id, false);
     // Finally set template variable
     $this->tpl->setVariable("LM_INFO", $info->getHTML());
     include_once './Services/Object/classes/class.ilObjectLP.php';
     $olp = ilObjectLP::getInstance($this->details_obj_id);
     $collection = $olp->getCollectionInstance();
     if ($collection) {
         $obj_ids = array();
         foreach ($collection->getItems() as $item_id) {
             if ($collection instanceof ilLPCollectionOfRepositoryObjects) {
                 $obj_ids[ilObject::_lookupObjectId($item_id)] = array($item_id);
             } else {
                 $obj_ids[] = $item_id;
             }
         }
     }
     // #15247
     if (sizeof($obj_ids)) {
         // seems obsolete
         $personal_only = !$rbacsystem->checkAccess('read_learning_progress', $this->getRefId());
         include_once "./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php";
         $lp_table = new ilLPProgressTableGUI($this, "details", $this->tracked_user, $obj_ids, true, $this->details_mode, $personal_only, $this->details_obj_id, $this->details_id);
         $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
     }
     $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:43,代码来源:class.ilLPListOfProgressGUI.php

示例12:

 static final function _lookupObjectId($a_ref_id)
 {
     return parent::_lookupObjectId($a_ref_id);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:4,代码来源:class.ilObject2.php

示例13: getTestResults

 /**
  * get results of test
  *
  * @param string $sid
  * @param int $test_ref_id
  * @param boolean $sum_only
  *
  * @return XMLResultSet with columns 
  * 	sum only = true: user_id, login, firstname, lastname, matriculation, maximum points, received points
  *  sum only = false: user_id, login, firstname, lastname, matriculation, question id, question title, question points, received points
  */
 function getTestResults($sid, $test_ref_id, $sum_only)
 {
     $this->initAuth($sid);
     $this->initIlias();
     if (!$this->__checkSession($sid)) {
         return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
     }
     if (!strlen($test_ref_id)) {
         return $this->__raiseError('No test id given. Aborting!', 'Client');
     }
     global $rbacsystem, $tree, $ilLog;
     if (ilObject::_isInTrash($test_ref_id)) {
         return $this->__raiseError('Test is trashed. Aborting!', 'Client');
     }
     // get obj_id
     if (!($obj_id = ilObject::_lookupObjectId($test_ref_id))) {
         return $this->__raiseError('No test found for id: ' . $test_ref_id, 'Client');
     }
     // Check access
     $permission_ok = false;
     foreach ($ref_ids = ilObject::_getAllReferences($obj_id) as $ref_id) {
         if ($rbacsystem->checkAccess('write', $ref_id)) {
             $permission_ok = true;
             break;
         }
     }
     if (!$permission_ok) {
         return $this->__raiseError('No permission to edit the object with id: ' . $test_ref_id, 'Server');
     }
     // store into xml result set
     include_once './webservice/soap/classes/class.ilXMLResultSet.php';
     include_once './webservice/soap/classes/class.ilXMLResultSetWriter.php';
     $xmlResultSet = new ilXMLResultSet();
     $xmlResultSet->addColumn("user_id");
     $xmlResultSet->addColumn("login");
     $xmlResultSet->addColumn("firstname");
     $xmlResultSet->addColumn("lastname");
     $xmlResultSet->addColumn("matriculation");
     include_once './Modules/Test/classes/class.ilObjTest.php';
     $test_obj = new ilObjTest($obj_id, false);
     $participants = $test_obj->getTestParticipants();
     if ($sum_only) {
         $data = $test_obj->getAllTestResults($participants, false);
         // create xml
         $xmlResultSet->addColumn("maximum_points");
         $xmlResultSet->addColumn("received_points");
         // skip titles
         $titles = array_shift($data);
         foreach ($data as $row) {
             $xmlRow = new ilXMLResultSetRow();
             $xmlRow->setValue(0, $row["user_id"]);
             $xmlRow->setValue(1, $row["login"]);
             $xmlRow->setValue(2, $row["firstname"]);
             $xmlRow->setValue(3, $row["lastname"]);
             $xmlRow->setValue(4, $row["matriculation"]);
             $xmlRow->setValue(5, $row["max_points"]);
             $xmlRow->setValue(6, $row["reached_points"]);
             $xmlResultSet->addRow($xmlRow);
         }
     } else {
         $data = $test_obj->getDetailedTestResults($participants);
         // create xml
         $xmlResultSet->addColumn("question_id");
         $xmlResultSet->addColumn("question_title");
         $xmlResultSet->addColumn("maximum_points");
         $xmlResultSet->addColumn("received_points");
         foreach ($data as $row) {
             $xmlRow = new ilXMLResultSetRow();
             $xmlRow->setValue(0, $row["user_id"]);
             $xmlRow->setValue(1, $row["login"]);
             $xmlRow->setValue(2, $row["firstname"]);
             $xmlRow->setValue(3, $row["lastname"]);
             $xmlRow->setValue(4, $row["matriculation"]);
             $xmlRow->setValue(5, $row["question_id"]);
             $xmlRow->setValue(6, $row["question_title"]);
             $xmlRow->setValue(7, $row["max_points"]);
             $xmlRow->setValue(8, $row["reached_points"]);
             $xmlResultSet->addRow($xmlRow);
         }
     }
     // create writer
     $xmlWriter = new ilXMLResultSetWriter($xmlResultSet);
     $xmlWriter->start();
     return $xmlWriter->getXML();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:96,代码来源:class.ilSoapTestAdministration.php

示例14: editPageContentObject

 /**
  * edit page content (for repository root node and categories)
  *
  * @access	public
  */
 function editPageContentObject()
 {
     global $rbacsystem, $tpl, $lng, $ilCtrl;
     if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
     }
     $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(), "xhtml_page");
     if ($xpage_id > 0) {
         include_once "Services/XHTMLPage/classes/class.ilXHTMLPage.php";
         $xpage = new ilXHTMLPage($xpage_id);
         $content = $xpage->getContent();
     }
     // get template
     $tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.container_edit_page_content.html", "Services/Container");
     $tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
     $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $tpl->setVariable("TXT_EDIT_PAGE_CONTENT", $this->lng->txt("edit_page_content"));
     $tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
     $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
     $tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
     $tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
     $tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert.svg"));
     $tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
     $tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
     include_once "./Services/Form/classes/class.ilFormPropertyGUI.php";
     include_once "./Services/Form/classes/class.ilTextAreaInputGUI.php";
     //$ta = new ilTextAreaInputGUI();
     //$tags = $ta->getRteTagSet("extended_table_img");
     // add rte support
     include_once "./Services/RTE/classes/class.ilRTE.php";
     $rtestring = ilRTE::_getRTEClassname();
     include_once "./Services/RTE/classes/class.{$rtestring}.php";
     $rte = new $rtestring();
     //$rte->addPlugin("latex");
     include_once "./Services/Object/classes/class.ilObject.php";
     $obj_id = ilObject::_lookupObjectId($_GET["ref_id"]);
     $obj_type = ilObject::_lookupType($_GET["ref_id"], TRUE);
     $rte->addRTESupport($obj_id, $obj_type);
     //$rte->setStyleSelect(true);
     //$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:46,代码来源:class.ilContainerGUI.php

示例15: handleGroupCreation

 /**
  * Handle group creation inside main course
  * @param type $a_obj_id
  */
 protected function handleGroupCreation($a_node_ref_id, $a_node_obj_id, $a_node_obj_type)
 {
     if ($a_node_obj_type != 'grp') {
         $GLOBALS['ilLog']->write(__METHOD__ . ': New node not of type grp for ref_id ' . $a_node_ref_id);
         return false;
     }
     if (!$a_node_ref_id) {
         $GLOBALS['ilLog']->write(__METHOD__ . ': No ref_id given. Aborting!');
         return false;
     }
     $parent_id = $GLOBALS['tree']->getParentId($a_node_ref_id);
     if (ilObject::_lookupType($parent_id, true) != 'crs') {
         $GLOBALS['ilLog']->write(__METHOD__ . ': Parent type is not of type "crs"');
         return false;
     }
     if (!$this->isMainCourse($parent_id)) {
         $GLOBALS['ilLog']->write(__METHOD__ . ': Parent course is not main course for group ref_id ' . $a_node_ref_id);
         return false;
     }
     // determine default group role
     $group_role_id = 0;
     foreach ($GLOBALS['rbacreview']->getRolesOfObject($a_node_ref_id, TRUE) as $role_id) {
         $role_title = ilObject::_lookupTitle($role_id);
         if (substr($role_title, 0, 8) == 'il_grp_m') {
             $group_role_id = $role_id;
         }
     }
     if (!$group_role_id) {
         $GLOBALS['ilLog']->write(__METHOD__ . ': Did not found default group member role for group obj_id ' . $a_node_obj_id);
         return false;
     }
     // now assign all members of the parent course to the new group
     include_once './Modules/Course/classes/class.ilCourseParticipants.php';
     $part = ilCourseParticipants::getInstanceByObjId(ilObject::_lookupObjectId($parent_id));
     foreach ($part->getMembers() as $member_id) {
         // do not assign user if he/she is admin or tutor
         if ($part->isAdmin($member_id) || $part->isTutor($member_id)) {
             continue;
         }
         $GLOBALS['rbacadmin']->assignUser($group_role_id, $member_id);
     }
     return true;
 }
开发者ID:leifos-gmbh,项目名称:FhoevEvent,代码行数:47,代码来源:class.ilFhoevEventPlugin.php


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