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


PHP ilLPStatusWrapper::_getCompleted方法代码示例

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


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

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

示例2: _getNotAttempted

 function _getNotAttempted($a_obj_id)
 {
     $status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
     $users = array();
     $members = self::getMembers($status_info['crs_id'], true);
     if ($members) {
         // diff in progress and completed (use stored result in LPStatusWrapper)
         $users = array_diff((array) $members, ilLPStatusWrapper::_getInProgress($a_obj_id));
         $users = array_diff((array) $users, ilLPStatusWrapper::_getCompleted($a_obj_id));
     }
     return $users;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:12,代码来源:class.ilLPStatusEvent.php

示例3: _getNotAttempted

 function _getNotAttempted($a_obj_id)
 {
     $users = array();
     $members = self::getMembers($a_obj_id);
     if ($members) {
         // diff in progress, completed and failed (use stored result in LPStatusWrapper)
         $users = array_diff((array) $members, ilLPStatusWrapper::_getInProgress($a_obj_id));
         $users = array_diff((array) $members, ilLPStatusWrapper::_getCompleted($a_obj_id));
         $users = array_diff((array) $members, ilLPStatusWrapper::_getFailed($a_obj_id));
     }
     return $users;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilLPStatusObjectives.php

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

示例5: _getInProgress

 function _getInProgress($a_obj_id)
 {
     $status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
     $users = array();
     if (is_array($status_info['in_progress'])) {
         foreach ($status_info['in_progress'] as $in_progress) {
             $users = array_merge($users, $in_progress);
         }
         $users = array_unique($users);
     }
     $users = array_diff($users, ilLPStatusWrapper::_getCompleted($a_obj_id));
     return $users;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:13,代码来源:class.ilLPStatusCollectionTLT.php

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

示例7: _getInProgress

 function _getInProgress($a_obj_id)
 {
     global $ilDB;
     global $ilBench;
     $ilBench->start('LearningProgress', '9182_LPStatusTestPassed_inProgress');
     include_once './Modules/Test/classes/class.ilObjTestAccess.php';
     $query = "SELECT DISTINCT(user_fi) FROM tst_active " . "WHERE test_fi = '" . ilObjTestAccess::_getTestIDFromObjectID($a_obj_id) . "'";
     $res = $ilDB->query($query);
     while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
         $user_ids[] = $row->user_fi;
     }
     $users = array_diff((array) $user_ids, ilLPStatusWrapper::_getCompleted($a_obj_id));
     $users = array_diff((array) $users, ilLPStatusWrapper::_getFailed($a_obj_id));
     $ilBench->stop('LearningProgress', '9182_LPStatusTestPassed_inProgress');
     return $users ? $users : array();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:16,代码来源:class.ilLPStatusTestPassed.php

示例8: refreshStatus

 function refreshStatus($a_obj_id)
 {
     parent::refreshStatus($a_obj_id);
     // this is restricted to SCOs in the current collection
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     $in_progress = ilLPStatusWrapper::_getInProgress($a_obj_id);
     $completed = ilLPStatusWrapper::_getCompleted($a_obj_id);
     $failed = ilLPStatusWrapper::_getFailed($a_obj_id);
     $all_active_users = array_unique(array_merge($in_progress, $completed, $failed));
     // get all tracked users regardless of SCOs
     include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
     $subtype = ilObjSAHSLearningModule::_lookupSubType($a_obj_id);
     if ($subtype != "scorm2004") {
         include_once "./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php";
         $all_tracked_users = ilObjSCORMTracking::_getTrackedUsers($a_obj_id);
     } else {
         include_once "./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php";
         $all_tracked_users = ilSCORM2004Tracking::_getTrackedUsers($a_obj_id);
     }
     $not_attempted_users = array_diff($all_tracked_users, $all_active_users);
     unset($all_tracked_users);
     unset($all_active_users);
     // reset all users which have no data for the current SCOs
     if ($not_attempted_users) {
         foreach ($not_attempted_users as $usr_id) {
             // this will update any (parent) collections if necessary
             ilLPStatus::writeStatus($a_obj_id, $usr_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, 0);
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilLPStatusSCORM.php

示例9: _getCountCompleted

 /**
  * Static function to read the number of user who have the status 'completed'
  */
 function _getCountCompleted($a_obj_id)
 {
     return count(ilLPStatusWrapper::_getCompleted($a_obj_id));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:7,代码来源:class.ilLPStatusWrapper.php

示例10: refreshStatus

 /**
  * Refresh status
  *
  * @param
  * @return
  */
 function refreshStatus($a_obj_id, $a_users = null)
 {
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     $not_attempted = ilLPStatusWrapper::_getNotAttempted($a_obj_id);
     foreach ($not_attempted as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, $percentage);
         }
     }
     $in_progress = ilLPStatusWrapper::_getInProgress($a_obj_id);
     foreach ($in_progress as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_IN_PROGRESS_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_IN_PROGRESS_NUM, $percentage);
         }
     }
     $completed = ilLPStatusWrapper::_getCompleted($a_obj_id);
     foreach ($completed as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_COMPLETED_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_COMPLETED_NUM, $percentage);
         }
     }
     $failed = ilLPStatusWrapper::_getFailed($a_obj_id);
     foreach ($failed as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_FAILED_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_FAILED_NUM, $percentage);
         }
     }
     if ($a_users) {
         $missing_users = array_diff($a_users, $not_attempted + $in_progress + $completed + $failed);
         if ($missing_users) {
             foreach ($missing_users as $user_id) {
                 ilLPStatusWrapper::_updateStatus($a_obj_id, $user_id);
             }
         }
     }
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:46,代码来源:class.ilLPStatus.php

示例11: _getCompleted

 /**
  * Get completed users
  * New handling for optional grouped assignments.
  * 
  * @param int $a_obj_id
  * @return array users
  */
 function _getCompleted($a_obj_id)
 {
     global $ilObjDataCache;
     include_once './Services/Object/classes/class.ilObjectLP.php';
     $olp = ilObjectLP::getInstance($a_obj_id);
     $collection = $olp->getCollectionInstance();
     if ($collection) {
         $grouped_items = $collection->getGroupedItemsForLPStatus();
     }
     if (!sizeof($grouped_items)) {
         // #11513 - empty collections cannot be completed
         return array();
     } else {
         // New handling for optional assignments
         $counter = 0;
         $users = array();
         foreach ($grouped_items as $grouping_id => $grouping) {
             $isGrouping = $grouping_id ? true : false;
             $grouping_completed = array();
             $grouping_completed_users_num = array();
             foreach ((array) $grouping['items'] as $item) {
                 $item_id = $ilObjDataCache->lookupObjId($item);
                 $tmp_users = ilLPStatusWrapper::_getCompleted($item_id);
                 if ($isGrouping) {
                     // Iterated through all grouped items and count the number of fullfiled items
                     foreach ($tmp_users as $tmp_user_id) {
                         ++$grouping_completed_users_num[$tmp_user_id];
                     }
                 } else {
                     if (!$counter++) {
                         $users = $tmp_users;
                     } else {
                         $users = array_intersect($users, $tmp_users);
                     }
                 }
             }
             if ($isGrouping) {
                 // Iterate through all "grouping_completed_users_num"
                 // All users with completed items greater equal than "num_obligatory" are completed
                 foreach ($grouping_completed_users_num as $tmp_user_id => $grouping_num_completed) {
                     if ($grouping_num_completed >= $grouping['num_obligatory']) {
                         $grouping_completed[] = $tmp_user_id;
                     }
                 }
                 // build intersection of users
                 if (!$counter++) {
                     $users = $grouping_completed;
                 } else {
                     $users = array_intersect($users, $grouping_completed);
                 }
             }
         }
     }
     $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 (array) $users;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.ilLPStatusCollection.php

示例12: applyProgressFilter

 /**
  * Apply progress filter
  * @param int $obj_id
  * @param array $usr_ids
  * @param array $filter
  * 
  * @return array $filtered_users
  */
 protected function applyProgressFilter($obj_id, array $usr_ids, array $filter)
 {
     include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
     $all_users = array();
     if (in_array(self::USER_FILTER_ALL, $usr_ids)) {
         $all_users = array_unique(array_merge(ilLPStatusWrapper::_getInProgress($obj_id), ilLPStatusWrapper::_getCompleted($obj_id), ilLPStatusWrapper::_getFailed($obj_id)));
     } else {
         $all_users = $usr_ids;
     }
     if (!$filter or in_array(self::PROGRESS_FILTER_ALL, $filter)) {
         $GLOBALS['log']->write(__METHOD__ . ': Deleting all progress data');
         return $all_users;
     }
     $filter_users = array();
     if (in_array(self::PROGRESS_FILTER_IN_PROGRESS, $filter)) {
         $GLOBALS['log']->write(__METHOD__ . ': Filtering  in progress.');
         $filter_users = array_merge($filter, ilLPStatusWrapper::_getInProgress($obj_id));
     }
     if (in_array(self::PROGRESS_FILTER_COMPLETED, $filter)) {
         $GLOBALS['log']->write(__METHOD__ . ': Filtering  completed.');
         $filter_users = array_merge($filter, ilLPStatusWrapper::_getCompleted($obj_id));
     }
     if (in_array(self::PROGRESS_FILTER_FAILED, $filter)) {
         $GLOBALS['log']->write(__METHOD__ . ': Filtering  failed.');
         $filter_users = array_merge($filter, ilLPStatusWrapper::_getFailed($obj_id));
     }
     // Build intersection
     return array_intersect($all_users, $filter_users);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:37,代码来源:class.ilSoapLearningProgressAdministration.php


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