當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilChangeEvent::lookupUsersInProgress方法代碼示例

本文整理匯總了PHP中ilChangeEvent::lookupUsersInProgress方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilChangeEvent::lookupUsersInProgress方法的具體用法?PHP ilChangeEvent::lookupUsersInProgress怎麽用?PHP ilChangeEvent::lookupUsersInProgress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilChangeEvent的用法示例。


在下文中一共展示了ilChangeEvent::lookupUsersInProgress方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _getInProgress

 function _getInProgress($a_obj_id)
 {
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     $users = ilChangeEvent::lookupUsersInProgress($a_obj_id);
     include_once './Services/Object/classes/class.ilObjectLP.php';
     $olp = ilObjectLP::getInstance($a_obj_id);
     $collection = $olp->getCollectionInstance();
     if ($collection) {
         foreach ($collection->getItems() as $item_id) {
             $item_id = ilObject::_lookupObjId($item_id);
             // merge arrays of users with status 'in progress'
             $users = array_unique(array_merge((array) $users, ilLPStatusWrapper::_getInProgress($item_id)));
             $users = array_unique(array_merge((array) $users, ilLPStatusWrapper::_getCompleted($item_id)));
         }
     }
     // Exclude all users with status completed.
     $users = array_diff((array) $users, ilLPStatusWrapper::_getCompleted($a_obj_id));
     // Exclude all users with status failed.
     $users = array_diff((array) $users, ilLPStatusWrapper::_getFailed($a_obj_id));
     if ($users) {
         // Exclude all non members
         $users = array_intersect(self::getMembers($a_obj_id), (array) $users);
     }
     return $users;
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:25,代碼來源:class.ilLPStatusCollection.php

示例2: _getInProgress

 function _getInProgress($a_obj_id)
 {
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     $users = ilChangeEvent::lookupUsersInProgress($a_obj_id);
     // Exclude all users with status completed.
     $users = array_diff((array) $users, ilLPStatusWrapper::_getCompleted($a_obj_id));
     return $users;
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:8,代碼來源:class.ilLPStatusManual.php

示例3: _getInProgress

 /**
  * get in progress
  *
  * @access public
  * @param int object id
  * @return array int Array of user ids
  */
 public function _getInProgress($a_obj_id)
 {
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     $users = ilChangeEvent::lookupUsersInProgress($a_obj_id);
     // Exclude all users with status completed.
     $users = array_diff((array) $users, ilLPStatusWrapper::_getCompleted($a_obj_id));
     if ($users) {
         // Exclude all non members
         $users = array_intersect(self::getMembers($a_obj_id), (array) $users);
     }
     return $users;
 }
開發者ID:khanhnnvn,項目名稱:ilias_E-learning,代碼行數:19,代碼來源:class.ilLPStatusManualByTutor.php

示例4: _getInProgress

 function _getInProgress($a_obj_id)
 {
     include_once './Modules/Exercise/classes/class.ilExerciseMembers.php';
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     $users = ilExerciseMembers::_getReturned($a_obj_id);
     $all = ilChangeEvent::lookupUsersInProgress($a_obj_id);
     $users = $users + $all;
     $users = array_diff($users, ilLPStatusWrapper::_getCompleted($a_obj_id));
     $users = array_diff($users, ilLPStatusWrapper::_getFailed($a_obj_id));
     if ($users) {
         // Exclude all non members
         $users = array_intersect(self::getMembers($a_obj_id), (array) $users);
     }
     return $users;
 }
開發者ID:khanhnnvn,項目名稱:ilias_E-learning,代碼行數:15,代碼來源:class.ilLPStatusExerciseReturned.php

示例5: _getCompleted

 function _getCompleted($a_obj_id)
 {
     $usr_ids = array();
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     $users = ilChangeEvent::lookupUsersInProgress($a_obj_id);
     include_once "Modules/LearningModule/classes/class.ilLMTracker.php";
     foreach ($users as $user_id) {
         // :TODO: this ought to be optimized
         $tracker = ilLMTracker::getInstanceByObjId($a_obj_id, $user_id);
         if ($tracker->getAllQuestionsCorrect()) {
             $usr_ids[] = $user_id;
         }
     }
     return $usr_ids;
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:15,代碼來源:class.ilLPStatusQuestions.php

示例6: _getStatusInfo

 function _getStatusInfo($a_obj_id)
 {
     global $ilDB;
     include_once 'Modules/Course/classes/class.ilCourseObjective.php';
     $status_info = array();
     $status_info['user_status'] = array();
     $status_info['objectives'] = ilCourseObjective::_getObjectiveIds($a_obj_id, true);
     $status_info['num_objectives'] = count($status_info['objectives']);
     if ($status_info['num_objectives']) {
         $in = $ilDB->in('objective_id', $status_info['objectives'], false, 'integer');
         include_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
         foreach (ilLOUserResults::getSummarizedObjectiveStatusForLP($a_obj_id, $status_info['objectives']) as $user_id => $user_status) {
             $status_info['user_status'][$user_status][] = $user_id;
         }
         // change event should lead to "in progress" - see determineStatus()
         include_once "./Services/Tracking/classes/class.ilChangeEvent.php";
         foreach (ilChangeEvent::lookupUsersInProgress($a_obj_id) as $user_id) {
             if (!is_array($status_info['user_status'][ilLPStatus::LP_STATUS_IN_PROGRESS_NUM]) || !in_array($user_id, $status_info['user_status'][ilLPStatus::LP_STATUS_IN_PROGRESS_NUM])) {
                 $status_info['user_status'][ilLPStatus::LP_STATUS_IN_PROGRESS_NUM][] = $user_id;
             }
         }
         // Read title/description
         $query = "SELECT * FROM crs_objectives WHERE " . $in;
         $res = $ilDB->query($query);
         while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
             $status_info['objective_title'][$row->objective_id] = $row->title;
             $status_info['objective_description'][$row->objective_id] = $row->description;
         }
     }
     return $status_info;
 }
開發者ID:bheyser,項目名稱:qplskl,代碼行數:31,代碼來源:class.ilLPStatusObjectives.php


注:本文中的ilChangeEvent::lookupUsersInProgress方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。