ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPStatusSCORM Class Reference
+ Inheritance diagram for ilLPStatusSCORM:
+ Collaboration diagram for ilLPStatusSCORM:

Public Member Functions

 ilLPStatusSCORM ($a_obj_id)
 _getInProgress ($a_obj_id)
 _getCompleted ($a_obj_id)
 _getFailed ($a_obj_id)
 _getStatusInfo ($a_obj_id)
- Public Member Functions inherited from ilLPStatus
 ilLPStatus ($a_obj_id)
 _getCountNotAttempted ($a_obj_id)
 _getNotAttempted ($a_obj_id)
 _getCountInProgress ($a_obj_id)
 _getCountCompleted ($a_obj_id)
 _getCountFailed ()
 _getTypicalLearningTime ($a_obj_id)

Additional Inherited Members

- Data Fields inherited from ilLPStatus
 $obj_id = null
 $db = null

Detailed Description

Definition at line 35 of file class.ilLPStatusSCORM.php.

Member Function Documentation

ilLPStatusSCORM::_getCompleted (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 66 of file class.ilLPStatusSCORM.php.

References ilLPStatusWrapper\_getFailed(), and _getStatusInfo().

{
global $ilDB;
include_once './Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
$items = $status_info['scos'];
$counter = 0;
$users = array();
foreach($items as $sco_id)
{
$tmp_users = $status_info['completed'][$sco_id];
if(!$counter++)
{
$users = $tmp_users;
}
else
{
$users = array_intersect($users,$tmp_users);
}
}
$users = array_diff($users,ilLPStatusWrapper::_getFailed($a_obj_id));
return $users;
}

+ Here is the call graph for this function:

ilLPStatusSCORM::_getFailed (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 96 of file class.ilLPStatusSCORM.php.

References _getStatusInfo().

{
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
if(!count($status_info['scos']))
{
return array();
}
$users = array();
foreach($status_info['scos'] as $sco_id)
{
$users = array_merge($users,(array) $status_info['failed'][$sco_id]);
}
return array_unique($users);
}

+ Here is the call graph for this function:

ilLPStatusSCORM::_getInProgress (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 47 of file class.ilLPStatusSCORM.php.

References ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), and _getStatusInfo().

{
include_once './Services/Tracking/classes/class.ilLPCollectionCache.php';
include_once './Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
$users = array();
foreach($status_info['in_progress'] as $in_progress)
{
$users = array_merge($users,$in_progress);
}
$users = array_unique($users);
$users = array_diff($users,ilLPStatusWrapper::_getCompleted($a_obj_id));
$users = array_diff($users,ilLPStatusWrapper::_getFailed($a_obj_id));
return $users;
}

+ Here is the call graph for this function:

ilLPStatusSCORM::_getStatusInfo (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 113 of file class.ilLPStatusSCORM.php.

References ilSCORM2004Tracking\_getCountCompletedPerUser(), ilObjSCORMTracking\_getCountCompletedPerUser(), ilSCORM2004Tracking\_getItemProgressInfo(), ilLPCollectionCache\_getItems(), ilObjSCORMTracking\_getProgressInfo(), ilObjAICCLearningModule\_getTrackingItems(), ilObjSCORM2004LearningModule\_lookupItemTitle(), ilObjSAHSLearningModule\_lookupSubType(), and ilSCORMItem\_lookupTitle().

Referenced by _getCompleted(), _getFailed(), and _getInProgress().

{
// Which sco's determine the status
include_once './Services/Tracking/classes/class.ilLPCollectionCache.php';
$status_info['scos'] = ilLPCollectionCache::_getItems($a_obj_id);
$status_info['num_scos'] = count($status_info['scos']);
// Get subtype
include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
$status_info['subtype'] = ilObjSAHSLearningModule::_lookupSubType($a_obj_id);
switch($status_info['subtype'])
{
case 'hacp':
case 'aicc':
include_once './Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
$status_info['num_completed'] = ilObjSCORMTracking::_getCountCompletedPerUser($status_info['scos'],$a_obj_id);
include_once './Modules/ScormAicc/classes/class.ilObjAICCLearningModule.php';
foreach(ilObjAICCLearningModule::_getTrackingItems($a_obj_id) as $item)
{
if(in_array($item['obj_id'],$status_info['scos']))
{
$status_info['scos_title']["$item[obj_id]"] = $item['title'];
}
}
$info = ilObjSCORMTracking::_getProgressInfo($status_info['scos'],$a_obj_id);
break;
case 'scorm':
include_once './Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
$status_info['num_completed'] = ilObjSCORMTracking::_getCountCompletedPerUser($status_info['scos'],$a_obj_id);
include_once './Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php';
foreach($status_info['scos'] as $sco_id)
{
$status_info['scos_title'][$sco_id] = ilSCORMItem::_lookupTitle($sco_id);
}
$info = ilObjSCORMTracking::_getProgressInfo($status_info['scos'],$a_obj_id);
break;
case "scorm2004":
include_once './Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php';
$status_info['num_completed'] = ilSCORM2004Tracking::_getCountCompletedPerUser($status_info['scos'],$a_obj_id);
include_once './Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php';
foreach($status_info['scos'] as $sco_id)
{
$status_info['scos_title'][$sco_id] = ilObjSCORM2004LearningModule::_lookupItemTitle($sco_id);
}
$info = ilSCORM2004Tracking::_getItemProgressInfo($status_info['scos'],$a_obj_id);
break;
}
$status_info['completed'] = array();
$status_info['failed'] = array();
$status_info['in_progress'] = array();
foreach($status_info['scos'] as $sco_id)
{
$status_info['completed'][$sco_id] = $info['completed'][$sco_id] ? $info['completed'][$sco_id] : array();
$status_info['failed'][$sco_id] = $info['failed'][$sco_id] ? $info['failed'][$sco_id] : array();
$status_info['in_progress'][$sco_id] = $info['in_progress'][$sco_id] ? $info['in_progress'][$sco_id] : array();
}
//var_dump($status_info["completed"]);
return $status_info;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusSCORM::ilLPStatusSCORM (   $a_obj_id)

Definition at line 38 of file class.ilLPStatusSCORM.php.

References ilLPStatus\ilLPStatus().

{
global $ilDB;
parent::ilLPStatus($a_obj_id);
$this->db =& $ilDB;
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: