• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilChangeEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: testChangeEvent

 /**
  * change event test 
  * @param
  * @return
  */
 public function testChangeEvent()
 {
     global $ilUser;
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     $ret = ilChangeEvent::_deactivate();
     $ret = ilChangeEvent::_activate();
     $res = ilChangeEvent::_lookupUncaughtWriteEvents(9, $ilUser->getId());
     $res = ilChangeEvent::_lookupChangeState(9, $ilUser->getId());
     $res = ilChangeEvent::_lookupInsideChangeState(9, $ilUser->getId());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:ilTrackingTest.php


示例2: trackAccess

 /**
  * Track read access to the object
  * Prevents a call of determineStatus() that would return "not attempted"
  * @see ilLearningProgress::_tracProgress()
  *
  * @param $a_user_id
  * @param $a_obj_id
  * @param $a_ref_id
  * @param string $a_obj_type
  */
 public static function trackAccess($a_user_id, $a_obj_id, $a_ref_id)
 {
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     ilChangeEvent::_recordReadEvent('xxco', $a_ref_id, $a_obj_id, $a_user_id);
     $status = self::getLPDataForUser($a_obj_id, $a_user_id);
     if ($status == self::LP_STATUS_NOT_ATTEMPTED_NUM) {
         self::writeStatus($a_obj_id, $a_user_id, self::LP_STATUS_IN_PROGRESS_NUM);
         self::raiseEventStatic($a_obj_id, $a_user_id, self::LP_STATUS_IN_PROGRESS_NUM, self::getPercentageForUser($a_obj_id, $a_user_id));
     }
 }
开发者ID:ilifau,项目名称:ExternalContent,代码行数:20,代码来源:class.ilExternalContentLPStatus.php


示例3: setOutput

 /**
  * Sets view output into column layout
  *
  * This method sets the output of the right and main column
  * in the global standard template.
  */
 public function setOutput()
 {
     global $tpl;
     // BEGIN ChangeEvent: record read event.
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     global $ilUser;
     $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
     ilChangeEvent::_recordReadEvent($this->getContainerObject()->getType(), $this->getContainerObject()->getRefId(), $obj_id, $ilUser->getId());
     // END ChangeEvent: record read event.
     $tpl->setContent($this->getCenterColumnHTML());
     $tpl->setRightContent($this->getRightColumnHTML());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:18,代码来源:class.ilContainerContentGUI.php


示例4: determineStatus

 /**
  * Determine status
  *
  * @param	integer		object id
  * @param	integer		user id
  * @param	object		object (optional depends on object type)
  * @return	integer		status
  */
 function determineStatus($a_obj_id, $a_user_id, $a_obj = null)
 {
     $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
     include_once "Services/Tracking/classes/class.ilChangeEvent.php";
     if (ilChangeEvent::hasAccessed($a_obj_id, $a_user_id)) {
         $status = self::LP_STATUS_IN_PROGRESS_NUM;
         include_once "Modules/LearningModule/classes/class.ilLMTracker.php";
         $tracker = ilLMTracker::getInstanceByObjId($a_obj_id, $a_user_id);
         if ($tracker->getAllQuestionsCorrect()) {
             $status = self::LP_STATUS_COMPLETED_NUM;
         }
     }
     return $status;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilLPStatusQuestions.php


示例5: callObject

 /**
  * call remote object
  *
  * @return bool
  */
 public function callObject()
 {
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     ilChangeEvent::_recordReadEvent($this->getType(), $this->object->getRefId(), $this->object->getId(), $GLOBALS['ilUser']->getId());
     // check if the assigned object is hosted on the same installation
     $link = $this->object->getFullRemoteLink();
     if ($link) {
         ilUtil::redirect($link);
         return true;
     } else {
         ilUtil::sendFailure('Cannot call remote object.');
         $this->infoScreenObject();
         return false;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:20,代码来源:class.ilRemoteObjectBaseGUI.php


示例6: _lookupProgressByObjId

 /**
  * lookup progress for a specific object
  *
  * @access public
  * @param int obj_id
  * @return array of progress data 
  */
 public static function _lookupProgressByObjId($a_obj_id)
 {
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     foreach (ilChangeEvent::_lookupReadEvents($a_obj_id) as $row) {
         if (isset($progress[$row['usr_id']])) {
             $progress[$row['usr_id']]['spent_seconds'] += $row['spent_seconds'];
             $progress[$row['usr_id']]['read_count'] += $row['read_count'];
             $progress[$row['usr_id']]['ts'] = max($row['last_access'], $progress[$row['usr_id']]['ts']);
         } else {
             $progress[$row['usr_id']]['spent_seconds'] = $row['spent_seconds'];
             $progress[$row['usr_id']]['read_count'] = $row['read_count'];
             $progress[$row['usr_id']]['ts'] = $row['last_access'];
         }
         $progress[$row['usr_id']]['usr_id'] = $row['usr_id'];
         $progress[$row['usr_id']]['obj_id'] = $row['obj_id'];
     }
     return $progress ? $progress : array();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:25,代码来源:class.ilLearningProgress.php


示例7: determineStatus

 /**
  * Determine status
  *
  * @param	integer		object id
  * @param	integer		user id
  * @param	object		object (optional depends on object type)
  * @return	integer		status
  */
 function determineStatus($a_obj_id, $a_user_id, $a_obj = null)
 {
     global $ilObjDataCache, $ilDB;
     $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
     switch ($ilObjDataCache->lookupType($a_obj_id)) {
         case 'dbk':
         case 'lm':
         case 'htlm':
             include_once "./Services/Tracking/classes/class.ilChangeEvent.php";
             if (ilChangeEvent::hasAccessed($a_obj_id, $a_user_id)) {
                 $status = self::LP_STATUS_IN_PROGRESS_NUM;
                 // completed?
                 $set = $ilDB->query($q = "SELECT usr_id FROM ut_lp_marks " . "WHERE obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " . "AND usr_id = " . $ilDB->quote($a_user_id, 'integer') . " " . "AND completed = '1' ");
                 if ($rec = $ilDB->fetchAssoc($set)) {
                     $status = self::LP_STATUS_COMPLETED_NUM;
                 }
             }
             break;
     }
     return $status;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilLPStatusManual.php


示例8: setOutput

 /**
  * Sets view output into column layout
  *
  * This method sets the output of the right and main column
  * in the global standard template.
  */
 public function setOutput()
 {
     global $tpl, $ilCtrl;
     // note: we do not want to get the center html in case of
     // asynchronous calls to blocks in the right column (e.g. news)
     // see #13012
     if ($ilCtrl->getNextClass() == "ilcolumngui" && $ilCtrl->isAsynch()) {
         $tpl->setRightContent($this->getRightColumnHTML());
     }
     // BEGIN ChangeEvent: record read event.
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     global $ilUser;
     //global $log;
     //$log->write("setOutput");
     $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
     ilChangeEvent::_recordReadEvent($this->getContainerObject()->getType(), $this->getContainerObject()->getRefId(), $obj_id, $ilUser->getId());
     // END ChangeEvent: record read event.
     $tpl->setContent($this->getCenterColumnHTML());
     // see above, all other cases (this was the old position of setRightContent,
     // maybe the position above is ok and all ifs can be removed)
     if ($ilCtrl->getNextClass() != "ilcolumngui" || !$ilCtrl->isAsynch()) {
         $tpl->setRightContent($this->getRightColumnHTML());
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:30,代码来源:class.ilContainerContentGUI.php


示例9: addToExternalSettingsForm

 public function addToExternalSettingsForm($a_form_id)
 {
     switch ($a_form_id) {
         case ilAdministrationSettingsFormHandler::FORM_LP:
             require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
             $fields = array('trac_repository_changes' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
             return array(array("view", $fields));
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:9,代码来源:class.ilObjRepositorySettingsGUI.php


示例10: increaseViewCount

 protected function increaseViewCount()
 {
     global $ilUser;
     $this->getWikiPage()->increaseViewCnt();
     // enable object statistics
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     ilChangeEvent::_recordReadEvent("wiki", $this->getWikiPage()->getWikiRefId(), $this->getWikiPage()->getWikiId(), $ilUser->getId());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:8,代码来源:class.ilWikiPageGUI.php


示例11: _syncReadEvent

    /**
     * Synch read event table
     *
     * @param
     * @return
     */
    function _syncReadEvent($a_obj_id, $a_user_id, $a_type, $a_ref_id)
    {
        global $ilDB, $ilLog;
        // get attempts
        $val_set = $ilDB->queryF('
		SELECT rvalue FROM cmi_custom 
		WHERE user_id = %s
				AND sco_id = %s
				AND lvalue = %s
				AND obj_id = %s', array('integer', 'integer', 'text', 'integer'), array($a_user_id, 0, 'package_attempts', $a_obj_id));
        $val_rec = $ilDB->fetchAssoc($val_set);
        $val_rec["rvalue"] = str_replace("\r\n", "\n", $val_rec["rvalue"]);
        if ($val_rec["rvalue"] == null) {
            $val_rec["rvalue"] = "";
        }
        $attempts = $val_rec["rvalue"];
        // time
        $scos = array();
        $val_set = $ilDB->queryF('SELECT cp_node_id FROM cp_node 
			WHERE nodename = %s
			AND cp_node.slm_id = %s', array('text', 'integer'), array('item', $a_obj_id));
        while ($val_rec = $ilDB->fetchAssoc($val_set)) {
            array_push($scos, $val_rec['cp_node_id']);
        }
        $time = 0;
        foreach ($scos as $sco) {
            include_once "./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php";
            $data_set = $ilDB->queryF('
				SELECT total_time
				FROM cmi_node 
				WHERE cp_node_id = %s
				AND user_id = %s', array('integer', 'integer'), array($sco, $a_user_id));
            while ($data_rec = $ilDB->fetchAssoc($data_set)) {
                // see bug report 7246
                //				$sec = ilObjSCORM2004LearningModule::_ISODurationToCentisec($data_rec["session_time"]) / 100;
                $sec = ilObjSCORM2004LearningModule::_ISODurationToCentisec($data_rec["total_time"]) / 100;
            }
            $time += (int) $sec;
            $sec = 0;
            //$ilLog->write("++".$time);
        }
        include_once "./Services/Tracking/classes/class.ilChangeEvent.php";
        ilChangeEvent::_recordReadEvent($a_type, $a_ref_id, $a_obj_id, $a_user_id, false, $attempts, $time);
    }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:50,代码来源:class.ilSCORM2004Tracking.php


示例12: redirectToLink

 protected function redirectToLink($a_ref_id, $a_obj_id, $a_url)
 {
     global $ilUser;
     if ($a_url) {
         require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
         ilChangeEvent::_recordReadEvent("webr", $a_ref_id, $a_obj_id, $ilUser->getId());
         ilUtil::redirect($a_url);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:9,代码来源:class.ilObjLinkResourceGUI.php


示例13: addObjectSections

 /**
  * add standard object section
  */
 function addObjectSections()
 {
     global $lng, $ilCtrl, $ilUser, $ilAccess, $tree, $ilSetting, $ilObjDataCache;
     $this->addSection($lng->txt("additional_info"));
     $a_obj = $this->gui_object->object;
     // links to the object
     if (is_object($a_obj)) {
         // permanent link
         $type = $a_obj->getType();
         $ref_id = $a_obj->getRefId();
         if ($ref_id) {
             include_once './Services/Link/classes/class.ilLink.php';
             $href = ilLink::_getStaticLink($ref_id, $type, true);
             include_once 'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
             if (ilECSServerSettings::getInstance()->activeServerExists()) {
                 $this->addProperty($lng->txt("object_id"), $a_obj->getId());
             }
             include_once 'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
             $pm = new ilPermanentLinkGUI($type, $ref_id);
             $pm->setIncludePermanentLinkText(false);
             $pm->setAlignCenter(false);
             $this->addProperty($lng->txt("perma_link"), $pm->getHTML(), "");
             // bookmarks
             $title = $ilObjDataCache->lookupTitle($a_obj->getId());
             $bms = ilPermanentLinkGUI::_getBookmarksSelectionList($title, $href);
             // links to resource
             if ($ilAccess->checkAccess("write", "", $ref_id) || $ilAccess->checkAccess("edit_permissions", "", $ref_id)) {
                 $obj_id = $a_obj->getId();
                 $rs = ilObject::_getAllReferences($obj_id);
                 $refs = array();
                 foreach ($rs as $r) {
                     if ($tree->isInTree($r)) {
                         $refs[] = $r;
                     }
                 }
                 if (count($refs) > 1) {
                     $links = $sep = "";
                     foreach ($refs as $r) {
                         $cont_loc = new ilLocatorGUI();
                         $cont_loc->addContextItems($r, true);
                         $links .= $sep . $cont_loc->getHTML();
                         $sep = "<br />";
                     }
                     $this->addProperty($lng->txt("res_links"), '<div class="small">' . $links . '</div>');
                 }
             }
         }
     }
     // creation date
     $this->addProperty($lng->txt("create_date"), ilDatePresentation::formatDate(new ilDateTime($a_obj->getCreateDate(), IL_CAL_DATETIME)));
     // owner
     if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner()) {
         include_once './Services/Object/classes/class.ilObjectFactory.php';
         include_once './Services/User/classes/class.ilObjUser.php';
         if (ilObjUser::userExists(array($a_obj->getOwner()))) {
             $ownerObj = ilObjectFactory::getInstanceByObjId($a_obj->getOwner(), false);
         } else {
             $ownerObj = ilObjectFactory::getInstanceByObjId(6, false);
         }
         if (!is_object($ownerObj) || $ownerObj->getType() != "usr") {
             $this->addProperty($lng->txt("owner"), $lng->txt("no_owner"));
         } else {
             if ($ownerObj->hasPublicProfile()) {
                 $ilCtrl->setParameterByClass("ilpublicuserprofilegui", "user_id", $ownerObj->getId());
                 $this->addProperty($lng->txt("owner"), $ownerObj->getPublicName(), $ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML"));
             } else {
                 $this->addProperty($lng->txt("owner"), $ownerObj->getPublicName());
             }
         }
     }
     // disk usage
     require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
     if ($ilUser->getId() != ANONYMOUS_USER_ID && ilDiskQuotaActivationChecker::_isActive()) {
         $size = $a_obj->getDiskUsage();
         if ($size !== null) {
             $this->addProperty($lng->txt("disk_usage"), ilFormat::formatSize($size, 'long'));
         }
     }
     // change event
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     if (ilChangeEvent::_isActive()) {
         if ($ilUser->getId() != ANONYMOUS_USER_ID) {
             $readEvents = ilChangeEvent::_lookupReadEvents($a_obj->getId());
             $count_users = 0;
             $count_members = 0;
             $count_user_reads = 0;
             $count_anonymous_reads = 0;
             foreach ($readEvents as $evt) {
                 if ($evt['usr_id'] == ANONYMOUS_USER_ID) {
                     $count_anonymous_reads += $evt['read_count'];
                 } else {
                     $count_user_reads += $evt['read_count'];
                     $count_users++;
                     /* to do: if ($evt['user_id'] is member of $this->getRefId())
                     			{
                     				$count_members++;
                     			}*/
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilInfoScreenGUI.php


示例14: adminSync

 function adminSync()
 {
     global $ilCtrl, $lng;
     include_once "Services/Tracking/classes/class.ilChangeEvent.php";
     ilChangeEvent::_syncObjectStats(time(), 1);
     ilUtil::sendSuccess($lng->txt("trac_sync_obj_stats_success"), true);
     $ilCtrl->redirect($this, "admin");
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:8,代码来源:class.ilLPObjectStatisticsGUI.php


示例15: view

 /**
  * Output course content
  */
 function view()
 {
     // BEGIN ChangeEvent: record read event.
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     global $ilUser;
     $obj_id = ilObject::_lookupObjId($this->container_obj->getRefId());
     ilChangeEvent::_recordReadEvent($this->container_obj->getType(), $this->container_obj->getRefId(), $obj_id, $ilUser->getId());
     // END ChangeEvent: record read event.
     $this->getCenterColumnHTML();
     if (!$this->no_right_column) {
         $this->tpl->setRightContent($this->getRightColumnHTML());
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:16,代码来源:class.ilCourseContentGUI.php


示例16: deleteTrackingDataOfUsers

    function deleteTrackingDataOfUsers($a_users)
    {
        global $ilDB;
        include_once "./Services/Tracking/classes/class.ilChangeEvent.php";
        include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
        ilChangeEvent::_deleteReadEventsForUsers($this->getId(), $a_users);
        foreach ($a_users as $user) {
            $ilDB->manipulateF('
				DELETE FROM scorm_tracking
				WHERE user_id = %s
				AND obj_id = %s', array('integer', 'integer'), array($user, $this->getID()));
            $ilDB->manipulateF('
				DELETE FROM sahs_user
				WHERE user_id = %s
				AND obj_id = %s', array('integer', 'integer'), array($user, $this->getID()));
            ilLPStatusWrapper::_updateStatus($this->getId(), $user);
        }
    }
开发者ID:bheyser,项目名称:qplskl,代码行数:18,代码来源:class.ilObjSCORMLearningModule.php


示例17: _syncReadEvent

    /**
     * Synch read event table
     *
     * @param
     * @return
     */
    function _syncReadEvent($a_obj_id, $a_user_id, $a_type, $a_ref_id)
    {
        global $ilDB, $ilLog;
        // get attempts
        $val_set = $ilDB->queryF('
		SELECT rvalue FROM scorm_tracking 
		WHERE user_id = %s
		AND sco_id = %s
		AND lvalue = %s
		AND obj_id = %s', array('integer', 'integer', 'text', 'integer'), array($a_user_id, 0, 'package_attempts', $a_obj_id));
        $val_rec = $ilDB->fetchAssoc($val_set);
        $val_rec["rvalue"] = str_replace("\r\n", "\n", $val_rec["rvalue"]);
        if ($val_rec["rvalue"] == null) {
            $val_rec["rvalue"] = "";
        }
        $attempts = $val_rec["rvalue"];
        // get learning time
        $sco_set = $ilDB->queryF('
		SELECT sco_id, rvalue FROM scorm_tracking 
		WHERE obj_id = %s
		AND user_id = %s
		AND lvalue = %s
		AND sco_id <> %s', array('integer', 'integer', 'text', 'integer'), array($a_obj_id, $a_user_id, 'cmi.core.total_time', 0));
        $time = 0;
        while ($sco_rec = $ilDB->fetchAssoc($sco_set)) {
            $tarr = explode(":", $sco_rec["rvalue"]);
            $sec = (int) $tarr[2] + (int) $tarr[1] * 60 + (int) substr($tarr[0], strlen($tarr[0]) - 3) * 60 * 60;
            $time += $sec;
        }
        include_once "./Services/Tracking/classes/class.ilChangeEvent.php";
        ilChangeEvent::_recordReadEvent($a_type, $a_ref_id, $a_obj_id, $a_user_id, false, $attempts, $time);
    }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilObjSCORMTracking.php


示例18: infoScreen

 /**
  * info screen
  *
  * @access protected
  * @param
  * @return
  */
 public function infoScreen()
 {
     global $ilAccess, $ilUser, $ilCtrl, $tree, $ilToolbar;
     $this->checkPermission('visible');
     $this->tabs_gui->setTabActive('info_short');
     $appointment_obj = $this->object->getFirstAppointment();
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($this->object->enabledRegistration()) {
         include_once './Modules/Session/classes/class.ilEventParticipants.php';
         if (ilEventParticipants::_isRegistered($ilUser->getId(), $this->object->getId())) {
             $ilToolbar->addFormButton($this->lng->txt('event_unregister'), 'join');
         } else {
             if (!isset($_SESSION['sess_hide_info'])) {
                 ilUtil::sendInfo($this->lng->txt('sess_join_info'));
             }
             $ilToolbar->addFormButton($this->lng->txt('join_session'), 'join', '', true);
         }
         $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
     }
     // Session information
     if (strlen($this->object->getLocation()) or strlen($this->object->getDetails())) {
         $info->addSection($this->lng->txt('event_section_information'));
     }
     if (strlen($location = $this->object->getLocation())) {
         $info->addProperty($this->lng->txt('event_location'), nl2br($this->object->getLocation()));
     }
     if (strlen($this->object->getDetails())) {
         $info->addProperty($this->lng->txt('event_details_workflow'), nl2br($this->object->getDetails()));
     }
     // Tutor information
     if ($this->object->hasTutorSettings()) {
         $info->addSection($this->lng->txt('event_tutor_data'));
         if (strlen($fullname = $this->object->getName())) {
             $info->addProperty($this->lng->txt('event_lecturer'), $fullname);
         }
         if (strlen($email = $this->object->getEmail())) {
             $info->addProperty($this->lng->txt('tutor_email'), $email);
         }
         if (strlen($phone = $this->object->getPhone())) {
             $info->addProperty($this->lng->txt('tutor_phone'), $phone);
         }
     }
     $html = '';
     include_once './Services/Object/classes/class.ilObjectActivation.php';
     include_once './Services/Container/classes/class.ilContainerSorting.php';
     include_once './Modules/Session/classes/class.ilSessionObjectListGUIFactory.php';
     $eventItems = ilObjectActivation::getItemsByEvent($this->object->getId());
     $parent_id = $tree->getParentId($this->object->getRefId());
     $parent_id = ilObject::_lookupObjId($parent_id);
     $eventItems = ilContainerSorting::_getInstance($parent_id)->sortSubItems('sess', $this->object->getId(), $eventItems);
     foreach ($eventItems as $item) {
         $list_gui = ilSessionObjectListGUIFactory::factory($item['type']);
         $list_gui->setContainerObject($this);
         $this->modifyItemGUI($list_gui, $item, false);
         $html .= $list_gui->getListItemHTML($item['ref_id'], $item['obj_id'], $item['title'], $item['description']);
     }
     if (strlen($html)) {
         $info->addSection($this->lng->txt('event_materials'));
         $info->addProperty('&nbsp;', $html);
     }
     // forward the command
     $this->ctrl->forwardCommand($info);
     // store read event
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     ilChangeEvent::_recordReadEvent($this->object->getType(), $this->object->getRefId(), $this->object->getId(), $ilUser->getId());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:74,代码来源:class.ilObjSessionGUI.php


示例19: COPY

 /**
  * COPY method handler
  *
  * @param  array  general parameter passing array
  * @return bool   true on success
  */
 public function COPY($options, $del = false)
 {
     global $ilUser;
     $this->writelog('COPY(' . var_export($options, true) . ' ,del=' . $del . ')');
     $this->writelog('COPY ' . $options['path'] . ' ' . $options['dest']);
     // no copying to different WebDAV Servers
     if (isset($options["dest_url"])) {
         return "502 bad gateway";
     }
     $src = $this->davDeslashify($options['path']);
     $srcParent = dirname($src);
     $srcName = $this->davBasename($src);
     $dst = $this->davDeslashify($options['dest']);
     $dstParent = dirname($dst);
     $dstName = $this->davBasename($dst);
     // sanity check
     if ($src == $dst) {
         return '409 Conflict';
         // src and dst are the same
     }
     if (substr($dst, strlen($src) + 1) == $src . '/') {
         return '409 Conflict';
         // dst is in subtree of src
     }
     $this->writelog('COPY src=' . $src . ' dst=' . $dst);
     // get dav object for path
     $srcDAV =& $this->getObject($src);
     $dstDAV =& $this->getObject($dst);
     $dstParentDAV =& $this->getObject($dstParent);
     if (is_null($srcDAV) || $srcDAV->isNullResource()) {
         return '409 Conflict';
         // src does not exist
     }
     if (is_null($dstParentDAV) || $dstParentDAV->isNullResource()) {
         return '409 Conflict';
         // parent of dst does not exist
     }
     $isOverwritten = false;
     // XXX Handle nulltype for dstDAV
     if (!is_null($dstDAV)) {
         if ($options['overwrite'] == 'T') {
             if ($dstDAV->isPermitted('delete')) {
                 $dstParentDAV->remove($dstDAV);
                 ilChangeEvent::_recordWriteEvent($dstDAV->getObjectId(), $ilUser->getId(), 'delete', $dstParentDAV->getObjectId());
                 $dstDAV = null;
                 $isOverwritten = true;
             } else {
                 return '403 Forbidden';
             }
         } else {
             return '412 Precondition Failed';
         }
     }
     if (!$dstParentDAV->isPermitted('create', $srcDAV->getILIASType())) {
         return '403 Forbidden';
     }
     $dstDAV = $dstParentDAV->addCopy($srcDAV, $dstName);
     // Record write event
     ilChangeEvent::_recordReadEvent($srcDAV->getILIASType(), $srcDAV->getRefId(), $srcDAV->getObjectId(), $ilUser->getId());
     ilChangeEvent::_recordWriteEvent($dstDAV->getObjectId(), $ilUser->getId(), 'create', $dstParentDAV->getObjectId());
     return $isOverwritten ? '204 No Content' : '201 Created';
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:68,代码来源:class.ilDAVServer.php


示例20: determineStatus

 /**
  * Determine status
  *
  * @param	integer		object id
  * @param	integer		user id
  * @param	object		object (optional depends on object type)
  * @return	integer		status
  */
 function determineStatus($a_obj_id, $a_user_id, $a_obj = null)
 {
     global $ilObjDataCache, $ilDB;
     // the status completed depends on:
     // $status_info['num_objectives'] (ilLPStatusWrapper::_getStatusInfo($a_obj_id);)
     // - ilCourseObjective::_getObjectiveIds($a_obj_id);
     // - table crs_objectives manipulated in
     // - ilCourseObjective
     // $status_info['objective_result']  (ilLPStatusWrapper::_getStatusInfo($a_obj_id);)
     // table crs_objective_status (must not contain a dataset)
     // ilCourseObjectiveResult -> added ilLPStatusWrapper::_updateStatus()
     $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
     switch ($ilObjDataCache->lookupType($a_obj_id)) {
         case "crs":
             include_once "./Services/Tracking/classes/class.ilChangeEvent.php";
             if (ilChangeEvent::hasAccessed($a_obj_id, $a_user_id)) {
                 $status = self::LP_STATUS_IN_PROGRESS_NUM;
                 include_once 'Modules/Course/classes/class.ilCourseObjective.php';
                 $objectives = ilCourseObjective::_getObjectiveIds($a_obj_id);
                 if ($objectives) {
                     $set = $ilDB->query("SELECT count(objective_id) cnt FROM crs_objective_status " . "WHERE " . $ilDB->in('objective_id', $objectives, false, 'integer') . " AND user_id = " . $ilDB->quote($a_user_id, "integer"));
                     if ($rec = $ilDB->fetchAssoc($set)) {
                         if ($rec["cnt"] == count($objectives)) {
                             $status = self::LP_STATUS_COMPLETED_NUM;
                         }
                     }
                 }
             }
             break;
     }
     return $status;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:40,代码来源:class.ilLPStatusObjectives.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilCheckboxInputGUI类代码示例发布时间:2022-05-23
下一篇:
PHP ilAdvancedSelectionListGUI类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap