ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPStatusFactory Class Reference

Class ilLPStatusFactory Creates status class instances for learning progress modes of an object. More...

+ Collaboration diagram for ilLPStatusFactory:

Public Member Functions

 _getClassById ($a_obj_id, $a_mode=NULL)
 _getClassByIdAndType ($a_obj_id, $a_type)
_getInstance ($a_obj_id, $a_mode=NULL)

Detailed Description

Class ilLPStatusFactory Creates status class instances for learning progress modes of an object.

E.g obj_id of course returns an instance of ilLPStatusManual, ilLPStatusObjectives ...

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilLPStatusFactory.php 25784 2010-09-28 10:23:24Z hschottm

Definition at line 17 of file class.ilLPStatusFactory.php.

Member Function Documentation

ilLPStatusFactory::_getClassById (   $a_obj_id,
  $a_mode = NULL 
)

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

References $type, ilLPObjSettings\__getDefaultMode(), ilLPObjSettings\_lookupMode(), ilObject\_lookupType(), exit, LP_MODE_COLLECTION, LP_MODE_DEACTIVATED, LP_MODE_EVENT, LP_MODE_EXERCISE_RETURNED, LP_MODE_MANUAL, LP_MODE_MANUAL_BY_TUTOR, LP_MODE_OBJECTIVES, LP_MODE_SCORM, LP_MODE_SCORM_PACKAGE, LP_MODE_TEST_FINISHED, LP_MODE_TEST_PASSED, LP_MODE_TLT, LP_MODE_UNDEFINED, and LP_MODE_VISITS.

Referenced by ilLPStatusWrapper\_determineStatus(), ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), ilLPStatusWrapper\_getNotAttempted(), ilLPStatusWrapper\_getStatusInfo(), ilLPStatusWrapper\_getTypicalLearningTime(), ilLPStatusWrapper\_refreshStatus(), ilLPStatusWrapper\_setDirty(), ilLPStatusWrapper\_updateStatus(), and ilLPStatus\checkStatusForObject().

{
include_once 'Services/Tracking/classes/class.ilLPObjSettings.php';
if($a_mode === NULL)
{
$a_mode = ilLPObjSettings::_lookupMode($a_obj_id);
}
switch($a_mode)
{
include_once 'Services/Tracking/classes/class.ilLPStatusVisits.php';
return 'ilLPStatusVisits';
include_once 'Services/Tracking/classes/class.ilLPStatusCollection.php';
return 'ilLPStatusCollection';
include_once 'Services/Tracking/classes/class.ilLPStatusTypicalLearningTime.php';
return 'ilLPStatusTypicalLearningTime';
include_once 'Services/Tracking/classes/class.ilLPStatusSCORM.php';
return 'ilLPStatusSCORM';
include_once 'Services/Tracking/classes/class.ilLPStatus.php';
return 'ilLPStatus';
include_once 'Services/Tracking/classes/class.ilLPStatusTestFinished.php';
return 'ilLPStatusTestFinished';
include_once 'Services/Tracking/classes/class.ilLPStatusTestPassed.php';
return 'ilLPStatusTestPassed';
include_once 'Services/Tracking/classes/class.ilLPStatusManual.php';
return 'ilLPStatusManual';
include_once 'Services/Tracking/classes/class.ilLPStatusManualByTutor.php';
return 'ilLPStatusManualByTutor';
include_once 'Services/Tracking/classes/class.ilLPStatusExerciseReturned.php';
return 'ilLPStatusExerciseReturned';
include_once 'Services/Tracking/classes/class.ilLPStatusObjectives.php';
return 'ilLPStatusObjectives';
include_once 'Services/Tracking/classes/class.ilLPStatusSCORMPackage.php';
return 'ilLPStatusSCORMPackage';
include_once('./Services/Tracking/classes/class.ilLPStatusEvent.php');
return 'ilLPStatusEvent';
return self::_getClassById($a_obj_id, $mode);
default:
echo "ilLPStatusFactory: unknown type ".ilLPObjSettings::_lookupMode($a_obj_id);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPStatusFactory::_getClassByIdAndType (   $a_obj_id,
  $a_type 
)

Definition at line 93 of file class.ilLPStatusFactory.php.

References exit.

Referenced by ilLPStatusWrapper\_getCompletedByType(), ilLPStatusWrapper\_getFailedByType(), ilLPStatusWrapper\_getInProgressByType(), ilLPStatusWrapper\_getNotAttemptedByType(), and ilLPStatusWrapper\_getStatusInfoByType().

{
// id is ignored in the moment
switch($a_type)
{
case 'event':
include_once 'Services/Tracking/classes/class.ilLPStatusEvent.php';
return 'ilLPStatusEvent';
default:
echo "ilLPStatusFactory: unknown type: ".$a_type;
}
}

+ Here is the caller graph for this function:

& ilLPStatusFactory::_getInstance (   $a_obj_id,
  $a_mode = NULL 
)

Definition at line 108 of file class.ilLPStatusFactory.php.

References $type, ilLPObjSettings\__getDefaultMode(), ilLPObjSettings\_lookupMode(), ilObject\_lookupType(), exit, LP_MODE_COLLECTION, LP_MODE_EVENT, LP_MODE_EXERCISE_RETURNED, LP_MODE_MANUAL, LP_MODE_MANUAL_BY_TUTOR, LP_MODE_OBJECTIVES, LP_MODE_SCORM, LP_MODE_TEST_FINISHED, LP_MODE_TEST_PASSED, LP_MODE_TLT, LP_MODE_UNDEFINED, and LP_MODE_VISITS.

{
include_once 'Services/Tracking/classes/class.ilLPObjSettings.php';
if($a_mode === NULL)
{
$a_mode = ilLPObjSettings::_lookupMode($a_obj_id);
}
switch($a_mode)
{
include_once 'Services/Tracking/classes/class.ilLPStatusVisits.php';
return new ilLPStatusVisits($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusCollection.php';
return new ilLPStatusCollection($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusTypicalLearningTime.php';
return new ilLPStatusTypicalLearningTime($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusSCORM.php';
return new ilLPStatusSCORM($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusTestFinished.php';
return new ilLPStatusTestFinished($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusTestPassed.php';
return new ilLPStatusTestPassed($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusManual.php';
return new ilLPStatusManual($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusManualByTutor.php';
return new ilLPStatusManualByTutor($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusExerciseReturned.php';
return new ilLPStatusExerciseReturned($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusObjectives.php';
return new ilLPStatusObjectives($a_obj_id);
include_once 'Services/Tracking/classes/class.ilLPStatusEvent.php';
return new ilLPStatusEvent($a_obj_id);
return self::_getInstance($a_obj_id, $mode);
default:
echo "ilLPStatusFactory: unknown type ".ilLPObjSettings::_lookupMode($a_obj_id);
}
}

+ Here is the call graph for this function:


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