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.ilLPCollectionCache.php';
66 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
85 $users = array_intersect(self::getMembers($a_obj_id), (array)$users);
100 global $ilObjDataCache;
102 include_once
'./Services/Tracking/classes/class.ilLPCollectionCache.php';
109 $isGrouping = $grouping_id ?
true :
false;
110 $grouping_completed = array();
111 $grouping_completed_users_num = array();
112 foreach((array) $grouping[
'items'] as $item)
114 $item_id = $ilObjDataCache->lookupObjId($item);
119 foreach($tmp_users as $tmp_user_id)
121 ++$grouping_completed_users_num[$tmp_user_id];
132 $users = array_intersect($users,$tmp_users);
140 foreach($grouping_completed_users_num as $tmp_user_id => $grouping_num_completed)
142 if($grouping_num_completed >= $grouping[
'num_obligatory'])
144 $grouping_completed[] = $tmp_user_id;
151 $users = $grouping_completed;
155 $users = array_intersect($users,$grouping_completed);
165 $users = array_intersect(self::getMembers($a_obj_id), (array)$users);
168 return (array) $users;
173 global $ilObjDataCache;
175 include_once
'./Services/Tracking/classes/class.ilLPCollectionCache.php';
180 $isGrouping = $grouping_id ?
true :
false;
182 $gr_failed = array();
183 $gr_failed_users_num = array();
185 foreach((array) $grouping[
'items'] as $item)
187 $item_id = $ilObjDataCache->lookupObjId($item);
192 foreach($tmp_users as $tmp_user_id)
194 ++$gr_failed_users_num[$tmp_user_id];
200 $gr_failed = array_merge($gr_failed,$tmp_users);
206 $allowed_failed = count($grouping[
'items']) - $grouping[
'num_obligatory'];
208 foreach($gr_failed_users_num as $tmp_user_id => $num_failed)
210 if($num_failed > $allowed_failed)
212 $gr_failed[] = $tmp_user_id;
217 $users = array_unique(array_merge($users, $gr_failed));
223 $users = array_intersect(self::getMembers($a_obj_id), (array)$users);
226 return array_unique($users);
231 include_once
'./Services/Tracking/classes/class.ilLPCollectionCache.php';
233 $status_info = array();
235 $status_info[
'num_collections'] = count($status_info[
'collections']);
241 global $ilObjDataCache;
243 if($ilObjDataCache->lookupType($a_obj_id) ==
'sahs')
250 foreach($status_info[
'collections'] as $item)
267 global $ilObjDataCache;
269 $status[
'completed'] =
true;
270 $status[
'failed'] =
false;
271 $status[
'in_progress'] =
false;
272 $status[
'not_attempted'] =
true;
274 switch ($ilObjDataCache->lookupType($a_obj_id))
279 include_once
"./Services/Tracking/classes/class.ilChangeEvent.php";
282 $status[
'in_progress'] =
true;
285 include_once
'./Services/Tracking/classes/class.ilLPCollectionCache.php';
288 $isGrouping = $grouping_id ?
true :
false;
291 if($status[
'completed'])
295 if($status[
'failed'])
299 if($status[
'in_progress'])
319 global $ilObjDataCache;
321 $items = $gr_info[
'items'];
324 $max_allowed_failed = count($items) - $gr_info[
'num_obligatory'];
325 $required_completed = $gr_info[
'num_obligatory'];
329 $max_allowed_failed = 0;
330 $required_completed = count($items);
337 include_once(
"./Services/Tracking/classes/class.ilLPCollectionCache.php");
338 foreach($items as $item_id)
340 $item_id = $ilObjDataCache->lookupObjId($item_id);
345 if(++$num_failed > $max_allowed_failed)
347 $status[
'failed'] =
true;
348 $status[
'completed'] =
false;
354 if(++$num_completed >= $required_completed)
361 $status[
'completed'] =
false;
372 global $ilObjDataCache, $tree;
374 switch($ilObjDataCache->lookupType($a_obj_id))
377 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
379 return $member_obj->getMembers();
382 include_once
'Modules/Group/classes/class.ilGroupParticipants.php';
384 return $member_obj->getMembers();
388 $folder_ref_id = current($folder_ref_ids);
389 if($crs_id = $tree->checkForParentType($folder_ref_id,
'crs'))
391 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
393 return $member_obj->getMembers();