5 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
23 parent::__construct($a_obj_id);
32 foreach ($status_info[
'in_progress'] as $in_progress) {
48 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
52 $items = $status_info[
'scos'];
56 foreach ($items as $sco_id) {
57 $tmp_users = $status_info[
'completed'][$sco_id];
74 if (!count($status_info[
'scos'])) {
78 foreach ($status_info[
'scos'] as $sco_id) {
111 $users = array_merge(
$users, (array) $status_info[
'failed'][$sco_id]);
113 return array_unique(
$users);
135 include_once
'./Services/Object/classes/class.ilObjectLP.php';
137 $collection = $olp->getCollectionInstance();
139 $status_info[
'scos'] = $collection->getItems();
141 $status_info[
'scos'] = array();
143 $status_info[
'num_scos'] = count($status_info[
'scos']);
146 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
149 switch ($status_info[
'subtype']) {
152 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
155 include_once
'./Modules/ScormAicc/classes/class.ilObjAICCLearningModule.php';
156 foreach (ilObjAICCLearningModule::_getTrackingItems($a_obj_id) as $item) {
157 if (in_array($item[
'obj_id'], $status_info[
'scos'])) {
158 $status_info[
'scos_title'][
"$item[obj_id]"] = $item[
'title'];
165 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
168 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php';
169 foreach ($status_info[
'scos'] as $sco_id) {
176 include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php';
178 include_once
'./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php';
179 foreach ($status_info[
'scos'] as $sco_id) {
187 $status_info[
'completed'] = array();
188 $status_info[
'failed'] = array();
189 $status_info[
'in_progress'] = array();
190 foreach ($status_info[
'scos'] as $sco_id) {
191 $status_info[
'completed'][$sco_id] =
$info[
'completed'][$sco_id] ?
$info[
'completed'][$sco_id] : array();
192 $status_info[
'failed'][$sco_id] =
$info[
'failed'][$sco_id] ?
$info[
'failed'][$sco_id] : array();
193 $status_info[
'in_progress'][$sco_id] =
$info[
'in_progress'][$sco_id] ?
$info[
'in_progress'][$sco_id] : array();
211 $ilObjDataCache = $DIC[
'ilObjDataCache'];
212 $ilDB = $DIC[
'ilDB'];
215 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
219 include_once(
"./Services/Tracking/classes/class.ilChangeEvent.php");
221 $status = self::LP_STATUS_IN_PROGRESS_NUM;
226 include_once
'./Services/Object/classes/class.ilObjectLP.php';
228 $collection = $olp->getCollectionInstance();
230 $scos = $collection->getItems();
232 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
238 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
243 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php");
248 switch ($scorm_status) {
250 $status = self::LP_STATUS_IN_PROGRESS_NUM;
253 $status = self::LP_STATUS_COMPLETED_NUM;
256 $status = self::LP_STATUS_FAILED_NUM;
277 include_once
'./Services/Object/classes/class.ilObjectLP.php';
279 $collection = $olp->getCollectionInstance();
281 $scos = $collection->getItems();
282 $reqscos = count($scos);
284 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
286 if ($subtype !=
"scorm2004") {
287 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
290 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php");
296 $per = min(100, 100 / $reqscos * $compl);
306 parent::refreshStatus($a_obj_id, $a_users);
309 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
313 $all_active_users = array_unique(array_merge($in_progress, $completed,
$failed));
316 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
318 if ($subtype !=
"scorm2004") {
319 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
322 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php");
326 $not_attempted_users = array_diff($all_tracked_users, $all_active_users);
327 unset($all_tracked_users);
328 unset($all_active_users);
331 if ($not_attempted_users) {
332 foreach ($not_attempted_users as $usr_id) {
static _getFailed($a_obj_id)
static hasAccessed($a_obj_id, $a_usr_id)
Has accessed.
static _getInProgress($a_obj_id)
Static function to read users who have the status 'in_progress'.
static _getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
static _getItemProgressInfo($a_scorm_item_ids, $a_obj_id, $a_omit_failed=false)
static _getStatusInfo($a_obj_id)
static _getNotAttempted($a_obj_id)
static _getTrackedUsers($a_obj_id)
Get all tracked users.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
static _getFailed($a_obj_id)
Static function to read the users who have the status 'completed'.
static _countCompleted($a_scos, $a_obj_id, $a_user_id)
static _lookupTitle($a_obj_id)
static _getCountCompletedPerUser($a_scorm_item_ids, $a_obj_id)
Get users who have status completed or passed.
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
static _getTrackedUsers($a_obj_id)
Get all tracked users.
static _getCountCompletedPerUser($a_scorm_item_ids, $a_obj_id, $a_omit_failed=false)
Get progress of selected scos.
static _getCompleted($a_obj_id)
static _getStatusInfo($a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
static _getCollectionStatus($a_scos, $a_obj_id, $a_user_id)
static writeStatus($a_obj_id, $a_user_id, $a_status, $a_percentage=false, $a_force_per=false)
Write status for user and object.
refreshStatus($a_obj_id, $a_users=null)
static _countCompleted( $a_scos, $a_obj_id, $a_user_id, $a_omit_failed=false)
static _getCollectionStatus($a_scos, $a_obj_id, $a_user_id)
static _getProgressInfo($sco_item_ids, $a_obj_id)
Get info about.
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
determinePercentage($a_obj_id, $a_user_id, $a_obj=null)
Determine percentage.
static _getInProgress($a_obj_id)
static getInstance($a_obj_id)
static _lookupItemTitle($a_node_id)