33 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
34 include_once
'./Services/Tracking/classes/class.ilLPStatusWrapper.php';
65 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
68 include_once
'./Services/Object/classes/class.ilObjectLP.php';
70 $collection = $olp->getCollectionInstance();
73 foreach($collection->getItems() as $item_id)
91 $users = array_intersect(self::getMembers($a_obj_id), (array)$users);
106 global $ilObjDataCache;
108 include_once
'./Services/Object/classes/class.ilObjectLP.php';
110 $collection = $olp->getCollectionInstance();
113 $grouped_items = $collection->getGroupedItemsForLPStatus();
115 if(!
sizeof($grouped_items))
125 foreach($grouped_items as $grouping_id => $grouping)
127 $isGrouping = $grouping_id ?
true :
false;
128 $grouping_completed = array();
129 $grouping_completed_users_num = array();
130 foreach((array) $grouping[
'items'] as $item)
132 $item_id = $ilObjDataCache->lookupObjId($item);
137 foreach($tmp_users as $tmp_user_id)
139 ++$grouping_completed_users_num[$tmp_user_id];
150 $users = array_intersect($users,$tmp_users);
158 foreach($grouping_completed_users_num as $tmp_user_id => $grouping_num_completed)
160 if($grouping_num_completed >= $grouping[
'num_obligatory'])
162 $grouping_completed[] = $tmp_user_id;
169 $users = $grouping_completed;
173 $users = array_intersect($users,$grouping_completed);
184 $users = array_intersect(self::getMembers($a_obj_id), (array)$users);
187 return (array) $users;
192 global $ilObjDataCache;
196 include_once
'./Services/Object/classes/class.ilObjectLP.php';
198 $collection = $olp->getCollectionInstance();
201 foreach($collection->getGroupedItemsForLPStatus() as $grouping_id => $grouping)
203 $isGrouping = $grouping_id ?
true :
false;
205 $gr_failed = array();
206 $gr_failed_users_num = array();
208 foreach((array) $grouping[
'items'] as $item)
210 $item_id = $ilObjDataCache->lookupObjId($item);
215 foreach($tmp_users as $tmp_user_id)
217 ++$gr_failed_users_num[$tmp_user_id];
223 $gr_failed = array_merge($gr_failed,$tmp_users);
229 $allowed_failed = count($grouping[
'items']) - $grouping[
'num_obligatory'];
231 foreach($gr_failed_users_num as $tmp_user_id => $num_failed)
233 if($num_failed > $allowed_failed)
235 $gr_failed[] = $tmp_user_id;
240 $users = array_unique(array_merge($users, $gr_failed));
247 $users = array_intersect(self::getMembers($a_obj_id), (array)$users);
250 return array_unique($users);
255 $status_info = array();
257 include_once
'./Services/Object/classes/class.ilObjectLP.php';
259 $collection = $olp->getCollectionInstance();
262 $status_info[
'collections'] = $collection->getItems();
263 $status_info[
'num_collections'] = count($status_info[
'collections']);
271 global $ilObjDataCache;
273 if($ilObjDataCache->lookupType($a_obj_id) ==
'sahs')
280 foreach($status_info[
'collections'] as $item)
297 global $ilObjDataCache;
299 $status[
'completed'] =
true;
300 $status[
'failed'] =
false;
301 $status[
'in_progress'] =
false;
303 switch ($ilObjDataCache->lookupType($a_obj_id))
308 include_once
"./Services/Tracking/classes/class.ilChangeEvent.php";
311 $status[
'in_progress'] =
true;
314 include_once
'./Services/Object/classes/class.ilObjectLP.php';
316 $collection = $olp->getCollectionInstance();
319 $grouped_items = $collection->getGroupedItemsForLPStatus();
321 if(!
sizeof($grouped_items))
324 $status[
'completed'] =
false;
328 foreach($grouped_items as $grouping_id => $grouping)
330 $isGrouping = $grouping_id ?
true :
false;
335 if($status[
'completed'])
339 if($status[
'failed'])
343 if($status[
'in_progress'])
363 global $ilObjDataCache;
365 $items = $gr_info[
'items'];
368 $max_allowed_failed = count($items) - $gr_info[
'num_obligatory'];
369 $required_completed = $gr_info[
'num_obligatory'];
373 $max_allowed_failed = 0;
374 $required_completed = count($items);
381 foreach($items as $item_id)
383 $item_id = $ilObjDataCache->lookupObjId($item_id);
386 if($gr_status == self::LP_STATUS_FAILED_NUM)
388 if(++$num_failed > $max_allowed_failed)
390 $status[
'failed'] =
true;
391 $status[
'completed'] =
false;
395 if($gr_status == self::LP_STATUS_COMPLETED_NUM)
397 if(++$num_completed >= $required_completed)
404 $status[
'completed'] =
false;
415 global $ilObjDataCache, $tree;
417 switch($ilObjDataCache->lookupType($a_obj_id))
420 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
422 return $member_obj->getMembers();
425 include_once
'Modules/Group/classes/class.ilGroupParticipants.php';
427 return $member_obj->getMembers();
431 $folder_ref_id = current($folder_ref_ids);
432 if($crs_id = $tree->checkForParentType($folder_ref_id,
'crs'))
434 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
436 return $member_obj->getMembers();