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
Definition at line 28 of file class.ilLPStatusFactory.php.
static ilLPStatusFactory::_getClassById |
( |
int |
$a_obj_id, |
|
|
?int |
$a_mode = null |
|
) |
| |
|
static |
Definition at line 55 of file class.ilLPStatusFactory.php.
References $message, ilLogLevel\ERROR, ilLPObjSettings\getClassMap(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_UNDEFINED, and null.
Referenced by ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), ilLPStatusWrapper\_getNotAttempted(), ilLPStatusWrapper\_getStatusInfo(), ilLPStatusWrapper\_getTypicalLearningTime(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilLMExplorerGUI\checkLPIcon(), ilTrQuery\getParticipantsForObject(), ilLearningProgressGUI\initCollectionManualForm(), ilLearningProgressGUI\showtlt(), and ilLearningProgressGUI\updateManual().
59 if ($a_mode ===
null) {
61 $a_mode = $olp->getCurrentMode();
64 if (isset(self::$class_by_obj_id[$a_obj_id])) {
65 return self::$class_by_obj_id[$a_obj_id];
71 if (array_key_exists($a_mode, $map)) {
72 $class = $map[$a_mode];
75 if ($class ===
null) {
77 $mode = $olp->getCurrentMode();
79 return self::_getClassById($a_obj_id, $mode);
82 self::$class_by_obj_id[$a_obj_id] = $class;
87 $factory = self::getFactoryInstance();
88 $message =
'Unknown LP mode given: ' . $a_mode;
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $obj_id)