5 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
21 parent::__construct($a_obj_id);
30 foreach ($status_info[
'in_progress'] as $in_progress) {
44 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
48 $items = $status_info[
'scos'];
52 foreach ($items as $sco_id) {
53 $tmp_users = $status_info[
'completed'][$sco_id];
70 if (!count($status_info[
'scos'])) {
74 foreach ($status_info[
'scos'] as $sco_id) {
109 return array_unique(
$users);
131 include_once
'./Services/Object/classes/class.ilObjectLP.php';
133 $collection = $olp->getCollectionInstance();
135 $status_info[
'scos'] = $collection->getItems();
137 $status_info[
'scos'] =
array();
139 $status_info[
'num_scos'] = count($status_info[
'scos']);
142 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
145 switch ($status_info[
'subtype']) {
148 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
151 include_once
'./Modules/ScormAicc/classes/class.ilObjAICCLearningModule.php';
152 foreach (ilObjAICCLearningModule::_getTrackingItems($a_obj_id) as $item) {
153 if (in_array($item[
'obj_id'], $status_info[
'scos'])) {
154 $status_info[
'scos_title'][
"$item[obj_id]"] = $item[
'title'];
161 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
164 include_once
'./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php';
165 foreach ($status_info[
'scos'] as $sco_id) {
172 include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php';
174 include_once
'./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php';
175 foreach ($status_info[
'scos'] as $sco_id) {
183 $status_info[
'completed'] =
array();
184 $status_info[
'failed'] =
array();
185 $status_info[
'in_progress'] =
array();
186 foreach ($status_info[
'scos'] as $sco_id) {
187 $status_info[
'completed'][$sco_id] =
$info[
'completed'][$sco_id] ?
$info[
'completed'][$sco_id] :
array();
188 $status_info[
'failed'][$sco_id] =
$info[
'failed'][$sco_id] ?
$info[
'failed'][$sco_id] :
array();
189 $status_info[
'in_progress'][$sco_id] =
$info[
'in_progress'][$sco_id] ?
$info[
'in_progress'][$sco_id] :
array();
207 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
211 include_once(
"./Services/Tracking/classes/class.ilChangeEvent.php");
213 $status = self::LP_STATUS_IN_PROGRESS_NUM;
218 include_once
'./Services/Object/classes/class.ilObjectLP.php';
220 $collection = $olp->getCollectionInstance();
222 $scos = $collection->getItems();
224 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
230 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
235 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php");
240 switch ($scorm_status) {
242 $status = self::LP_STATUS_IN_PROGRESS_NUM;
245 $status = self::LP_STATUS_COMPLETED_NUM;
248 $status = self::LP_STATUS_FAILED_NUM;
269 include_once
'./Services/Object/classes/class.ilObjectLP.php';
271 $collection = $olp->getCollectionInstance();
273 $scos = $collection->getItems();
274 $reqscos = count($scos);
276 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
278 if ($subtype !=
"scorm2004") {
279 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
282 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php");
288 $per = min(100, 100 / $reqscos * $compl);
298 parent::refreshStatus($a_obj_id, $a_users);
301 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
305 $all_active_users = array_unique(array_merge($in_progress, $completed,
$failed));
308 include_once
'./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
310 if ($subtype !=
"scorm2004") {
311 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
314 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php");
318 $not_attempted_users = array_diff($all_tracked_users, $all_active_users);
319 unset($all_tracked_users);
320 unset($all_active_users);
323 if ($not_attempted_users) {
324 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)
Create styles array
The data for the language used.
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)