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


PHP ilChangeEvent::_recordReadEvent方法代码示例

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


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

示例1: _tracProgress

 function _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type = '')
 {
     global $ilDB;
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     ilChangeEvent::_recordReadEvent($a_obj_type, $a_ref_id, $a_obj_id, $a_user_id);
     require_once 'Services/Tracking/classes/class.ilLPStatus.php';
     ilLPStatus::setInProgressIfNotAttempted($a_obj_id, $a_user_id);
     return true;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:9,代码来源:class.ilLearningProgress.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: 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

示例5: 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

示例6: 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

示例7: viewObject

 /**
  * list childs of current object
  *
  * @access	public
  */
 public function viewObject()
 {
     global $tpl;
     if (!$this->checkPermissionBool("visible,read")) {
         $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
     }
     // BEGIN ChangeEvent: record read event.
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     global $ilUser;
     ilChangeEvent::_recordReadEvent($this->object->getType(), $this->object->getRefId(), $this->object->getId(), $ilUser->getId());
     // END ChangeEvent: record read event.
     include_once "./Services/Repository/classes/class.ilAdminSubItemsTableGUI.php";
     if (!$this->call_by_reference) {
         $this->ctrl->setParameter($this, "obj_id", $this->obj_id);
     }
     $itab = new ilAdminSubItemsTableGUI($this, "view", $_GET["ref_id"]);
     $tpl->setContent($itab->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:23,代码来源:class.ilObjectGUI.php

示例8: 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

示例9: 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

示例10: _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

示例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 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

示例12: _syncReadEvent

    /**
     * Synch read event table
     *
     * @param
     * @return
     */
    function _syncReadEvent($a_obj_id, $a_user_id, $a_type, $a_ref_id, $time_from_lms = null)
    {
        global $ilDB;
        //get condition to select time
        $val_set = $ilDB->queryF('SELECT time_from_lms FROM sahs_lm WHERE id = %s', array('integer'), array($a_obj_id));
        $val_rec = $ilDB->fetchAssoc($val_set);
        $time_from_lms = ilUtil::yn2tf($val_rec["time_from_lms"]);
        // get attempts and time
        $val_set = $ilDB->queryF('
			SELECT package_attempts, sco_total_time_sec, total_time_sec 
			FROM sahs_user WHERE obj_id = %s AND user_id = %s', array('integer', 'integer'), array($a_obj_id, $a_user_id));
        $val_rec = $ilDB->fetchAssoc($val_set);
        if ($time_from_lms == false) {
            $time = $val_rec["sco_total_time_sec"];
        } else {
            $time = $val_rec["total_time_sec"];
        }
        $attempts = $val_rec["package_attempts"];
        if ($attempts == null) {
            $attempts = "";
        }
        //??
        if ($attempts != "" && $time == null) {
            //use old way
            $time = self::getSumTotalTimeSecondsFromScos($a_obj_id, $a_user_id, true);
        }
        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:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilSCORM2004Tracking.php

示例13: 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

示例14: 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

示例15: _syncReadEvent

    /**
     * Synch read event table
     *
     * @param
     * @return
     */
    function _syncReadEvent($a_obj_id, $a_user_id, $a_type, $a_ref_id)
    {
        global $ilDB;
        // get attempts and time
        $val_set = $ilDB->queryF('
			SELECT package_attempts, sco_total_time_sec 
			FROM sahs_user WHERE obj_id = %s AND user_id = %s', array('integer', 'integer'), array($a_obj_id, $a_user_id));
        $val_rec = $ilDB->fetchAssoc($val_set);
        $time = $val_rec["sco_total_time_sec"];
        //could be changed to total_time_sec if switch is available
        $attempts = $val_rec["package_attempts"];
        if ($attempts == null) {
            $attempts = "";
        }
        if ($attempts != "" && $time == null) {
            //use old way
            $time = self::getSumTotalTimeSecondsFromScos($a_obj_id, $a_user_id, true);
        }
        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:Walid-Synakene,项目名称:ilias,代码行数:27,代码来源:class.ilSCORM2004Tracking.php


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