20 $obj_ids = array_keys($obj_refs);
21 self::refreshObjectsStatus($obj_ids, array($a_user_id));
23 include_once
"Services/Object/classes/class.ilObjectLP.php";
24 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
27 include_once
'Modules/Course/classes/class.ilObjCourse.php';
28 $view_modes = array();
29 $query =
"SELECT obj_id, view_mode FROM crs_settings".
30 " WHERE ".$ilDB->in(
"obj_id", $obj_ids ,
false,
"integer");
31 $set = $ilDB->query(
$query);
32 while($rec = $ilDB->fetchAssoc($set))
34 $view_modes[(int)$rec[
"obj_id"]] = (
int)$rec[
"view_mode"];
37 $sessions = self::getSessionData($a_user_id, $obj_ids);
39 $query =
"SELECT object_data.obj_id, title, CASE WHEN status IS NULL THEN ".ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM.
" ELSE status END AS status,".
40 " status_changed, percentage, read_count+childs_read_count AS read_count, spent_seconds+childs_spent_seconds AS spent_seconds,".
41 " u_mode, type, visits, mark, u_comment".
43 " LEFT JOIN ut_lp_settings ON (ut_lp_settings.obj_id = object_data.obj_id)".
44 " LEFT JOIN read_event ON (read_event.obj_id = object_data.obj_id AND read_event.usr_id = ".$ilDB->quote($a_user_id,
"integer").
")".
45 " LEFT JOIN ut_lp_marks ON (ut_lp_marks.obj_id = object_data.obj_id AND ut_lp_marks.usr_id = ".$ilDB->quote($a_user_id,
"integer").
")".
47 " WHERE ".$ilDB->in(
"object_data.obj_id", $obj_ids,
false,
"integer").
49 $set = $ilDB->query(
$query);
51 while($rec = $ilDB->fetchAssoc($set))
53 $rec[
"comment"] = $rec[
"u_comment"];
54 unset($rec[
"u_comment"]);
56 $rec[
"ref_ids"] = $obj_refs[(int)$rec[
"obj_id"]];
57 $rec[
"status"] = (int)$rec[
"status"];
58 $rec[
"percentage"] = (int)$rec[
"percentage"];
59 $rec[
"read_count"] = (int)$rec[
"read_count"];
60 $rec[
"spent_seconds"] = (int)$rec[
"spent_seconds"];
61 $rec[
"u_mode"] = (int)$rec[
"u_mode"];
63 if($rec[
"type"] ==
"sess")
65 $session = $sessions[$rec[
"obj_id"]];
66 $rec[
"title"] = $session[
"title"];
75 else if(!$rec[
"u_mode"])
78 $rec[
"u_mode"] = $olp->getCurrentMode();
95 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
98 $query =
"SELECT crs_id, crs_objectives.objective_id AS obj_id, title,".$ilDB->quote(
"lobj",
"text").
" AS type".
99 " FROM crs_objectives".
100 " WHERE ".$ilDB->in(
"crs_objectives.objective_id", $a_objective_ids,
false,
"integer").
101 " AND active = ".$ilDB->quote(1,
"integer").
102 " ORDER BY position";
103 $set = $ilDB->query(
$query);
105 while($rec = $ilDB->fetchAssoc($set))
107 if(array_key_exists($rec[
"obj_id"], $lo_lp_status))
109 $rec[
"status"] = $lo_lp_status[$rec[
"obj_id"]];
123 self::refreshObjectsStatus(array($a_parent_obj_id), array($a_user_id));
126 $scores_raw = $scores = array();
127 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
134 include_once
'./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
136 $scores_raw = $module->getTrackingDataAgg($a_user_id);
140 include_once
'./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php';
142 $scores_raw = $module->getTrackingDataAgg($a_user_id);
147 foreach($scores_raw as $item)
149 $scores[$item[
"sco_id"]] = $item[
"score"];
155 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
159 foreach($a_sco_ids as $sco_id)
162 if(in_array($a_user_id, $status_info[
"failed"][$sco_id]))
166 elseif(in_array($a_user_id, $status_info[
"completed"][$sco_id]))
170 elseif(in_array($a_user_id, $status_info[
"in_progress"][$sco_id]))
179 $items[$sco_id] = array(
180 "title" => $status_info[
"scos_title"][$sco_id],
183 "score" => (
int)$scores[$sco_id]
192 self::refreshObjectsStatus(array($a_parent_obj_id), array($a_user_id));
198 include_once
'./Services/Object/classes/class.ilObjectLP.php';
200 $collection = $olp->getCollectionInstance();
205 $item_data = $collection->getPossibleItems(
$ref_id);
213 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
217 foreach($a_item_ids as $item_id)
219 if(!isset($item_data[$item_id]))
224 if(in_array($a_user_id, $status_info[
"completed"][$item_id]))
228 elseif(in_array($a_user_id, $status_info[
"in_progress"][$item_id]))
237 $items[$item_id] = array(
238 "title" => $item_data[$item_id][
"title"],
240 "type" => self::getSubItemType($a_parent_obj_id)
262 $a_offset = 0, $a_limit = 9999, array $a_filters = NULL, array $a_additional_fields = NULL,
263 $check_agreement =
false, $privacy_fields = NULL)
267 $fields = array(
"usr_data.usr_id",
"login",
"active");
268 $udf = self::buildColumns($fields, $a_additional_fields);
271 $where[] =
"usr_data.usr_id <> ".$ilDB->quote(ANONYMOUS_USER_ID,
"integer");
275 $a_users = self::getParticipantsForObject($a_ref_id);
278 self::refreshObjectsStatus(array($obj_id), $a_users);
280 if (is_array($a_users))
283 $where[] = $ilDB->in(
"usr_data.usr_id", $a_users,
false,
"integer");
286 $query =
" FROM usr_data ".$left.
" JOIN read_event ON (read_event.usr_id = usr_data.usr_id".
287 " AND read_event.obj_id = ".$ilDB->quote($obj_id,
"integer").
")".
288 " LEFT JOIN ut_lp_marks ON (ut_lp_marks.usr_id = usr_data.usr_id ".
289 " AND ut_lp_marks.obj_id = ".$ilDB->quote($obj_id,
"integer").
")".
290 " LEFT JOIN usr_pref ON (usr_pref.usr_id = usr_data.usr_id AND keyword = ".$ilDB->quote(
"language",
"text").
")".
291 self::buildFilters($where, $a_filters);
293 $queries = array(array(
"fields"=>$fields,
"query"=>
$query));
296 if($a_order_field ==
"language")
298 $a_order_field =
"usr_pref.value";
305 $a_order_field =
"login";
307 else if(substr($a_order_field, 0, 4) ==
"udf_")
309 $udf_order = $a_order_field;
310 $a_order_field = null;
313 $result = self::executeQueries($queries, $a_order_field, $a_order_dir, $a_offset, $a_limit);
315 self::getUDFAndHandlePrivacy(
$result, $udf, $check_agreement, $privacy_fields, $a_filters);
321 include_once
"Services/Utilities/classes/class.ilStr.php";
323 $udf_order, $a_order_dir);
339 $a_check_agreement = null, array $a_privacy_fields = null, array $a_filters = null)
343 if(!$a_result[
"cnt"])
350 $query =
"SELECT usr_id, field_id, value FROM udf_text WHERE ".$ilDB->in(
"field_id", $a_udf,
false,
"integer");
351 $set = $ilDB->query(
$query);
353 while(
$row = $ilDB->fetchAssoc($set))
355 $udf[
$row[
"usr_id"]][
"udf_".$row[
"field_id"]] =
$row[
"value"];
360 if($a_check_agreement)
363 include_once
"Services/Membership/classes/class.ilMemberAgreement.php";
367 $query =
"SELECT usr_id FROM usr_pref WHERE keyword = ".$ilDB->quote(
"public_profile",
"text").
368 " AND value = ".$ilDB->quote(
"y",
"text").
" OR value = ".$ilDB->quote(
"g",
"text");
369 $set = $ilDB->query(
$query);
370 $all_public = array();
371 while(
$row = $ilDB->fetchAssoc($set))
373 $all_public[] =
$row[
"usr_id"];
375 $query =
"SELECT usr_id,keyword FROM usr_pref WHERE ".$ilDB->like(
"keyword",
"text",
"public_%",
false).
376 " AND value = ".$ilDB->quote(
"y",
"text").
" AND ".$ilDB->in(
"usr_id", $all_public,
"",
"integer");
377 $set = $ilDB->query(
$query);
379 while(
$row = $ilDB->fetchAssoc($set))
381 $public[
$row[
"usr_id"]][] = substr($row[
"keyword"], 7);
386 foreach($a_result[
"set"] as $idx =>
$row)
389 if(isset($udf[
$row[
"usr_id"]]))
391 $a_result[
"set"][$idx] = $row = array_merge($row, $udf[$row[
"usr_id"]]);
395 if(
sizeof($a_privacy_fields) && $a_check_agreement && !in_array($row[
"usr_id"], $agreements))
397 foreach($a_privacy_fields as $field)
400 if(isset($row[$field]) && (!isset($public[$row[
"usr_id"]]) ||
401 !in_array($field, $public[$row[
"usr_id"]])))
404 if(isset($a_filters[$field]))
407 foreach(array_keys($row) as $col_id)
409 $a_result[
"set"][$idx][$col_id] = null;
411 $a_result[
"set"][$idx][
"privacy_conflict"] =
true;
418 $a_result[
"set"][$idx][$field] =
false;
443 static function getObjectsDataForUser($a_user_id, $a_parent_obj_id, $a_parent_ref_id, $a_order_field =
"", $a_order_dir =
"", $a_offset = 0, $a_limit = 9999,
444 array $a_filters = NULL, array $a_additional_fields = NULL, $use_collection =
true)
448 $fields = array(
"object_data.obj_id",
"title",
"type");
449 self::buildColumns($fields, $a_additional_fields);
451 $objects = self::getObjectIds($a_parent_obj_id, $a_parent_ref_id, $use_collection,
true, array($a_user_id));
453 $query =
" FROM object_data LEFT JOIN read_event ON (object_data.obj_id = read_event.obj_id AND".
454 " read_event.usr_id = ".$ilDB->quote($a_user_id,
"integer").
")".
455 " LEFT JOIN ut_lp_marks ON (ut_lp_marks.usr_id = ".$ilDB->quote($a_user_id,
"integer").
" AND".
456 " ut_lp_marks.obj_id = object_data.obj_id)".
457 " WHERE ".$ilDB->in(
"object_data.obj_id", $objects[
"object_ids"],
false,
"integer").
458 self::buildFilters(array(), $a_filters);
461 $queries[] = array(
"fields"=>$fields,
"query"=>
$query);
509 if(!in_array($a_order_field, $fields))
511 $a_order_field =
"title";
514 $result = self::executeQueries($queries, $a_order_field, $a_order_dir, $a_offset, $a_limit);
518 $sessions = self::getSessionData($a_user_id, $objects[
"object_ids"]);
520 foreach(
$result[
"set"] as $idx => $item)
522 if($item[
"type"] ==
"sess")
524 $session = $sessions[$item[
"obj_id"]];
525 $result[
"set"][$idx][
"title"] = $session[
"title"];
526 $result[
"set"][$idx][
"sort_title"] = $session[
"e_start"];
530 $result[
"set"][$idx][
"ref_id"] = $objects[
"ref_ids"][$item[
"obj_id"]];
534 if($objects[
"scorm"])
536 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
538 if($subtype ==
"scorm2004")
540 include_once(
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
542 $scos_tracking = $sobj->getTrackingDataAgg($a_user_id,
true);
546 include_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
548 $scos_tracking = array();
549 foreach($sobj->getTrackingDataAgg($a_user_id) as $item)
554 $time = explode(
":", $item[
"time"]);
555 $item[
"time"] = $time[0]*60*60+$time[1]*60+$time[2];
557 $scos_tracking[$item[
"sco_id"]] = array(
"session_time"=>$item[
"time"]);
561 foreach($objects[
"scorm"][
"scos"] as $sco)
563 $row = array(
"title" => $objects[
"scorm"][
"scos_title"][$sco],
567 if(in_array($a_user_id, $objects[
"scorm"][
"completed"][$sco]))
571 else if(in_array($a_user_id, $objects[
"scorm"][
"failed"][$sco]))
575 else if(in_array($a_user_id, $objects[
"scorm"][
"in_progress"][$sco]))
579 $row[
"status"] = $status;
582 if(isset($scos_tracking[$sco]))
584 if(isset($scos_tracking[$sco][
"last_access"]))
589 $row[
"spent_seconds"] = $scos_tracking[$sco][
"session_time"];
598 if($objects[
"objectives_parent_id"])
600 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
601 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
603 foreach(self::getObjectivesStatusForUser($a_user_id, $objects[
"objectives_parent_id"], $objtv_ids) as $item)
611 if($objects[
"subitems"])
613 $sub_type = self::getSubItemType($a_parent_obj_id);
614 foreach($objects[
"subitems"][
"items"] as $item_id)
616 $row = array(
"title" => $objects[
"subitems"][
"item_titles"][$item_id],
617 "type" => $sub_type);
620 if(in_array($a_user_id, $objects[
"subitems"][
"completed"][$item_id]))
624 $row[
"status"] = $status;
662 $query =
"SELECT obj_id, title, e_start, e_end, CASE WHEN participated = 1 THEN 2 WHEN registered = 1 THEN 1 ELSE NULL END AS status,".
665 " JOIN event_appointment ON (event.obj_id = event_appointment.event_id)".
666 " LEFT JOIN event_participants ON (event_participants.event_id = event.obj_id AND usr_id = ".$ilDB->quote($a_user_id,
"integer").
")".
667 " WHERE ".$ilDB->in(
"obj_id", $obj_ids ,
false,
"integer");
668 $set = $ilDB->query(
$query);
670 while($rec = $ilDB->fetchAssoc($set))
672 $rec[
"comment"] = $rec[
"e_comment"];
673 unset($rec[
"e_comment"]);
681 $rec[
"title"] = $date.
': '.$rec[
"title"];
685 $rec[
"title"] = $date;
687 $sessions[$rec[
"obj_id"]] = $rec;
708 static function getObjectsSummaryForObject($a_parent_obj_id, $a_parent_ref_id, $a_order_field =
"", $a_order_dir =
"", $a_offset = 0, $a_limit = 9999,
709 array $a_filters = NULL, array $a_additional_fields = NULL, $a_preselected_obj_ids = NULL)
714 self::buildColumns($fields, $a_additional_fields,
true);
717 if($a_preselected_obj_ids === NULL)
719 $objects = self::getObjectIds($a_parent_obj_id, $a_parent_ref_id,
false,
false);
723 foreach($a_preselected_obj_ids as $obj_id => $ref_ids)
725 $objects[
"object_ids"][] = $obj_id;
726 $objects[
"ref_ids"][$obj_id] = array_pop($ref_ids);
734 $set = $ilDB->query(
"SELECT obj_id,title,type FROM object_data".
735 " WHERE ".$ilDB->in(
"obj_id", $objects[
"object_ids"],
false,
"integer"));
736 while($rec = $ilDB->fetchAssoc($set))
738 $object_data[$rec[
"obj_id"]] = $rec;
739 if($a_preselected_obj_ids)
741 $object_data[$rec[
"obj_id"]][
"ref_ids"] = $a_preselected_obj_ids[$rec[
"obj_id"]];
745 $object_data[$rec[
"obj_id"]][
"ref_ids"] = array($objects[
"ref_ids"][$rec[
"obj_id"]]);
749 foreach($objects[
"ref_ids"] as $object_id =>
$ref_id)
751 $object_result = self::getSummaryDataForObject(
$ref_id, $fields, $a_filters);
752 if(
sizeof($object_result))
754 if($object_data[$object_id])
756 $result[] = array_merge($object_data[$object_id], $object_result);
762 if($objects[
"objectives_parent_id"])
784 $where[] =
"usr_data.usr_id <> ".$ilDB->quote(ANONYMOUS_USER_ID,
"integer");
787 $a_users = self::getParticipantsForObject($a_ref_id);
789 if (is_array($a_users))
792 $where[] = $ilDB->in(
"usr_data.usr_id", $a_users,
false,
"integer");
796 self::refreshObjectsStatus(array($obj_id), $a_users);
798 $query =
" FROM usr_data ".$left.
" JOIN read_event ON (read_event.usr_id = usr_data.usr_id".
799 " AND obj_id = ".$ilDB->quote($obj_id,
"integer").
")".
800 " LEFT JOIN ut_lp_marks ON (ut_lp_marks.usr_id = usr_data.usr_id ".
801 " AND ut_lp_marks.obj_id = ".$ilDB->quote($obj_id,
"integer").
")".
802 " LEFT JOIN usr_pref ON (usr_pref.usr_id = usr_data.usr_id AND keyword = ".$ilDB->quote(
"language",
"text").
")".
803 self::buildFilters($where, $a_filters,
true);
805 $fields[] =
'COUNT(usr_data.usr_id) AS user_count';
808 $queries[] = array(
"fields"=>$fields,
"query"=>
$query,
"count"=>
"*");
810 $result = self::executeQueries($queries);
812 $users_no =
$result[
"user_count"];
819 else if(isset($a_filters[
"user_total"]))
821 if($a_filters[
"user_total"][
"from"] && $users_no < $a_filters[
"user_total"][
"from"])
825 else if($a_filters[
"user_total"][
"to"] && $users_no > $a_filters[
"user_total"][
"to"])
833 $result[
"country"] = self::getSummaryPercentages(
"country",
$query);
834 $result[
"sel_country"] = self::getSummaryPercentages(
"sel_country",
$query);
835 $result[
"city"] = self::getSummaryPercentages(
"city",
$query);
836 $result[
"gender"] = self::getSummaryPercentages(
"gender",
$query);
837 $result[
"language"] = self::getSummaryPercentages(
"usr_pref.value",
$query,
"language");
838 $result[
"status"] = self::getSummaryPercentages(
"status",
$query);
839 $result[
"mark"] = self::getSummaryPercentages(
"mark",
$query);
848 $result[
"user_total"] = $users_no;
868 $field_alias = $field;
872 $field_alias = $alias;
873 $alias =
" AS ".$alias;
878 if(preg_match(
"/".preg_quote(
" [[--HAVING").
"(.+)".preg_quote(
"HAVING--]]").
"/", $base_query, $hits))
880 $having =
" HAVING ".$hits[1];
881 $base_query = str_replace($hits[0],
"", $base_query);
884 $query =
"SELECT COUNT(*) AS counter, ".$field.$alias.
" ".$base_query.
" GROUP BY ".$field.$having.
" ORDER BY counter DESC";
885 $set = $ilDB->query(
$query);
887 while($rec = $ilDB->fetchAssoc($set))
889 $result[$rec[$field_alias]] = (int)$rec[
"counter"];
911 include_once
"Modules/Course/classes/class.ilCourseParticipants.php";
913 return $member_obj->getMembers();
916 include_once
"Modules/Group/classes/class.ilGroupParticipants.php";
918 return $member_obj->getMembers();
922 $path = $tree->getPathId($a_ref_id);
924 foreach(array_reverse(
$path) as $path_ref_id)
927 if($type ==
"crs" || $type ==
"grp")
929 return self::getParticipantsForObject($path_ref_id);
941 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
943 if ($subtype ==
"scorm2004")
946 include_once(
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
948 $all = $mod->getTrackedUsers(
"");
952 foreach($all as $item)
954 $a_users[] = $item[
"user_id"];
960 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
966 include_once(
"./Modules/Exercise/classes/class.ilExerciseMembers.php");
967 include_once(
"./Modules/Exercise/classes/class.ilObjExercise.php");
970 $a_users = $members->getMembers();
974 include_once
"Services/Tracking/classes/class.ilLPStatusFactory.php";
976 $a_users = $class::getParticipants($obj_id);
980 include_once
"Services/Tracking/classes/class.ilLPStatusFactory.php";
982 $a_users = $class::getParticipants($obj_id);
986 include_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php");
988 $a_users = $prg->getIdsOfUsersWithRelevantProgress();
1007 static protected function buildFilters(array $where, array $a_filters = NULL, $a_aggregate =
false)
1013 if(
sizeof($a_filters))
1015 foreach($a_filters as $id => $value)
1026 case "matriculation":
1030 $where[] = $ilDB->like(
"usr_data.".$id,
"text",
"%".$value.
"%");
1036 $where[] =
"usr_data.".$id.
" = ".$ilDB->quote($value ,
"text");
1040 $where[] = $ilDB->like(
"ut_lp_marks.".$id,
"text",
"%".$value.
"%");
1048 " OR ut_lp_marks.status IS NULL)";
1054 $where[] =
"ut_lp_marks.".$id.
" = ".$ilDB->quote($value ,
"text");
1062 $where[] =
"ut_lp_marks.".$id.
" >= ".$ilDB->quote($value[
"from"] ,
"integer");
1066 $where[] =
"(ut_lp_marks.".$id.
" <= ".$ilDB->quote($value[
"to"] ,
"integer").
1067 " OR ut_lp_marks.".$id.
" IS NULL)";
1074 $having[] =
"ROUND(AVG(ut_lp_marks.".$id.
")) >= ".$ilDB->quote($value[
"from"] ,
"integer");
1078 $having[] =
"ROUND(AVG(ut_lp_marks.".$id.
")) <= ".$ilDB->quote($value[
"to"] ,
"integer");
1084 $where[] =
"usr_pref.value = ".$ilDB->quote($value ,
"text");
1091 $value[
"from"] = substr($value[
"from"], 0, -2).
"00";
1093 $value[
"from"] = $value[
"from"]->get(
IL_CAL_UNIX);
1097 if(strlen($value[
"to"]) == 19)
1099 $value[
"to"] = substr($value[
"to"], 0, -2).
"59";
1106 case 'status_changed':
1109 case "registration":
1110 if($id ==
"registration")
1112 $id =
"create_date";
1117 case "first_access":
1121 $where[] = $id.
" >= ".$ilDB->quote($value[
"from"] ,
"date");
1125 if(strlen($value[
"to"]) == 19)
1127 $value[
"to"] = substr($value[
"to"], 0, -2).
"59";
1129 $where[] = $id.
" <= ".$ilDB->quote($value[
"to"] ,
"date");
1138 $where[] =
"(read_event.".$id.
"+read_event.childs_".$id.
") >= ".$ilDB->quote($value[
"from"] ,
"integer");
1142 $where[] =
"((read_event.".$id.
"+read_event.childs_".$id.
") <= ".$ilDB->quote($value[
"to"] ,
"integer").
1143 " OR (read_event.".$id.
"+read_event.childs_".$id.
") IS NULL)";
1150 $having[] =
"SUM(read_event.".$id.
"+read_event.childs_".$id.
") >= ".$ilDB->quote($value[
"from"] ,
"integer");
1154 $having[] =
"SUM(read_event.".$id.
"+read_event.childs_".$id.
") <= ".$ilDB->quote($value[
"to"] ,
"integer");
1159 case "spent_seconds":
1164 $where[] =
"(read_event.".$id.
"+read_event.childs_".$id.
") >= ".$ilDB->quote($value[
"from"] ,
"integer");
1168 $where[] =
"((read_event.".$id.
"+read_event.childs_".$id.
") <= ".$ilDB->quote($value[
"to"] ,
"integer").
1169 " OR (read_event.".$id.
"+read_event.childs_".$id.
") IS NULL)";
1176 $having[] =
"ROUND(AVG(read_event.".$id.
"+read_event.childs_".$id.
")) >= ".$ilDB->quote($value[
"from"] ,
"integer");
1180 $having[] =
"ROUND(AVG(read_event.".$id.
"+read_event.childs_".$id.
")) <= ".$ilDB->quote($value[
"to"] ,
"integer");
1195 $sql .=
" WHERE ".implode(
" AND ", $where);
1200 $sql .=
" [[--HAVING ".implode(
" AND ", $having).
"HAVING--]]";
1214 static protected function buildColumns(array &$a_fields, array $a_additional_fields = NULL, $a_aggregate =
false)
1216 if(
sizeof($a_additional_fields))
1219 foreach($a_additional_fields as $field)
1221 if(substr($field, 0, 4) !=
"udf_")
1226 $pos = strrpos($field,
"_");
1231 $function = strtoupper(substr($field, $pos+1));
1232 $field = substr($field, 0, $pos);
1233 if(!in_array($function, array(
"MIN",
"MAX",
"SUM",
"AVG",
"COUNT")))
1244 $a_fields[] = $function.
"(value) ".$field.
"_".strtolower($function);
1248 $a_fields[] =
"value ".$field;
1253 case "spent_seconds":
1256 $a_fields[] =
"(".$field.
"+childs_".$field.
") ".$field;
1260 if($function ==
"AVG")
1262 $a_fields[] =
"ROUND(AVG(".$field.
"+childs_".$field.
"), 2) ".$field.
"_".strtolower($function);
1266 $a_fields[] = $function.
"(".$field.
"+childs_".$field.
") ".$field.
"_".strtolower($function);
1271 case "read_count_spent_seconds":
1272 if($function ==
"AVG")
1274 $a_fields[] =
"ROUND(AVG((spent_seconds+childs_spent_seconds)/(read_count+childs_read_count)), 2) ".$field.
"_".strtolower($function);
1281 if($function ==
"AVG")
1283 $a_fields[] =
"ROUND(AVG(".$field.
"), 2) ".$field.
"_".strtolower($function);
1287 $a_fields[] = $function.
"(".$field.
") ".$field.
"_".strtolower($function);
1292 $a_fields[] = $field;
1299 $udf[] = substr($field, 4);
1304 $a_fields = array_unique($a_fields);
1307 $udf = array_unique($udf);
1324 static public function getObjectIds($a_parent_obj_id, $a_parent_ref_id =
false, $use_collection =
true, $a_refresh_status =
true, $a_user_ids = null)
1326 include_once
"Services/Object/classes/class.ilObjectLP.php";
1328 $object_ids = array($a_parent_obj_id);
1329 $ref_ids = array($a_parent_obj_id => $a_parent_ref_id);
1330 $objectives_parent_id = $scorm = $subitems =
false;
1333 $mode = $olp->getCurrentMode();
1338 include_once
"Services/Tracking/classes/class.ilLPStatusFactory.php";
1340 $scorm = $status_scorm->_getStatusInfo($a_parent_obj_id);
1346 $objectives_parent_id = $a_parent_obj_id;
1353 include_once
"Services/Tracking/classes/class.ilLPStatusFactory.php";
1355 $subitems = $status_coll_tlt->_getStatusInfo($a_parent_obj_id);
1362 $collection = $olp->getCollectionInstance();
1365 foreach($collection->getItems() as $child_ref_id)
1368 $object_ids[] = $child_id;
1369 $ref_ids[$child_id] = $child_ref_id;
1376 self::getSubTree($a_parent_ref_id, $object_ids, $ref_ids);
1377 $object_ids = array_unique($object_ids);
1380 foreach($object_ids as $idx => $object_id)
1384 unset($object_ids[$idx]);
1390 if($a_refresh_status)
1392 self::refreshObjectsStatus($object_ids, $a_user_ids);
1395 return array(
"object_ids" => $object_ids,
1396 "ref_ids" => $ref_ids,
1397 "objectives_parent_id" => $objectives_parent_id,
1399 "subitems" => $subitems);
1409 static protected function getSubTree($a_parent_ref_id, array &$a_object_ids, array &$a_ref_ids)
1413 $children = $tree->getChilds($a_parent_ref_id);
1416 foreach($children as $child)
1418 if($child[
"type"] ==
"adm" || $child[
"type"] ==
"rolf")
1427 $cmode = $olp->getCurrentMode();
1444 $a_object_ids[] = $child[
"obj_id"];
1445 $a_ref_ids[$child[
"obj_id"]] = $child[
"ref_id"];
1448 self::getSubTree($child[
"ref_id"], $a_object_ids, $a_ref_ids);
1463 static function executeQueries(array $queries, $a_order_field =
"", $a_order_dir =
"", $a_offset = 0, $a_limit = 9999)
1468 $subqueries = array();
1469 foreach($queries as $item)
1472 $item = str_replace(
"[[--HAVING",
"HAVING", $item);
1473 $item = str_replace(
"HAVING--]]",
"", $item);
1475 if(!isset($item[
"count"]))
1477 $count_field = $item[
"fields"];
1478 $count_field = array_shift($count_field);
1482 $count_field = $item[
"count"];
1484 $count_query =
"SELECT COUNT(".$count_field.
") AS cnt".$item[
"query"];
1485 $set = $ilDB->query($count_query);
1486 if ($rec = $ilDB->fetchAssoc($set))
1488 $cnt += $rec[
"cnt"];
1491 $subqueries[] =
"SELECT ".implode(
",", $item[
"fields"]).$item[
"query"];
1498 if(
sizeof($subqueries) > 1)
1500 $base = array_shift($subqueries);
1501 $query = $base.
" UNION (".implode(
") UNION (", $subqueries).
")";
1508 if ($a_order_dir !=
"asc" && $a_order_dir !=
"desc")
1510 $a_order_dir =
"asc";
1514 $query.=
" ORDER BY ".$a_order_field.
" ".strtoupper($a_order_dir);
1517 $offset = (int) $a_offset;
1518 $limit = (int) $a_limit;
1519 $ilDB->setLimit($limit, $offset);
1521 $set = $ilDB->query(
$query);
1522 while($rec = $ilDB->fetchAssoc($set))
1528 return array(
"cnt" => $cnt,
"set" =>
$result);
1543 array $a_additional_fields = null, array $a_privacy_fields = null, $a_check_agreement = null)
1547 $result = array(
"cnt"=>0,
"set"=>NULL);
1548 if(
sizeof($a_obj_ids))
1551 $where[] =
"usr_data.usr_id <> ".$ilDB->quote(ANONYMOUS_USER_ID,
"integer");
1554 $where[] = $ilDB->like(
"usr_data.login",
"text",
"%".$a_user_filter.
"%");
1559 $a_users = self::getParticipantsForObject($a_parent_ref_id);
1560 if (is_array($a_users))
1563 $where[] = $ilDB->in(
"usr_data.usr_id", $a_users,
false,
"integer");
1567 self::refreshObjectsStatus($a_obj_ids, $a_users);
1569 $fields = array(
"usr_data.usr_id",
"login",
"active");
1570 $udf = self::buildColumns($fields, $a_additional_fields);
1572 include_once(
"./Services/Tracking/classes/class.ilLPStatus.php");
1575 $fields[] =
"percentage";
1578 foreach($a_obj_ids as $obj_id)
1581 $query =
" FROM usr_data ".$left.
" JOIN read_event ON (read_event.usr_id = usr_data.usr_id".
1582 " AND read_event.obj_id = ".$ilDB->quote($obj_id,
"integer").
")".
1583 " LEFT JOIN ut_lp_marks ON (ut_lp_marks.usr_id = usr_data.usr_id ".
1584 " AND ut_lp_marks.obj_id = ".$ilDB->quote($obj_id,
"integer").
")".
1585 " LEFT JOIN usr_pref ON (usr_pref.usr_id = usr_data.usr_id AND keyword = ".$ilDB->quote(
"language",
"text").
")".
1586 self::buildFilters($where);
1588 $raw = self::executeQueries(array(array(
"fields"=>$fields,
"query"=>
$query)),
"login");
1592 foreach($raw[
"set"] as
$row)
1594 $result[
"set"][$row[
"usr_id"]][
"login"] = $row[
"login"];
1595 $result[
"set"][$row[
"usr_id"]][
"usr_id"] = $row[
"usr_id"];
1598 $result[
"set"][$row[
"usr_id"]][
"obj_".$obj_id] = $row[
"status"];
1599 $result[
"set"][$row[
"usr_id"]][
"obj_".$obj_id.
"_perc"] = $row[
"percentage"];
1601 if($obj_id == $parent_obj_id)
1603 $result[
"set"][$row[
"usr_id"]][
"status_changed"] = $row[
"status_changed"];
1604 $result[
"set"][$row[
"usr_id"]][
"last_access"] = $row[
"last_access"];
1605 $result[
"set"][$row[
"usr_id"]][
"spent_seconds"] = $row[
"spent_seconds"];
1606 $result[
"set"][$row[
"usr_id"]][
"read_count"] = $row[
"read_count"];
1609 foreach($fields as $field)
1612 if(stristr($field,
"language"))
1614 $field =
"language";
1617 if(isset($row[$field]))
1620 if($obj_id == $parent_obj_id ||
1621 !in_array($field, array(
"mark",
"u_comment")))
1623 $result[
"set"][$row[
"usr_id"]][$field] = $row[$field];
1634 self::getUDFAndHandlePrivacy(
$result, $udf, $a_check_agreement, $a_privacy_fields, $a_additional_fields);
1643 if($a_parent_obj_id && $a_users)
1647 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
1648 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1649 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
1653 include_once
"Modules/Course/classes/Objectives/class.ilLOSettings.php";
1655 $initial_qualifying = $lo_set->isInitialTestQualifying();
1658 foreach($objective_ids as $objective_id)
1660 foreach($a_users as $user_id)
1666 $query =
"SELECT * FROM loc_user_results".
1667 " WHERE ".$ilDB->in(
"objective_id", $objective_ids,
"",
"integer").
1668 " AND ".$ilDB->in(
"user_id", $a_users,
"",
"integer");
1669 if(!(
bool)$initial_qualifying)
1673 $query .=
" ORDER BY type";
1674 $set = $ilDB->query(
$query);
1675 while(
$row = $ilDB->fetchAssoc($set))
1677 $objective_id =
$row[
"objective_id"];
1678 $user_id =
$row[
"user_id"];
1689 $res[$user_id][$objective_id] =
$row[
"is_final"]
1703 $obj_ids = array_keys($a_ref_ids);
1715 $sql =
"SELECT obj_id,".$column.
",SUM(read_count) read_count,SUM(childs_read_count) childs_read_count,".
1716 "SUM(spent_seconds) spent_seconds,SUM(childs_spent_seconds) childs_spent_seconds".
1718 " WHERE ".$ilDB->in(
"obj_id", $obj_ids,
"",
"integer").
1719 " AND yyyy = ".$ilDB->quote($a_year,
"integer");
1722 $sql .=
" AND mm = ".$ilDB->quote($a_month,
"integer");
1724 $sql .=
" GROUP BY obj_id,".$column;
1725 $set = $ilDB->query($sql);
1726 while(
$row = $ilDB->fetchAssoc($set))
1728 $row[
"read_count"] +=
$row[
"childs_read_count"];
1729 $row[
"spent_seconds"] +=
$row[
"childs_spent_seconds"];
1730 $res[
$row[
"obj_id"]][
$row[$column]][
"read_count"] += $row[
"read_count"];
1731 $res[$row[
"obj_id"]][$row[$column]][
"spent_seconds"] += $row[
"spent_seconds"];
1737 $sql =
"SELECT obj_id,".$column.
",SUM(counter) counter".
1738 " FROM obj_user_stat".
1739 " WHERE ".$ilDB->in(
"obj_id", $obj_ids,
"",
"integer").
1740 " AND yyyy = ".$ilDB->quote($a_year,
"integer");
1743 $sql .=
" AND mm = ".$ilDB->quote($a_month,
"integer");
1745 $sql .=
" GROUP BY obj_id,".$column;
1746 $set = $ilDB->query($sql);
1747 while(
$row = $ilDB->fetchAssoc($set))
1749 $res[
$row[
"obj_id"]][
$row[$column]][
"users"] += $row[
"counter"];
1757 global
$ilDB, $objDefinition;
1762 include_once
"Services/Tree/classes/class.ilTree.php";
1764 $sql =
"SELECT ".$tree->table_obj_data.
".obj_id,".$tree->table_obj_data.
".type,".
1765 $tree->table_tree.
".".$tree->tree_pk.
",".$tree->table_obj_reference.
".ref_id".
1766 " FROM ".$tree->table_tree.
1767 " ".$tree->buildJoin().
1768 " WHERE ".$ilDB->in($tree->table_obj_data.
".type", $types,
"",
"text");
1769 $set = $ilDB->query($sql);
1771 while(
$row = $ilDB->fetchAssoc($set))
1773 $res[
$row[
"type"]][
"type"] = $row[
"type"];
1774 $res[$row[
"type"]][
"references"]++;
1775 $res[$row[
"type"]][
"objects"][] = $row[
"obj_id"];
1776 if($row[$tree->tree_pk] < 0)
1778 $res[$row[
"type"]][
"deleted"]++;
1782 foreach(
$res as $type => $values)
1784 $res[$type][
"objects"] =
sizeof(array_unique($values[
"objects"]));
1794 $obj_ids = array_keys($a_ref_ids);
1797 $sql =
"SELECT obj_id,hh,SUM(read_count) read_count,SUM(childs_read_count) childs_read_count,".
1798 "SUM(spent_seconds) spent_seconds,SUM(childs_spent_seconds) childs_spent_seconds".
1800 " WHERE ".$ilDB->in(
"obj_id", $obj_ids,
"",
"integer").
1801 " AND yyyy = ".$ilDB->quote($a_year,
"integer");
1804 $sql .=
" AND mm = ".$ilDB->quote($a_month,
"integer");
1806 $sql .=
" GROUP BY obj_id,hh";
1807 $set = $ilDB->query($sql);
1808 while(
$row = $ilDB->fetchAssoc($set))
1810 $row[
"read_count"] +=
$row[
"childs_read_count"];
1811 $row[
"spent_seconds"] +=
$row[
"childs_spent_seconds"];
1813 $res[
$row[
"obj_id"]][(int)
$row[
"hh"]][
"spent_seconds"] +=
$row[
"spent_seconds"];
1822 $set = $ilDB->query(
"SELECT COUNT(*) AS COUNTER,yyyy,mm".
1824 " GROUP BY yyyy, mm".
1825 " ORDER BY yyyy DESC, mm DESC");
1827 while(
$row = $ilDB->fetchAssoc($set))
1830 "count"=>$row[
"counter"]);
1840 $date_compare = $ilDB->in($ilDB->concat(array(array(
"yyyy",
""),
1841 array($ilDB->quote(
"-",
"text"),
""),
1842 array(
"mm",
""))), $a_months,
"",
"text");
1843 $sql =
"DELETE FROM obj_stat".
1844 " WHERE ".$date_compare;
1845 $ilDB->manipulate($sql);
1848 $tables = array(
"obj_lp_stat",
"obj_type_stat",
"obj_user_stat");
1849 foreach($a_months as $month)
1851 $year = substr($month, 0, 4);
1852 $month = substr($month, 5);
1853 $from = $year.str_pad($month, 2,
"0", STR_PAD_LEFT).
"01";
1854 $to = $year.str_pad($month, 2,
"0", STR_PAD_LEFT).
"31";
1856 foreach($tables as $table)
1858 $sql =
"DELETE FROM ".$table.
1859 " WHERE fulldate >= ".$ilDB->quote($from,
"integer").
1860 " AND fulldate <= ".$ilDB->quote($to,
"integer");
1861 $ilDB->manipulate($sql);
1866 static public function searchObjects($a_type, $a_title = null, $a_root = null, $a_hidden = null, $a_preset_obj_ids = null)
1868 global
$ilDB, $tree;
1870 if($a_type ==
"lres")
1872 $a_type = array(
'lm',
'sahs',
'htlm',
'dbk');
1875 $sql =
"SELECT r.ref_id,r.obj_id".
1876 " FROM object_data o".
1877 " JOIN object_reference r ON (o.obj_id = r.obj_id)".
1878 " JOIN tree t ON (t.child = r.ref_id)".
1879 " WHERE t.tree = ".$ilDB->quote(1,
"integer");
1881 if(!is_array($a_type))
1883 $sql .=
" AND o.type = ".$ilDB->quote($a_type,
"text");
1887 $sql .=
" AND ".$ilDB->in(
"o.type", $a_type,
"",
"text");
1892 $sql .=
" AND (".$ilDB->like(
"o.title",
"text",
"%".$a_title.
"%").
1893 " OR ".$ilDB->like(
"o.description",
"text",
"%".$a_title.
"%").
")";
1896 if(is_array($a_hidden))
1898 $sql .=
" AND ".$ilDB->in(
"o.obj_id", $a_hidden,
true,
"integer");
1901 if(is_array($a_preset_obj_ids))
1903 $sql .=
" AND ".$ilDB->in(
"o.obj_id", $a_preset_obj_ids,
false,
"integer");
1906 $set = $ilDB->query($sql);
1908 while(
$row = $ilDB->fetchAssoc($set))
1910 if($a_root && $a_root != ROOT_FOLDER_ID)
1914 if($tree->isGrandChild($a_root,
$ref_id))
1916 $res[
$row[
"obj_id"]][] = $row[
"ref_id"];
1923 $res[
$row[
"obj_id"]][] = $row[
"ref_id"];
1937 include_once(
"./Services/Tracking/classes/class.ilLPStatus.php");
1938 foreach($a_obj_ids as $obj_id)
1953 $set = $ilDB->query(
"SELECT COUNT(*) counter, MIN(tstamp) tstamp".
1954 " FROM obj_stat_log");
1955 return $ilDB->fetchAssoc($set);
1968 $column =
"mm,yyyy";
1972 $sql =
"SELECT obj_id,".$column.
",".
1973 "MIN(mem_cnt) mem_cnt_min,AVG(mem_cnt) mem_cnt_avg, MAX(mem_cnt) mem_cnt_max,".
1974 "MIN(in_progress) in_progress_min,AVG(in_progress) in_progress_avg,MAX(in_progress) in_progress_max,".
1975 "MIN(completed) completed_min,AVG(completed) completed_avg,MAX(completed) completed_max,".
1976 "MIN(failed) failed_min,AVG(failed) failed_avg,MAX(failed) failed_max,".
1977 "MIN(not_attempted) not_attempted_min,AVG(not_attempted) not_attempted_avg,MAX(not_attempted) not_attempted_max".
1978 " FROM obj_lp_stat".
1979 " WHERE ".$ilDB->in(
"obj_id", $a_obj_ids,
"",
"integer").
1980 " AND yyyy = ".$ilDB->quote($a_year,
"integer");
1983 $sql .=
" AND mm = ".$ilDB->quote($a_month,
"integer");
1985 $sql .=
" GROUP BY obj_id,".$column;
1986 $set = $ilDB->query($sql);
1987 while(
$row = $ilDB->fetchAssoc($set))
2001 $a_year = date(
"Y");
2004 $agg = strtoupper($a_aggregation);
2007 $sql =
"SELECT type,yyyy,mm,".$agg.
"(cnt_objects) cnt_objects,".$agg.
"(cnt_references) cnt_references,".
2008 "".$agg.
"(cnt_deleted) cnt_deleted FROM obj_type_stat".
2009 " WHERE yyyy = ".$ilDB->quote($a_year,
"integer").
2010 " GROUP BY type,yyyy,mm";
2011 $set = $ilDB->query($sql);
2012 while(
$row = $ilDB->fetchAssoc($set))
2014 $row[
"mm"] = str_pad(
$row[
"mm"], 2,
"0", STR_PAD_LEFT);
2016 "objects" => (
int)
$row[
"cnt_objects"],
2017 "references" => (
int)$row[
"cnt_references"],
2018 "deleted" => (
int)$row[
"cnt_deleted"]
const LP_STATUS_COMPLETED_NUM
static getObjectiveStatusForLP($a_user_id, $a_obj_id, array $a_objective_ids)
static refreshObjectsStatus(array $a_obj_ids, $a_users=null)
check whether status (for all relevant users) exists
getSCOsStatusForUser($a_user_id, $a_parent_obj_id, array $a_sco_ids)
static getInstanceByObjId($a_obj_id)
get singleton instance
static getObjectLPStatistics(array $a_obj_ids, $a_year, $a_month=null, $a_group_by_day=false)
const IL_CRS_VIEW_OBJECTIVE
getObjectTypeStatistics()
static buildColumns(array &$a_fields, array $a_additional_fields=NULL, $a_aggregate=false)
Build sql from field definition.
static buildFilters(array $where, array $a_filters=NULL, $a_aggregate=false)
Build sql from filter definition.
static executeQueries(array $queries, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999)
Execute given queries, including count query.
static checkStatusForObject($a_obj_id, $a_users=false)
This function checks whether the status for a given number of users is dirty and must be recalculated...
static getObjectStatisticsMonthlySummary()
static getSummaryPercentages($field, $base_query, $alias=NULL)
Get aggregated data for field.
const LP_STATUS_NOT_ATTEMPTED
static formatPeriod(ilDateTime $start, ilDateTime $end)
Format a period of two date Shows: 14.
static getSubItemType($a_parent_obj_id)
Get sub-item object type for parent.
static deleteObjectStatistics(array $a_months)
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
const LP_STATUS_IN_PROGRESS_NUM
const LP_MODE_COLLECTION_MANUAL
static _getObjectiveIds($course_id, $a_activated_only=false)
static getUDFAndHandlePrivacy(array &$a_result, array $a_udf=null, $a_check_agreement=null, array $a_privacy_fields=null, array $a_filters=null)
Handle privacy and add udf data to (user) result data.
const LP_MODE_COLLECTION_TLT
const LP_MODE_TEST_FINISHED
static _getAllReferences($a_id)
get all reference ids of object
const LP_STATUS_IN_PROGRESS
_getStatusInfo($a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
static _lookupObjectId($a_ref_id)
lookup object id
static getObjectDailyStatistics(array $a_ref_ids, $a_year, $a_month=null)
static getSubTree($a_parent_ref_id, array &$a_object_ids, array &$a_ref_ids)
Get complete branch of tree (recursively)
_getInstance($a_obj_id, $a_mode=NULL)
static stableSortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false)
Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which h...
getObjectTypeStatisticsPerMonth($a_aggregation, $a_year=null)
static getObjectAccessStatistics(array $a_ref_ids, $a_year, $a_month=null)
static getObjectsDataForUser($a_user_id, $a_parent_obj_id, $a_parent_ref_id, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999, array $a_filters=NULL, array $a_additional_fields=NULL, $use_collection=true)
Get all object-based tracking data for user and parent object.
Class ilObjStudyProgramme.
static _lookupObjId($a_id)
_lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)
static getObjectsSummaryForObject($a_parent_obj_id, $a_parent_ref_id, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999, array $a_filters=NULL, array $a_additional_fields=NULL, $a_preselected_obj_ids=NULL)
Get all aggregated tracking data for parent object.
const LP_MODE_SURVEY_FINISHED
getObjectivesStatusForUser($a_user_id, $a_obj_id, array $a_objective_ids)
static getSessionData($a_user_id, array $obj_ids)
Get session data for given objects and user.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static _lookupType($a_id, $a_reference=false)
lookup object type
static getSummaryDataForObject($a_ref_id, array $fields, array $a_filters=NULL)
Get all aggregated tracking data for object.
static getObjectIds($a_parent_obj_id, $a_parent_ref_id=false, $use_collection=true, $a_refresh_status=true, $a_user_ids=null)
Get (sub)objects for given object, also handles learning objectives (course only) ...
static getUserObjectiveMatrix($a_parent_obj_id, $a_users)
const LP_STATUS_NOT_ATTEMPTED_NUM
static getUserDataForObject($a_ref_id, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999, array $a_filters=NULL, array $a_additional_fields=NULL, $check_agreement=false, $privacy_fields=NULL)
Get all user-based tracking data for object.
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
static searchObjects($a_type, $a_title=null, $a_root=null, $a_hidden=null, $a_preset_obj_ids=null)
const LP_MODE_COLLECTION_MOBS
Class ilObjSCORM2004LearningModule.
static getUserObjectMatrix($a_parent_ref_id, $a_obj_ids, $a_user_filter=NULL, array $a_additional_fields=null, array $a_privacy_fields=null, $a_check_agreement=null)
Get status matrix for users on objects.
getObjectsStatusForUser($a_user_id, array $obj_refs)
_getTrackedUsers($a_obj_id)
Get all tracked users.
const LP_STATUS_COMPLETED
static getInstance($a_obj_id)
getSubItemsStatusForUser($a_user_id, $a_parent_obj_id, array $a_item_ids)
Class ilObjSCORMLearningModule.
static lookupAcceptedAgreements($a_obj_id)
Lookup users who have accepted the agreement.
static getObjectStatisticsLogInfo()
Get last update info for object statistics.
const LP_STATUS_FAILED_NUM
_getClassById($a_obj_id, $a_mode=NULL)