ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPStatusTestPassed Class Reference
+ Inheritance diagram for ilLPStatusTestPassed:
+ Collaboration diagram for ilLPStatusTestPassed:

Public Member Functions

 ilLPStatusTestPassed ($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.ilLPStatusTestPassed.php.

Member Function Documentation

ilLPStatusTestPassed::_getCompleted (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 72 of file class.ilLPStatusTestPassed.php.

References $ilBench, $ilDB, and _getStatusInfo().

{
global $ilDB;
global $ilBench;
$ilBench->start('LearningProgress','9183_LPStatusTestPassed_completed');
include_once './Modules/Test/classes/class.ilObjTestAccess.php';
include_once './Services/Tracking/classes/class.ilTestResultCache.php';
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
foreach($status_info['results'] as $user_data)
{
if($user_data['passed'])
{
$user_ids[] = $user_data['user_id'];
}
}
$ilBench->stop('LearningProgress','9183_LPStatusTestPassed_completed');
return $user_ids ? $user_ids : array();
}

+ Here is the call graph for this function:

ilLPStatusTestPassed::_getFailed (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 94 of file class.ilLPStatusTestPassed.php.

References _getStatusInfo().

{
$status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
foreach($status_info['results'] as $user_data)
{
if($user_data['failed'])
{
$user_ids[] = $user_data['user_id'];
}
}
return $user_ids ? $user_ids : array();
}

+ Here is the call graph for this function:

ilLPStatusTestPassed::_getInProgress (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 46 of file class.ilLPStatusTestPassed.php.

References $ilBench, $ilDB, $query, $res, $row, ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), and DB_FETCHMODE_OBJECT.

{
global $ilDB;
global $ilBench;
$ilBench->start('LearningProgress','9182_LPStatusTestPassed_inProgress');
include_once './Modules/Test/classes/class.ilObjTestAccess.php';
$query = "SELECT DISTINCT(user_fi) FROM tst_active ".
"WHERE test_fi = '".ilObjTestAccess::_getTestIDFromObjectID($a_obj_id)."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$user_ids[] = $row->user_fi;
}
$users = array_diff((array) $user_ids,ilLPStatusWrapper::_getCompleted($a_obj_id));
$users = array_diff((array) $users,ilLPStatusWrapper::_getFailed($a_obj_id));
$ilBench->stop('LearningProgress','9182_LPStatusTestPassed_inProgress');
return $users ? $users : array();
}

+ Here is the call graph for this function:

ilLPStatusTestPassed::_getStatusInfo (   $a_obj_id)

Reimplemented from ilLPStatus.

Definition at line 107 of file class.ilLPStatusTestPassed.php.

References ilObjTestAccess\_getPassedUsers().

Referenced by _getCompleted(), and _getFailed().

{
include_once './Modules/Test/classes/class.ilObjTestAccess.php';
$status_info['results'] = ilObjTestAccess::_getPassedUsers($a_obj_id);
return $status_info;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusTestPassed::ilLPStatusTestPassed (   $a_obj_id)

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

References $ilDB, and 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: