ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPStatusWrapper Class Reference

Class ilLPObjSettings This class is wrapper for all ilLPStatus classes. More...

+ Collaboration diagram for ilLPStatusWrapper:

Public Member Functions

 _getCountNotAttempted ($a_obj_id)
 Static function to read the number of user who have the status 'not_attempted'.
 _getNotAttempted ($a_obj_id)
 Static function to read the number of user who have the status 'not_attempted'.
 _getCountInProgress ($a_obj_id)
 Static function to read the number of user who have the status 'in_progress'.
 _getInProgress ($a_obj_id)
 Static function to read users who have the status 'in_progress'.
 _getCountCompleted ($a_obj_id)
 Static function to read the number of user who have the status 'completed'.
 _getCompleted ($a_obj_id)
 Static function to read the users who have the status 'completed'.
 _getCountFailed ($a_obj_id)
 Static function to read the number of user who have the status 'failed'.
 _getFailed ($a_obj_id)
 Static function to read the users who have the status 'completed'.
 _getStatusInfo ($a_obj_id)
 Reads informations about the object e.g test results, tlt, number of visits.
 _getTypicalLearningTime ($a_obj_id)
 Reads Typical learning time.
 _getCountNotAttemptedByType ($a_obj_id, $a_type)
 Static function to read the number of user who have the status 'not_attempted'.
 _getNotAttemptedByType ($a_obj_id, $a_type)
 _getCountInProgressByType ($a_obj_id, $a_type)
 _getInProgressByType ($a_obj_id, $a_type)
 _getCountCompletedByType ($a_obj_id, $a_type)
 _getCompletedByType ($a_obj_id, $a_type)
 _getCountFailedByType ($a_obj_id, $a_type)
 _getFailedByType ($a_obj_id, $a_type)
 _getStatusInfoByType ($a_obj_id, $a_type)
 _setDirty ($a_obj_id)
 Set dirty.
 _refreshStatus ($a_obj_id, $a_users=null)
 Set dirty.

Static Public Member Functions

static _updateStatus ($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false)
 Update status.
static _determineStatus ($a_obj_id, $a_usr_id)
 Determine status.
static _removeStatusCache ($a_obj_id, $a_usr_id)

Static Private Attributes

static $status_cache = array()

Detailed Description

Class ilLPObjSettings This class is wrapper for all ilLPStatus classes.

It caches all function calls using the obj_id as key TODO: substitute all ilStatus calls with this functions

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilLPStatusWrapper.php 37281 2012-10-01 14:31:20Z jluetzen

Definition at line 19 of file class.ilLPStatusWrapper.php.

Member Function Documentation

static ilLPStatusWrapper::_determineStatus (   $a_obj_id,
  $a_usr_id 
)
static

Determine status.

Parameters
@return

Definition at line 311 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by ilLPStatusCollection\determineStatus().

{
if (isset(self::$status_cache[$a_obj_id][$a_usr_id]))
{
return self::$status_cache[$a_obj_id][$a_usr_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$trac_obj = new $class($a_obj_id);
$st = $trac_obj->determineStatus($a_obj_id, $a_usr_id);
self::$status_cache[$a_obj_id][$a_usr_id] = $st;
return $st;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getCompletedByType (   $a_obj_id,
  $a_type 
)

Definition at line 217 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType().

Referenced by _getCountCompletedByType().

{
static $cache = array();
if(isset($cache[$a_obj_id.'_'.$a_type]))
{
return $cache[$a_obj_id.'_'.$a_type];
}
$class = ilLPStatusFactory::_getClassByIdAndType($a_obj_id,$a_type);
$cache[$a_obj_id.'_'.$a_type] = call_user_func(array($class,'_getCompleted'),$a_obj_id);
return $cache[$a_obj_id.'_'.$a_type];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getCountCompleted (   $a_obj_id)

Static function to read the number of user who have the status 'completed'.

Definition at line 82 of file class.ilLPStatusWrapper.php.

References _getCompleted().

Referenced by ilTrQuery\getObjectsStatus().

{
return count(ilLPStatusWrapper::_getCompleted($a_obj_id));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getCountCompletedByType (   $a_obj_id,
  $a_type 
)

Definition at line 213 of file class.ilLPStatusWrapper.php.

References _getCompletedByType().

{
return count(ilLPStatusWrapper::_getCompletedByType($a_obj_id,$a_type));
}

+ Here is the call graph for this function:

ilLPStatusWrapper::_getCountFailed (   $a_obj_id)

Static function to read the number of user who have the status 'failed'.

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

References _getFailed().

Referenced by ilTrQuery\getObjectsStatus().

{
return count(ilLPStatusWrapper::_getFailed($a_obj_id));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getCountFailedByType (   $a_obj_id,
  $a_type 
)

Definition at line 230 of file class.ilLPStatusWrapper.php.

References _getFailedByType().

{
return count(ilLPStatusWrapper::_getFailedByType($a_obj_id,$a_type));
}

+ Here is the call graph for this function:

ilLPStatusWrapper::_getCountInProgress (   $a_obj_id)

Static function to read the number of user who have the status 'in_progress'.

Definition at line 53 of file class.ilLPStatusWrapper.php.

References _getInProgress().

Referenced by ilTrQuery\getObjectsStatus().

{
return count(ilLPStatusWrapper::_getInProgress($a_obj_id));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getCountInProgressByType (   $a_obj_id,
  $a_type 
)

Definition at line 194 of file class.ilLPStatusWrapper.php.

References _getInProgressByType().

{
return count(ilLPStatusWrapper::_getInProgressByType($a_obj_id,$a_type));
}

+ Here is the call graph for this function:

ilLPStatusWrapper::_getCountNotAttempted (   $a_obj_id)

Static function to read the number of user who have the status 'not_attempted'.

Definition at line 27 of file class.ilLPStatusWrapper.php.

References _getNotAttempted().

Referenced by ilTrQuery\getObjectsStatus().

{
return count(ilLPStatusWrapper::_getNotAttempted($a_obj_id));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getCountNotAttemptedByType (   $a_obj_id,
  $a_type 
)

Static function to read the number of user who have the status 'not_attempted'.

Definition at line 175 of file class.ilLPStatusWrapper.php.

References _getNotAttemptedByType().

{
return count(ilLPStatusWrapper::_getNotAttemptedByType($a_obj_id,$a_type));
}

+ Here is the call graph for this function:

ilLPStatusWrapper::_getFailed (   $a_obj_id)

Static function to read the users who have the status 'completed'.

Definition at line 115 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by ilLearningProgressBaseGUI\__readStatus(), ilPDFPresentation\__showItems(), ilLPStatusSCORM\_getCompleted(), ilLPStatusCollection\_getCompleted(), _getCountFailed(), ilLPStatusTestPassed\_getInProgress(), ilLPStatusSCORM\_getInProgress(), ilLPStatusExerciseReturned\_getInProgress(), ilLPStatusCollection\_getInProgress(), ilLPStatusCollection\_getNotAttempted(), ilLPStatusExerciseReturned\_getNotAttempted(), ilObjCourseGUI\fetchPrintMemberData(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilObjGroupGUI\readMemberData(), and ilObjCourseGUI\readMemberData().

{
static $cache = array();
if(isset($cache[$a_obj_id]))
{
return $cache[$a_obj_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$cache[$a_obj_id] = call_user_func(array($class,'_getFailed'),$a_obj_id);
return $cache[$a_obj_id];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getFailedByType (   $a_obj_id,
  $a_type 
)

Definition at line 234 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType().

Referenced by _getCountFailedByType().

{
static $cache = array();
if(isset($cache[$a_obj_id.'_'.$a_type]))
{
return $cache[$a_obj_id.'_'.$a_type];
}
$class = ilLPStatusFactory::_getClassByIdAndType($a_obj_id,$a_type);
$cache[$a_obj_id.'_'.$a_type] = call_user_func(array($class,'_getFailed'),$a_obj_id);
return $cache[$a_obj_id.'_'.$a_type];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getInProgress (   $a_obj_id)

Static function to read users who have the status 'in_progress'.

Definition at line 61 of file class.ilLPStatusWrapper.php.

References $ilBench, and ilLPStatusFactory\_getClassById().

Referenced by ilLearningProgressBaseGUI\__readStatus(), ilPDFPresentation\__showItems(), _getCountInProgress(), ilLPStatusCollection\_getInProgress(), ilLPStatusManual\_getNotAttempted(), ilLPStatusObjectives\_getNotAttempted(), ilLPStatusCollection\_getNotAttempted(), ilLPStatusEvent\_getNotAttempted(), ilLPStatusExerciseReturned\_getNotAttempted(), ilLPStatusManualByTutor\_getNotAttempted(), ilObjCourseGUI\fetchPrintMemberData(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilObjGroupGUI\readMemberData(), and ilObjCourseGUI\readMemberData().

{
static $cache = array();
if(isset($cache[$a_obj_id]))
{
return $cache[$a_obj_id];
}
global $ilBench;
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$cache[$a_obj_id] = call_user_func($tmp = array($class,'_getInProgress'),$a_obj_id);
return $cache[$a_obj_id];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getInProgressByType (   $a_obj_id,
  $a_type 
)

Definition at line 198 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType().

Referenced by _getCountInProgressByType().

{
static $cache = array();
if(isset($cache[$a_obj_id.'_'.$a_type]))
{
return $cache[$a_obj_id.'_'.$a_type];
}
$class = ilLPStatusFactory::_getClassByIdAndType($a_obj_id,$a_type);
$cache[$a_obj_id.'_'.$a_type] = call_user_func(array($class,'_getInProgress'),$a_obj_id);
return $cache[$a_obj_id.'_'.$a_type];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getNotAttempted (   $a_obj_id)

Static function to read the number of user who have the status 'not_attempted'.

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

References ilLPStatusFactory\_getClassById().

Referenced by ilPDFPresentation\__showItems(), _getCountNotAttempted(), ilObjCourseGUI\fetchPrintMemberData(), ilObjGroupGUI\readMemberData(), and ilObjCourseGUI\readMemberData().

{
static $cache = array();
if(isset($cache[$a_obj_id]))
{
return $cache[$a_obj_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$cache[$a_obj_id] = call_user_func(array($class,'_getNotAttempted'),$a_obj_id);
return $cache[$a_obj_id];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getNotAttemptedByType (   $a_obj_id,
  $a_type 
)

Definition at line 179 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType().

Referenced by _getCountNotAttemptedByType().

{
static $cache = array();
if(isset($cache[$a_obj_id.'_'.$a_type]))
{
return $cache[$a_obj_id.'_'.$a_type];
}
$class = ilLPStatusFactory::_getClassByIdAndType($a_obj_id,$a_type);
$cache[$a_obj_id.'_'.$a_type] = call_user_func(array($class,'_getNotAttempted'),$a_obj_id);
return $cache[$a_obj_id.'_'.$a_type];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getStatusInfo (   $a_obj_id)

Reads informations about the object e.g test results, tlt, number of visits.

Definition at line 134 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by ilTrQuery\getSCOsStatusForUser().

{
static $cache = array();
if(isset($cache[$a_obj_id]))
{
return $cache[$a_obj_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$cache[$a_obj_id] = call_user_func(array($class,'_getStatusInfo'),$a_obj_id);
return $cache[$a_obj_id];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusWrapper::_getStatusInfoByType (   $a_obj_id,
  $a_type 
)

Definition at line 247 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType().

{
static $cache = array();
if(isset($cache[$a_obj_id.'_'.$a_type]))
{
return $cache[$a_obj_id.'_'.$a_type];
}
$class = ilLPStatusFactory::_getClassByIdAndType($a_obj_id,$a_type);
$cache[$a_obj_id.'_'.$a_type] = call_user_func(array($class,'_getStatusInfo'),$a_obj_id);
return $cache[$a_obj_id.'_'.$a_type];
}

+ Here is the call graph for this function:

ilLPStatusWrapper::_getTypicalLearningTime (   $a_obj_id)

Reads Typical learning time.

Mode collection is recursive for all assigned items

Definition at line 151 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

{
static $cache = array();
if(isset($cache[$a_obj_id]))
{
return $cache[$a_obj_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$cache[$a_obj_id] = call_user_func(array($class,'_getTypicalLearningTime'),$a_obj_id);
return $cache[$a_obj_id];
}

+ Here is the call graph for this function:

ilLPStatusWrapper::_refreshStatus (   $a_obj_id,
  $a_users = null 
)

Set dirty.

Parameters
integerobject id
arrayuser ids

Definition at line 298 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by ilCourseObjective\_deleteAll(), ilCourseObjective\add(), ilLPListOfSettingsGUI\assign(), ilLPListOfSettingsGUI\deassign(), ilObjAICCLearningModule\delete(), ilCourseObjective\delete(), ilAICCUnit\delete(), ilAICCCourse\delete(), ilExerciseMembers\delete(), ilSCORMItem\delete(), ilLPObjSettings\insert(), ilSCORM13Package\removeCMIData(), and ilLPObjSettings\update().

{
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$trac_obj = new $class($a_obj_id);
$trac_obj->refreshStatus($a_obj_id, $a_users);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilLPStatusWrapper::_removeStatusCache (   $a_obj_id,
  $a_usr_id 
)
static

Definition at line 328 of file class.ilLPStatusWrapper.php.

Referenced by ilLPStatus\writeStatus().

{
unset(self::$status_cache[$a_obj_id][$a_usr_id]);
}

+ Here is the caller graph for this function:

ilLPStatusWrapper::_setDirty (   $a_obj_id)

Set dirty.

Parameters
integerobject id

Definition at line 285 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

{
$class = ilLPStatusFactory::_getClassById($a_obj_id);
$trac_obj = new $class($a_obj_id);
$trac_obj->_setDirty($a_obj_id);
}

+ Here is the call graph for this function:

static ilLPStatusWrapper::_updateStatus (   $a_obj_id,
  $a_usr_id,
  $a_obj = null,
  $a_percentage = false 
)
static

Update status.

Parameters
@return

Definition at line 269 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by ilCourseObjectiveResult\__updatePassed(), ilLearningProgressBaseGUI\__updateUser(), ilObjSCORMTracking\_insertTrackData(), ilEventParticipants\_register(), ilEventParticipants\_unregister(), ilEventParticipants\_updateParticipation(), ilExerciseMembers\_writeReturned(), ilExerciseMembers\_writeStatus(), ilExerciseMembers\assignMember(), ilObjSCORMLearningModuleGUI\confirmedDelete(), ilObjSCORM2004LearningModuleGUI\confirmedDeleteTracking(), ilExerciseMembers\deassignMember(), ilObjSCORMLearningModuleGUI\decreaseAttempts(), ilObjSCORM2004LearningModule\deleteTrackingDataOfUsers(), ilExerciseMembers\ilClone(), ilLMPresentationGUI\ilPage(), ilObjSCORMLearningModule\importRaw(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilSCORMPresentationGUI\increase_attempt(), ilTestSession\increaseTestPass(), ilSCORM13Player\removeCMIData(), ilCourseObjectiveResult\reset(), ilSCORMPresentationGUI\save_module_version(), ilInfoScreenGUI\saveProgress(), ilTestSession\saveToDb(), ilSCORM13Player\setCMIData(), ilTestScoringGUI\setPointsManual(), ilObjSCORMTracking\store(), ilObjSCORMTracking\storeJsApi(), and ilEventParticipants\updateUser().

{
$class = ilLPStatusFactory::_getClassById($a_obj_id);
if (strtolower($class) != "illpstatus")
{
$trac_obj = new $class($a_obj_id);
$trac_obj->_updateStatus($a_obj_id, $a_usr_id, $a_obj, $a_percentage);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilLPStatusWrapper::$status_cache = array()
staticprivate

Definition at line 21 of file class.ilLPStatusWrapper.php.


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