ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPStatusWrapper Class Reference

Class ilLPStatusWrapper 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 _resetInfoCaches ($a_obj_id)
static _updateStatus ($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
 Update status.
static _determineStatus ($a_obj_id, $a_usr_id)
 Determine status.
static _removeStatusCache ($a_obj_id, $a_usr_id)
static _lookupCompletedForObject ($a_obj_id, $a_user_ids=null)
 Get completed users for object.
static _lookupFailedForObject ($a_obj_id, $a_user_ids=null)
 Get failed users for object.
static _lookupInProgressForObject ($a_obj_id, $a_user_ids=null)
 Get in progress users for object.

Static Private Attributes

static $status_cache = array()
static $info_cache = array()
static $failed_cache = array()
static $completed_cache = array()
static $in_progress_cache = array()
static $not_attempted_cache = array()

Detailed Description

Class ilLPStatusWrapper 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 60574 2015-09-01 12:41:14Z gitmgr

Definition at line 18 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 314 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getInstance().

Referenced by ilLPStatusCollection\determineGroupingStatus().

{
if (isset(self::$status_cache[$a_obj_id][$a_usr_id]))
{
return self::$status_cache[$a_obj_id][$a_usr_id];
}
$trac_obj = ilLPStatusFactory::_getInstance($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::_getCompleted (   $a_obj_id)
ilLPStatusWrapper::_getCompletedByType (   $a_obj_id,
  $a_type 
)

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

References ilLPStatusFactory\_getClassByIdAndType(), and _getCompleted().

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] = $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 80 of file class.ilLPStatusWrapper.php.

References _getCompleted().

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

+ Here is the call graph for this function:

ilLPStatusWrapper::_getCountCompletedByType (   $a_obj_id,
  $a_type 
)

Definition at line 215 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 103 of file class.ilLPStatusWrapper.php.

References _getFailed().

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

+ Here is the call graph for this function:

ilLPStatusWrapper::_getCountFailedByType (   $a_obj_id,
  $a_type 
)

Definition at line 235 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 54 of file class.ilLPStatusWrapper.php.

References _getInProgress().

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

+ Here is the call graph for this function:

ilLPStatusWrapper::_getCountInProgressByType (   $a_obj_id,
  $a_type 
)

Definition at line 195 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 30 of file class.ilLPStatusWrapper.php.

References _getNotAttempted().

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

+ Here is the call 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 111 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by ilLPStatusSCORM\_getCompleted(), ilLPStatusCollection\_getCompleted(), _getCountFailed(), _getFailedByType(), ilLPStatusSCORM\_getInProgress(), ilLPStatusTestPassed\_getInProgress(), ilLPStatusExerciseReturned\_getInProgress(), ilLPStatusCollection\_getInProgress(), ilLPStatusObjectives\_getNotAttempted(), ilLPStatusExerciseReturned\_getNotAttempted(), ilLPStatusCollection\_getNotAttempted(), and ilSoapLearningProgressAdministration\applyProgressFilter().

{
if(isset(self::$failed_cache[$a_obj_id]))
{
return self::$failed_cache[$a_obj_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
self::$failed_cache[$a_obj_id] = $class::_getFailed($a_obj_id);
return self::$failed_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 240 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType(), and _getFailed().

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] = $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 62 of file class.ilLPStatusWrapper.php.

References $ilBench, and ilLPStatusFactory\_getClassById().

Referenced by _getCountInProgress(), ilLPStatusCollection\_getInProgress(), _getInProgressByType(), ilLPStatusObjectives\_getNotAttempted(), ilLPStatusExerciseReturned\_getNotAttempted(), ilLPStatusEvent\_getNotAttempted(), ilLPStatusCollection\_getNotAttempted(), ilLPStatusManualByTutor\_getNotAttempted(), and ilSoapLearningProgressAdministration\applyProgressFilter().

{
if(isset(self::$in_progress_cache[$a_obj_id]))
{
return self::$in_progress_cache[$a_obj_id];
}
global $ilBench;
$class = ilLPStatusFactory::_getClassById($a_obj_id);
self::$in_progress_cache[$a_obj_id] = $class::_getInProgress($a_obj_id);
return self::$in_progress_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 200 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType(), and _getInProgress().

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] = $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 38 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by _getCountNotAttempted(), ilLPStatusTestPassed\_getInProgress(), and _getNotAttemptedByType().

{
if(isset(self::$not_attempted_cache[$a_obj_id]))
{
return self::$not_attempted_cache[$a_obj_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
self::$not_attempted_cache[$a_obj_id] = $class::_getNotAttempted($a_obj_id);
return self::$not_attempted_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 180 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType(), and _getNotAttempted().

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] = $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 128 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassById().

Referenced by _getStatusInfoByType(), ilTrQuery\getSCOsStatusForUser(), and ilTrQuery\getSubItemsStatusForUser().

{
if(isset(self::$info_cache[$a_obj_id]))
{
return self::$info_cache[$a_obj_id];
}
$class = ilLPStatusFactory::_getClassById($a_obj_id);
self::$info_cache[$a_obj_id] = $class::_getStatusInfo($a_obj_id);
return self::$info_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 255 of file class.ilLPStatusWrapper.php.

References ilLPStatusFactory\_getClassByIdAndType(), and _getStatusInfo().

{
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] = $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 152 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] = $class::_getTypicalLearningTime($a_obj_id);
return $cache[$a_obj_id];
}

+ Here is the call graph for this function:

static ilLPStatusWrapper::_lookupCompletedForObject (   $a_obj_id,
  $a_user_ids = null 
)
static

Get completed users for object.

Parameters
int$a_obj_id
array$a_user_ids
Returns
array

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

References ilLPStatusFactory\_getClassById().

Referenced by ilObjCourseGUI\fetchPrintMemberData(), ilLPCronObjectStatistics\gatherCourseLPData(), ilObjGroupGUI\readMemberData(), ilObjCourseGUI\readMemberData(), ilBasicSkill\updateAllUserSkillLevels(), and ilBasicSkill\updateSkillLevelsByTriggerRef().

{
$class = ilLPStatusFactory::_getClassById($a_obj_id);
return $class::_lookupCompletedForObject($a_obj_id, $a_user_ids);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilLPStatusWrapper::_lookupFailedForObject (   $a_obj_id,
  $a_user_ids = null 
)
static

Get failed users for object.

Parameters
int$a_obj_id
array$a_user_ids
Returns
array

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

References ilLPStatusFactory\_getClassById().

Referenced by ilObjCourseGUI\fetchPrintMemberData(), ilLPCronObjectStatistics\gatherCourseLPData(), ilObjGroupGUI\readMemberData(), and ilObjCourseGUI\readMemberData().

{
$class = ilLPStatusFactory::_getClassById($a_obj_id);
return $class::_lookupFailedForObject($a_obj_id, $a_user_ids);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilLPStatusWrapper::_lookupInProgressForObject (   $a_obj_id,
  $a_user_ids = null 
)
static

Get in progress users for object.

Parameters
int$a_obj_id
array$a_user_ids
Returns
array

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

References ilLPStatusFactory\_getClassById().

Referenced by ilObjCourseGUI\fetchPrintMemberData(), ilLPCronObjectStatistics\gatherCourseLPData(), ilObjGroupGUI\readMemberData(), and ilObjCourseGUI\readMemberData().

{
$class = ilLPStatusFactory::_getClassById($a_obj_id);
return $class::_lookupInProgressForObject($a_obj_id, $a_user_ids);
}

+ 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 329 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:

static ilLPStatusWrapper::_resetInfoCaches (   $a_obj_id)
static

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

Referenced by ilSoapLearningProgressAdministration\deleteProgress().

{
unset(self::$info_cache[$a_obj_id]);
unset(self::$failed_cache[$a_obj_id]);
unset(self::$completed_cache[$a_obj_id]);
unset(self::$in_progress_cache[$a_obj_id]);
unset(self::$not_attempted_cache[$a_obj_id]);
}

+ Here is the caller graph for this function:

ilLPStatusWrapper::_setDirty (   $a_obj_id)

Set dirty.

Parameters
integerobject id

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

References ilLPStatusFactory\_getInstance().

{
$trac_obj = ilLPStatusFactory::_getInstance($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,
  $a_no_raise = false,
  $a_force_raise = false 
)
static

Update status.

Parameters
@return

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

References ilLPStatusFactory\_getInstance().

Referenced by ilCourseObjectiveResult\__updatePassed(), ilLearningProgressBaseGUI\__updateUser(), ilObjSCORMTracking\_insertTrackData(), ilEventParticipants\_register(), ilEventParticipants\_unregister(), ilEventParticipants\_updateParticipation(), ilExerciseMembers\_writeReturned(), ilExerciseMembers\_writeStatus(), ilExerciseMembers\assignMember(), ilObjSCORM2004LearningModuleGUI\confirmedDeleteTracking(), ilExerciseMembers\deassignMember(), ilObjSCORMLearningModule\decreaseAttemptsForUser(), ilObjSCORM2004LearningModule\deleteTrackingDataOfUsers(), ilObjSCORMLearningModule\deleteTrackingDataOfUsers(), assFileUpload\handleSubmission(), ilExerciseMembers\ilClone(), ilSCORMPresentationGUI\increase_attemptAndsave_module_version(), ilTestSession\increaseTestPass(), ilCourseObjectiveResult\reset(), ilObjectLP\resetLPDataForUserIds(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilInfoScreenGUI\saveProgress(), ilTestSessionDynamicQuestionSet\saveToDb(), ilTestSession\saveToDb(), ilObjSCORMTracking\store(), ilObjCourse\syncMembersStatusWithLP(), ilLMTracker\trackAccess(), ilObjCourseGUI\updateLPFromStatus(), ilLOTestQuestionAdapter\updateQuestionResult(), and ilEventParticipants\updateUser().

{
$trac_obj = ilLPStatusFactory::_getInstance($a_obj_id);
if (strtolower(get_class($trac_obj)) != "illpstatus")
{
$trac_obj->_updateStatus($a_obj_id, $a_usr_id, $a_obj, $a_percentage, $a_no_raise, $a_force_raise);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilLPStatusWrapper::$completed_cache = array()
staticprivate

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

ilLPStatusWrapper::$failed_cache = array()
staticprivate

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

ilLPStatusWrapper::$in_progress_cache = array()
staticprivate

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

ilLPStatusWrapper::$info_cache = array()
staticprivate

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

ilLPStatusWrapper::$not_attempted_cache = array()
staticprivate

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

ilLPStatusWrapper::$status_cache = array()
staticprivate

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


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