33 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
48 global $ilObjDataCache;
51 $ilBench->start(
'LearningProgress',
'9171_LPStatusObjectives_notAttempted');
53 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
55 $members = $members_obj->getParticipants();
61 $ilBench->stop(
'LearningProgress',
'9171_LPStatusObjectives_notAttempted');
62 return $users ? $users : array();
71 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
73 $members = $members_obj->getParticipants();
75 $query =
"SELECT DISTINCT(usr_id) FROM read_event ".
76 "WHERE obj_id = '".$a_obj_id.
"'";
78 $res = $ilDB->query($query);
81 if(!in_array($row->usr_id,$completed) and in_array($row->usr_id,$members))
83 $user_ids[] = $row->usr_id;
86 return $user_ids ? $user_ids : array();
94 $ilBench->start(
'LearningProgress',
'9173_LPStatusObjectives_completed');
97 foreach($status_info[
'objective_result'] as $user_id => $completed)
99 if(count($completed) == $status_info[
'num_objectives'])
101 $usr_ids[] = $user_id;
104 $ilBench->stop(
'LearningProgress',
'9173_LPStatusObjectives_completed');
105 return $usr_ids ? $usr_ids : array();
111 include_once
'Modules/Course/classes/class.ilCourseObjective.php';
115 $status_info[
'objective_result'] = array();
117 $status_info[
'num_objectives'] = count($status_info[
'objectives']);
119 if(!$status_info[
'num_objectives'])
125 $in =
"objective_id IN('".implode(
"','",$status_info[
'objectives']).
"') ";
128 $query =
"SELECT * FROM crs_objective_status ".
131 $res = $ilDB->query($query);
134 $status_info[
'completed'][$row->objective_id][] = $row->user_id;
135 $status_info[
'objective_result'][$row->user_id][$row->objective_id] = $row->objective_id;
139 $query =
"SELECT * FROM crs_objectives ".
141 $res = $ilDB->query($query);
144 $status_info[
'objective_title'][$row->objective_id] = $row->title;
145 $status_info[
'objective_description'][$row->objective_id] = $row->description;