ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLPStatus Class Reference

Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ... More...

+ Inheritance diagram for ilLPStatus:
+ Collaboration diagram for ilLPStatus:

Public Member Functions

 __construct (int $a_obj_id)
 
 _updateStatus (int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
 New status handling (st: status, nr: accesses, p: percentage, t: time spent, m: mark) Learning progress: More...
 
 determinePercentage (int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
 
 determineStatus (int $a_obj_id, int $a_usr_id, object $a_obj=null)
 
 refreshStatus (int $a_obj_id, ?array $a_users=null)
 Refresh status. More...
 

Static Public Member Functions

static _getCountNotAttempted (int $a_obj_id)
 
static _getNotAttempted (int $a_obj_id)
 
static _getCountInProgress (int $a_obj_id)
 
static _getInProgress (int $a_obj_id)
 
static _getCountCompleted (int $a_obj_id)
 
static _getCompleted (int $a_obj_id)
 
static _getFailed (int $a_obj_id)
 
static _getCountFailed (int $a_obj_id)
 
static _getStatusInfo (int $a_obj_id)
 
static _getTypicalLearningTime (int $a_obj_id)
 
static checkStatusForObject (int $a_obj_id, ?array $a_users=null)
 This function checks whether the status for a given number of users is dirty and must be recalculated. More...
 
static writeStatus (int $a_obj_id, int $a_user_id, int $a_status, int $a_percentage=0, bool $a_force_per=false, ?int &$a_old_status=self::LP_STATUS_NOT_ATTEMPTED_NUM)
 Write status for user and object. More...
 
static setInProgressIfNotAttempted (int $a_obj_id, int $a_user_id)
 This function shoudl be clalled for normal "read events". More...
 
static setAllDirty ()
 Sets all status to dirty. More...
 
static setDirty (int $a_obj_id)
 Sets status of an object to dirty. More...
 
static _lookupStatus (int $a_obj_id, int $a_user_id, bool $a_create=true)
 Lookup status. More...
 
static _lookupPercentage (int $a_obj_id, int $a_user_id)
 Lookup percentage. More...
 
static _hasUserCompleted (int $a_obj_id, int $a_user_id)
 Lookup user object completion. More...
 
static _lookupStatusChanged (int $a_obj_id, int $a_user_id)
 Lookup status changed. More...
 
static _lookupCompletedForObject (int $a_obj_id, ?array $a_user_ids=null)
 Get completed users for object. More...
 
static _lookupFailedForObject (int $a_obj_id, ?array $a_user_ids=null)
 Get failed users for object. More...
 
static _lookupInProgressForObject (int $a_obj_id, ?array $a_user_ids=null)
 Get in progress users for object. More...
 
static preloadListGUIData (array $a_obj_ids)
 
static getListGUIStatus (int $a_obj_id, bool $a_image_only=true)
 
static hasListGUIStatus (int $a_obj_id)
 

Data Fields

const LP_STATUS_NOT_ATTEMPTED = 'trac_no_attempted'
 
const LP_STATUS_IN_PROGRESS = 'trac_in_progress'
 
const LP_STATUS_COMPLETED = 'trac_completed'
 
const LP_STATUS_FAILED = 'trac_failed'
 
const LP_STATUS_NOT_ATTEMPTED_NUM = 0
 
const LP_STATUS_IN_PROGRESS_NUM = 1
 
const LP_STATUS_COMPLETED_NUM = 2
 
const LP_STATUS_FAILED_NUM = 3
 
const LP_STATUS_REGISTERED = 'trac_registered'
 
const LP_STATUS_NOT_REGISTERED = 'trac_not_registered'
 
const LP_STATUS_PARTICIPATED = 'trac_participated'
 
const LP_STATUS_NOT_PARTICIPATED = 'trac_not_participated'
 

Static Public Attributes

static $list_gui_cache
 

Static Protected Member Functions

static raiseEvent (int $a_obj_id, int $a_usr_id, int $a_status, int $a_old_status, int $a_percentage)
 
static _lookupStatusForObject (int $a_obj_id, int $a_status, ?array $a_user_ids=null)
 Get users with given status for object. More...
 
static validateLPForObjects (int $a_user_id, array $a_obj_ids, int $a_parent_ref_id)
 Process given objects for lp-relevance. More...
 
static checkLPModesForObjects (array $a_obj_ids, array &$a_coll_obj_ids)
 Process lp modes for given objects. More...
 
static getLPStatusForObjects (int $a_user_id, array $a_obj_ids)
 Get LP status for given objects (and user) More...
 

Protected Attributes

int $obj_id
 
ilDBInterface $db
 
ilObjectDataCache $ilObjDataCache
 

Detailed Description

Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 28 of file class.ilLPStatus.php.

Constructor & Destructor Documentation

◆ __construct()

ilLPStatus::__construct ( int  $a_obj_id)

Definition at line 52 of file class.ilLPStatus.php.

References $DIC.

53  {
54  global $DIC;
55 
56  $this->obj_id = $a_obj_id;
57  $this->db = $DIC->database();
58  $this->ilObjDataCache = $DIC['ilObjDataCache'];
59  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ _getCompleted()

static ilLPStatus::_getCompleted ( int  $a_obj_id)
static
Parameters
int$a_obj_id
Returns
int[]

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

Referenced by ilTimingCache\readObjectInformation().

94  : array
95  {
96  return array();
97  }
+ Here is the caller graph for this function:

◆ _getCountCompleted()

static ilLPStatus::_getCountCompleted ( int  $a_obj_id)
static

Definition at line 85 of file class.ilLPStatus.php.

85  : int
86  {
87  return 0;
88  }

◆ _getCountFailed()

static ilLPStatus::_getCountFailed ( int  $a_obj_id)
static

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

108  : int
109  {
110  return 0;
111  }

◆ _getCountInProgress()

static ilLPStatus::_getCountInProgress ( int  $a_obj_id)
static

Definition at line 75 of file class.ilLPStatus.php.

75  : int
76  {
77  return 0;
78  }

◆ _getCountNotAttempted()

static ilLPStatus::_getCountNotAttempted ( int  $a_obj_id)
static

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

61  : int
62  {
63  return 0;
64  }

◆ _getFailed()

static ilLPStatus::_getFailed ( int  $a_obj_id)
static
Parameters
int$a_obj_id
Returns
int[]

Definition at line 103 of file class.ilLPStatus.php.

103  : array
104  {
105  return array();
106  }

◆ _getInProgress()

static ilLPStatus::_getInProgress ( int  $a_obj_id)
static

Definition at line 80 of file class.ilLPStatus.php.

80  : array
81  {
82  return array();
83  }

◆ _getNotAttempted()

static ilLPStatus::_getNotAttempted ( int  $a_obj_id)
static
Parameters
int$a_obj_id
Returns
int[]

Definition at line 70 of file class.ilLPStatus.php.

70  : array
71  {
72  return array();
73  }

◆ _getStatusInfo()

static ilLPStatus::_getStatusInfo ( int  $a_obj_id)
static

Definition at line 113 of file class.ilLPStatus.php.

113  : array
114  {
115  return array();
116  }

◆ _getTypicalLearningTime()

static ilLPStatus::_getTypicalLearningTime ( int  $a_obj_id)
static

Definition at line 118 of file class.ilLPStatus.php.

References ilMDEducational\_getTypicalLearningTimeSeconds().

118  : int
119  {
121  }
static _getTypicalLearningTimeSeconds(int $a_rbac_id, int $a_obj_id=0)
+ Here is the call graph for this function:

◆ _hasUserCompleted()

static ilLPStatus::_hasUserCompleted ( int  $a_obj_id,
int  $a_user_id 
)
static

Lookup user object completion.

Definition at line 718 of file class.ilLPStatus.php.

Referenced by ilConditionHandler\_checkCondition(), ilObjSAHSLearningModuleAccess\checkCondition(), ilObjLTIConsumerAccess\checkCondition(), ilObjCmiXapiAccess\checkCondition(), ilObjStudyProgramme\getCompletedCourses(), hasCompletedCourseChild(), ilLearningSequenceRoles\isCompletedByUser(), ilCourseStart\isFullfilled(), and ilContainerStartObjects\isFullfilled().

721  : bool {
722  return self::_lookupStatus(
723  $a_obj_id,
724  $a_user_id
725  ) == self::LP_STATUS_COMPLETED_NUM;
726  }
+ Here is the caller graph for this function:

◆ _lookupCompletedForObject()

static ilLPStatus::_lookupCompletedForObject ( int  $a_obj_id,
?array  $a_user_ids = null 
)
static

Get completed users for object.

Definition at line 805 of file class.ilLPStatus.php.

Referenced by ilTimingsUser\lookupTimings().

808  : array {
809  return self::_lookupStatusForObject(
810  $a_obj_id,
811  self::LP_STATUS_COMPLETED_NUM,
812  $a_user_ids
813  );
814  }
+ Here is the caller graph for this function:

◆ _lookupFailedForObject()

static ilLPStatus::_lookupFailedForObject ( int  $a_obj_id,
?array  $a_user_ids = null 
)
static

Get failed users for object.

Definition at line 819 of file class.ilLPStatus.php.

822  : array {
823  return self::_lookupStatusForObject(
824  $a_obj_id,
825  self::LP_STATUS_FAILED_NUM,
826  $a_user_ids
827  );
828  }

◆ _lookupInProgressForObject()

static ilLPStatus::_lookupInProgressForObject ( int  $a_obj_id,
?array  $a_user_ids = null 
)
static

Get in progress users for object.

Definition at line 833 of file class.ilLPStatus.php.

836  : array {
837  return self::_lookupStatusForObject(
838  $a_obj_id,
839  self::LP_STATUS_IN_PROGRESS_NUM,
840  $a_user_ids
841  );
842  }

◆ _lookupPercentage()

static ilLPStatus::_lookupPercentage ( int  $a_obj_id,
int  $a_user_id 
)
static

Lookup percentage.

Definition at line 695 of file class.ilLPStatus.php.

References $DIC, and $ilDB.

Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilLTIAppEventListener\doCronUpdate(), ilObjectListGUI\getAsCard(), and ilObjSCORMLearningModule\importRaw().

698  : ?int {
699  global $DIC;
700 
701  $ilDB = $DIC['ilDB'];
702 
703  $set = $ilDB->query(
704  "SELECT percentage FROM ut_lp_marks WHERE " .
705  " status_dirty = " . $ilDB->quote(0, "integer") .
706  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
707  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
708  );
709  if ($rec = $ilDB->fetchAssoc($set)) {
710  return $rec["percentage"];
711  }
712  return null;
713  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ _lookupStatus()

static ilLPStatus::_lookupStatus ( int  $a_obj_id,
int  $a_user_id,
bool  $a_create = true 
)
static

Lookup status.

Definition at line 660 of file class.ilLPStatus.php.

References $DIC, $ilDB, and ilLPStatusWrapper\_updateStatus().

Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilLearningProgressBaseGUI\__readStatus(), ilObjSAHSLearningModuleAccess\checkCondition(), ilObjCmiXapiAccess\checkCondition(), ilObjCourse\checkLPStatusSync(), ilLPStatusTestPassed\determineStatus(), ilLPStatusCourseReference\determineStatus(), ilLTIAppEventListener\doCronUpdate(), ilCourseLPBadge\evaluate(), ilCourseMailTemplateTutorContext\getCachedPeriodByObjId(), ilObjLearningSequenceLPPollingGUI\getCurrentItemLearningProgress(), ilScormMailTemplateLPContext\getDescription(), ilLearnerProgressDB\getLearningProgressFor(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilObjSCORMInitData\getStatus(), ilObjSCORMLearningModule\importRaw(), ilLearningProgressBaseGUI\initEditUserForm(), ilCertificateLPStatusHelper\lookUpStatus(), and ilTestPassFinishTasks\updateLearningProgressAfterPassFinishedIsWritten().

664  : ?int {
665  global $DIC;
666 
667  $ilDB = $DIC['ilDB'];
668 
669  $set = $ilDB->query(
670  "SELECT status FROM ut_lp_marks WHERE " .
671  " status_dirty = " . $ilDB->quote(0, "integer") .
672  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
673  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
674  );
675  if ($rec = $ilDB->fetchAssoc($set)) {
676  return (int) $rec["status"];
677  } elseif ($a_create) {
678  ilLPStatusWrapper::_updateStatus($a_obj_id, $a_user_id);
679  $set = $ilDB->query(
680  "SELECT status FROM ut_lp_marks WHERE " .
681  " status_dirty = " . $ilDB->quote(0, "integer") .
682  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
683  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
684  );
685  if ($rec = $ilDB->fetchAssoc($set)) {
686  return (int) $rec["status"];
687  }
688  }
689  return null;
690  }
global $DIC
Definition: feed.php:28
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupStatusChanged()

static ilLPStatus::_lookupStatusChanged ( int  $a_obj_id,
int  $a_user_id 
)
static

Lookup status changed.

Definition at line 731 of file class.ilLPStatus.php.

References $DIC, $ilDB, and ilLPStatusWrapper\_updateStatus().

Referenced by ilCertificateLPStatusHelper\lookupStatusChanged().

734  : ?string {
735  global $DIC;
736 
737  $ilDB = $DIC['ilDB'];
738 
739  $set = $ilDB->query(
740  "SELECT status_changed FROM ut_lp_marks WHERE " .
741  " status_dirty = " . $ilDB->quote(0, "integer") .
742  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
743  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
744  );
745  if ($rec = $ilDB->fetchAssoc($set)) {
746  return (string) $rec["status_changed"];
747  } else {
748  ilLPStatusWrapper::_updateStatus($a_obj_id, $a_user_id);
749  $set = $ilDB->query(
750  "SELECT status_changed FROM ut_lp_marks WHERE " .
751  " status_dirty = " . $ilDB->quote(0, "integer") .
752  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
753  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
754  );
755  if ($rec = $ilDB->fetchAssoc($set)) {
756  return (string) $rec["status_changed"];
757  }
758  }
759  return null;
760  }
global $DIC
Definition: feed.php:28
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupStatusForObject()

static ilLPStatus::_lookupStatusForObject ( int  $a_obj_id,
int  $a_status,
?array  $a_user_ids = null 
)
staticprotected

Get users with given status for object.

Definition at line 765 of file class.ilLPStatus.php.

References $DIC, $ilDB, $res, and ILIAS\Repository\int().

769  : array {
770  global $DIC;
771 
772  $ilDB = $DIC['ilDB'];
773 
774  $sql = "SELECT usr_id, status, status_dirty FROM ut_lp_marks" .
775  " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer") .
776  " AND status = " . $ilDB->quote($a_status, "integer");
777  if ($a_user_ids) {
778  $sql .= " AND " . $ilDB->in("usr_id", $a_user_ids, "", "integer");
779  }
780 
781  $set = $ilDB->query($sql);
782  $res = array();
783  while ($rec = $ilDB->fetchAssoc($set)) {
784  // @fixme this was broken due to wrong $res['status_dirty'] access
785  // check how to update status without recursion
786  // check consequences of the old implementation
787  if ($rec["status_dirty"]) {
788  // update status and check again
789  if (self::_lookupStatus(
790  $a_obj_id,
791  $rec["usr_id"]
792  ) != $a_status) {
793  // update status: see comment
794  }
795  }
796  $res[] = (int) $rec["usr_id"];
797  }
798 
799  return $res;
800  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ _updateStatus()

ilLPStatus::_updateStatus ( int  $a_obj_id,
int  $a_usr_id,
?object  $a_obj = null,
bool  $a_percentage = false,
bool  $a_force_raise = false 
)

New status handling (st: status, nr: accesses, p: percentage, t: time spent, m: mark) Learning progress:

  • ilLPStatusWrapper::_updateStatus($a_obj_id, $a_user_id); added to: – ilInfoScreenGUI->saveProgress() – ilLMPresentation->ilPage() – ilLPListOfObjectsGUI->updateUser() – ilCourseObjectiveResult->reset() – ilCourseObjectiveResult->__updatePassed() – ilEventParticipants->updateUser() – ilEventParticipants->_updateParticipation() – ilEventParticipants->_register() – ilEventParticipants->_unregister() – ilExerciseMembers->assignMember() – ilExerciseMembers->deassignMember() – ilExerciseMembers->ilClone() – ilExerciseMembers->writeStatus() – ilExerciseMembers->writeReturned() – ilSCORM13Player->writeGObjective() – ilObjSCORM2004LearningModule->deleteTrackingDataOfUsers() – ilObjSCORM2004LearningModule->importSuccess() – ilObjSCORM2004LearningModuleGUI->confirmedDeleteTracking() – ilSCORM13Player->removeCMIData() – ilSCORM13Player->setCMIData() – ilObjSCORMLearningModule->importSuccess() – ilObjSCORMLearningModule->importRaw() – ilObjSCORMLearningModuleGUI->confirmedDelete() – ilObjSCORMLearningModuleGUI->decreaseAttempt() – ilObjSCORMTracking->store() – ilObjSCORMTracking-> _insertTrackData() – ilSCORMPresentationGUI->increase_attemptAndsave_module_version() – ilTestScoringGUI->setPointsManual() – ilTestSession->increaseTestPass() – ilTestSession->saveToDb()
  • ilLPStatusWrapper::_refreshStatus($a_ojb_id); aufgenommen in: – ilCourseObjective->add() – ilCourseObjective->delete() – ilCourseObjective->deleteAll() – ilExerciseMembers->delete() – ilSCORM13Package->removeCMIData() – ilAICCCourse->delete() – ilAICCUnit->delete() – ilObjAICCLearningModule->delete() – ilSCORMItem->delete() – ilLPStatusWrapper->update() – ilLPListOfSettingsGUI->assign() – ilLPListOfSettingsGUI->deassign() – ilLPListOfSettingsGUI->groupMaterials() – ilLPListOfSettingsGUI->releaseMaterials() – ilObjTestGUI->confirmDeleteAllUserResultsObject move to ilObjTest but this can ba called for each single question – ilConditionHandlerGUI->updateCondition()
  • external time/access values for read events ilChangeEvent::_recordReadEvent($a_obj_id, $a_user_id, false, $attempts, $time); – ilObjSCORMTracking->_syncReadEvent in ilObjSCORMTracking->store() (add to refresh) – ilSCORM2004Tracking->_syncReadEvent in ilSCORM13Player->setCMIData()

Definition at line 212 of file class.ilLPStatus.php.

References $log, determinePercentage(), determineStatus(), ilLoggerFactory\getLogger(), and LP_STATUS_NOT_ATTEMPTED_NUM.

218  : void {
220  $log->debug(
221  sprintf(
222  "obj_id: %s, user id: %s, object: %s",
223  $a_obj_id,
224  $a_usr_id,
225  (is_object($a_obj) ? get_class($a_obj) : 'null')
226  )
227  );
228 
229  $status = $this->determineStatus($a_obj_id, $a_usr_id, $a_obj);
230  $percentage = $this->determinePercentage($a_obj_id, $a_usr_id, $a_obj);
232  $changed = self::writeStatus(
233  $a_obj_id,
234  $a_usr_id,
235  $status,
236  $percentage,
237  false,
238  $old_status
239  );
240 
241  // ak: I don't think that this is a good way to fix 15529, we should not
242  // raise the event, if the status does not change imo.
243  // for now the changes in the next line just prevent the event being raised twice
244  if (!$changed && $a_force_raise) { // #15529
245  self::raiseEvent(
246  $a_obj_id,
247  $a_usr_id,
248  $status,
249  $old_status,
250  $percentage
251  );
252  }
253  }
static getLogger(string $a_component_id)
Get component logger.
$log
Definition: result.php:33
determineStatus(int $a_obj_id, int $a_usr_id, object $a_obj=null)
determinePercentage(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
const LP_STATUS_NOT_ATTEMPTED_NUM
+ Here is the call graph for this function:

◆ checkLPModesForObjects()

static ilLPStatus::checkLPModesForObjects ( array  $a_obj_ids,
array &  $a_coll_obj_ids 
)
staticprotected

Process lp modes for given objects.

Definition at line 871 of file class.ilLPStatus.php.

References $obj_id, $valid, ilLPObjSettings\_lookupDBModeForObjects(), ilLPCollection\getCollectionModes(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_DEACTIVATED, and ilLPObjSettings\LP_MODE_UNDEFINED.

874  : array {
875  $valid = array();
876 
877  // all lp modes with collections (gathered separately)
878  $coll_modes = ilLPCollection::getCollectionModes();
879 
880  // check if objects have LP activated at all (DB entries)
881  $existing = ilLPObjSettings::_lookupDBModeForObjects($a_obj_ids);
882  foreach ($existing as $obj_id => $obj_mode) {
883  if ($obj_mode != ilLPObjSettings::LP_MODE_DEACTIVATED) {
885 
886  if (in_array($obj_mode, $coll_modes)) {
887  $a_coll_obj_ids[] = $obj_id;
888  }
889  }
890  }
891 
892  // missing objects in DB (default mode)
893  $existing_obj_ids = array_keys($existing);
894  if (sizeof($existing) != sizeof($a_obj_ids)) {
895  foreach (array_diff($a_obj_ids, $existing_obj_ids) as $obj_id) {
896  $olp = ilObjectLP::getInstance($obj_id);
897  $mode = $olp->getCurrentMode();
899  // #11141
900  unset($valid[$obj_id]);
901  } elseif ($mode != ilLPObjSettings::LP_MODE_UNDEFINED) {
903 
904  if (in_array($mode, $coll_modes)) {
905  $a_coll_obj_ids[] = $obj_id;
906  }
907  }
908  }
909  unset($existing);
910  }
911  return array_values($valid);
912  }
$valid
static _lookupDBModeForObjects(array $a_obj_ids)
static getInstance(int $obj_id)
+ Here is the call graph for this function:

◆ checkStatusForObject()

static ilLPStatus::checkStatusForObject ( int  $a_obj_id,
?array  $a_users = null 
)
static

This function checks whether the status for a given number of users is dirty and must be recalculated.

"Missing" records are not inserted!

Parameters
int$a_obj_id
?int[]$a_users

Definition at line 277 of file class.ilLPStatus.php.

References $DIC, $ilDB, and ilLPStatusFactory\_getInstance().

Referenced by ilTrQuery\refreshObjectsStatus().

280  : void {
281  global $DIC;
282 
283  $ilDB = $DIC['ilDB'];
284 
285  //@todo: there maybe the need to add extra handling for sessions here, since the
286  // "in progress" status is time dependent here. On the other hand, if they registered
287  // to the session, they already accessed the course and should have a "in progress"
288  // anyway. But the status on the session itself may not be correct.
289 
290  $sql = "SELECT usr_id FROM ut_lp_marks WHERE " .
291  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
292  " status_dirty = " . $ilDB->quote(1, "integer");
293  if (is_array($a_users) && count($a_users) > 0) {
294  $sql .= " AND " . $ilDB->in("usr_id", $a_users, false, "integer");
295  }
296  $set = $ilDB->query($sql);
297  $dirty = false;
298  if ($rec = $ilDB->fetchAssoc($set)) {
299  $dirty = true;
300  }
301 
302  // check if any records are missing
303  $missing = false;
304  if (!$dirty && is_array($a_users) && count($a_users) > 0) {
305  $set = $ilDB->query(
306  "SELECT count(usr_id) cnt FROM ut_lp_marks WHERE " .
307  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
308  $ilDB->in("usr_id", $a_users, false, "integer")
309  );
310  $r = $ilDB->fetchAssoc($set);
311  if ($r["cnt"] < count($a_users)) {
312  $missing = true;
313  }
314  }
315 
316  // refresh status, if records are dirty or missing
317  if ($dirty || $missing) {
318  $trac_obj = ilLPStatusFactory::_getInstance($a_obj_id);
319  $trac_obj->refreshStatus($a_obj_id, $a_users);
320  }
321  }
global $DIC
Definition: feed.php:28
static _getInstance(int $a_obj_id, ?int $a_mode=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determinePercentage()

ilLPStatus::determinePercentage ( int  $a_obj_id,
int  $a_usr_id,
?object  $a_obj = null 
)

Definition at line 255 of file class.ilLPStatus.php.

Referenced by _updateStatus(), and refreshStatus().

259  : int {
260  return 0;
261  }
+ Here is the caller graph for this function:

◆ determineStatus()

ilLPStatus::determineStatus ( int  $a_obj_id,
int  $a_usr_id,
object  $a_obj = null 
)

Definition at line 263 of file class.ilLPStatus.php.

Referenced by ilLPStatusContentVisited\_getCompleted(), and _updateStatus().

267  : int {
268  return 0;
269  }
+ Here is the caller graph for this function:

◆ getListGUIStatus()

static ilLPStatus::getListGUIStatus ( int  $a_obj_id,
bool  $a_image_only = true 
)
static
Returns
string|array

Definition at line 1013 of file class.ilLPStatus.php.

Referenced by ilObjectListGUI\determineProperties(), and ilObjectListGUI\getAsCard().

1016  {
1017  if ($a_image_only) {
1018  $image = '';
1019  if (isset(self::$list_gui_cache[$a_obj_id]["image"])) {
1020  $image = self::$list_gui_cache[$a_obj_id]["image"];
1021  }
1022 
1023  return $image;
1024  }
1025  return self::$list_gui_cache[$a_obj_id] ?? "";
1026  }
+ Here is the caller graph for this function:

◆ getLPStatusForObjects()

static ilLPStatus::getLPStatusForObjects ( int  $a_user_id,
array  $a_obj_ids 
)
staticprotected

Get LP status for given objects (and user)

Definition at line 917 of file class.ilLPStatus.php.

References $DIC, $ilDB, $obj_id, and $res.

920  : array {
921  global $DIC;
922 
923  $ilDB = $DIC['ilDB'];
924 
925  $res = array();
926 
927  // get user lp data
928  $sql = "SELECT status, status_dirty, obj_id FROM ut_lp_marks" .
929  " WHERE " . $ilDB->in("obj_id", $a_obj_ids, "", "integer") .
930  " AND usr_id = " . $ilDB->quote($a_user_id, "integer");
931  $set = $ilDB->query($sql);
932  while ($row = $ilDB->fetchAssoc($set)) {
933  if (!$row["status_dirty"]) {
934  $res[$row["obj_id"]] = $row["status"];
935  } else {
936  $res[$row["obj_id"]] = self::_lookupStatus(
937  $row["obj_id"],
938  $a_user_id
939  );
940  }
941  }
942 
943  // process missing user entries (same as dirty entries, see above)
944  foreach ($a_obj_ids as $obj_id) {
945  if (!isset($res[$obj_id])) {
946  $res[$obj_id] = self::_lookupStatus($obj_id, $a_user_id);
947  if ($res[$obj_id] === null) {
948  $res[$obj_id] = self::LP_STATUS_NOT_ATTEMPTED_NUM;
949  }
950  }
951  }
952 
953  return $res;
954  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28

◆ hasListGUIStatus()

static ilLPStatus::hasListGUIStatus ( int  $a_obj_id)
static

Definition at line 1028 of file class.ilLPStatus.php.

Referenced by ilObjectListGUI\insertLPCommand().

1028  : bool
1029  {
1030  if (isset(self::$list_gui_cache[$a_obj_id])) {
1031  return true;
1032  }
1033  return false;
1034  }
+ Here is the caller graph for this function:

◆ preloadListGUIData()

static ilLPStatus::preloadListGUIData ( array  $a_obj_ids)
static

Definition at line 956 of file class.ilLPStatus.php.

References $DIC, $ilUser, $lng, $obj_id, $requested_ref_id, $res, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_hasLearningProgressLearner(), ilObjUserTracking\_hasLearningProgressListGUI(), ANONYMOUS_USER_ID, ilLPStatusIcons\getInstance(), and ilLPStatusIcons\ICON_VARIANT_LONG.

Referenced by ilObjectListGUIPreloader\preload().

956  : void
957  {
958  global $DIC;
959 
960  $requested_ref_id = 0;
961  if ($DIC->http()->wrapper()->query()->has('ref_id')) {
962  $requested_ref_id = $DIC->http()->wrapper()->query()->retrieve(
963  'ref_id',
964  $DIC->refinery()->kindlyTo()->int()
965  );
966  }
967 
968  $ilUser = $DIC['ilUser'];
969  $lng = $DIC['lng'];
970 
971  $user_id = $ilUser->getId();
972  $res = array();
973  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
977  // -- validate
978 
979  // :TODO: we need the parent ref id, but this is awful
980  // this step removes all "not attempted" from the list, which we usually do not want
981  //$a_obj_ids = self::validateLPForObjects($user_id, $a_obj_ids, $requested_ref_id);
982 
983  // we are not handling the collections differently yet
984  $coll_obj_ids = array();
985  $a_obj_ids = self::checkLPModesForObjects(
986  $a_obj_ids,
987  $coll_obj_ids
988  );
989 
990  // -- gather
991 
992  $res = self::getLPStatusForObjects($user_id, $a_obj_ids);
993 
994  // -- render
995 
996  // value to icon
997  $lng->loadLanguageModule("trac");
999  foreach ($res as $obj_id => $status) {
1000  $res[$obj_id] = [
1001  "image" => $icons->renderIconForStatus($status),
1002  "status" => $status
1003  ];
1004  }
1005  }
1006 
1007  self::$list_gui_cache = $res;
1008  }
$res
Definition: ltiservices.php:69
const ANONYMOUS_USER_ID
Definition: constants.php:27
$lng
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
global $DIC
Definition: feed.php:28
$requested_ref_id
Definition: feed.php:40
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ raiseEvent()

static ilLPStatus::raiseEvent ( int  $a_obj_id,
int  $a_usr_id,
int  $a_status,
int  $a_old_status,
int  $a_percentage 
)
staticprotected

Definition at line 323 of file class.ilLPStatus.php.

References $DIC, $log, and ilLoggerFactory\getLogger().

329  : void {
330  global $DIC;
331 
332  $ilAppEventHandler = $DIC['ilAppEventHandler'];
333 
335  $log->debug(
336  "obj_id: " . $a_obj_id . ", user id: " . $a_usr_id . ", status: " .
337  $a_status . ", percentage: " . $a_percentage
338  );
339 
340  $ilAppEventHandler->raise(
341  "Services/Tracking",
342  "updateStatus",
343  array(
344  "obj_id" => $a_obj_id,
345  "usr_id" => $a_usr_id,
346  "status" => $a_status,
347  "old_status" => $a_old_status,
348  "percentage" => $a_percentage
349  )
350  );
351  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: feed.php:28
$log
Definition: result.php:33
+ Here is the call graph for this function:

◆ refreshStatus()

ilLPStatus::refreshStatus ( int  $a_obj_id,
?array  $a_users = null 
)

Refresh status.

Definition at line 356 of file class.ilLPStatus.php.

References ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), ilLPStatusWrapper\_getNotAttempted(), ilLPStatusWrapper\_updateStatus(), and determinePercentage().

356  : void
357  {
358  $not_attempted = ilLPStatusWrapper::_getNotAttempted($a_obj_id);
359  foreach ($not_attempted as $user_id) {
360  $percentage = $this->determinePercentage($a_obj_id, $user_id);
361  if (self::writeStatus(
362  $a_obj_id,
363  $user_id,
364  self::LP_STATUS_NOT_ATTEMPTED_NUM,
365  $percentage,
366  true
367  )) {
368  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, $percentage);
369  }
370  }
371  $in_progress = ilLPStatusWrapper::_getInProgress($a_obj_id);
372  foreach ($in_progress as $user_id) {
373  $percentage = $this->determinePercentage($a_obj_id, $user_id);
374  if (self::writeStatus(
375  $a_obj_id,
376  $user_id,
377  self::LP_STATUS_IN_PROGRESS_NUM,
378  $percentage,
379  true
380  )) {
381  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_IN_PROGRESS_NUM, $percentage);
382  }
383  }
384  $completed = ilLPStatusWrapper::_getCompleted($a_obj_id);
385  foreach ($completed as $user_id) {
386  $percentage = $this->determinePercentage($a_obj_id, $user_id);
387  if (self::writeStatus(
388  $a_obj_id,
389  $user_id,
390  self::LP_STATUS_COMPLETED_NUM,
391  $percentage,
392  true
393  )) {
394  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_COMPLETED_NUM, $percentage);
395  }
396  }
397  $failed = ilLPStatusWrapper::_getFailed($a_obj_id);
398  foreach ($failed as $user_id) {
399  $percentage = $this->determinePercentage($a_obj_id, $user_id);
400  if (self::writeStatus(
401  $a_obj_id,
402  $user_id,
403  self::LP_STATUS_FAILED_NUM,
404  $percentage,
405  true
406  )) {
407  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_FAILED_NUM, $percentage);
408  }
409  }
410  if ($a_users) {
411  $missing_users = array_diff(
412  $a_users,
413  $not_attempted + $in_progress + $completed + $failed
414  );
415  if ($missing_users) {
416  foreach ($missing_users as $user_id) {
417  ilLPStatusWrapper::_updateStatus($a_obj_id, $user_id);
418  }
419  }
420  }
421  }
static _getCompleted(int $a_obj_id)
Static function to read the users who have the status &#39;completed&#39;.
static _getInProgress(int $a_obj_id)
Static function to read users who have the status &#39;in_progress&#39;.
static _getNotAttempted(int $a_obj_id)
Static function to read the number of user who have the status &#39;not_attempted&#39;.
static _getFailed(int $a_obj_id)
Static function to read the users who have the status &#39;completed&#39;.
determinePercentage(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:

◆ setAllDirty()

static ilLPStatus::setAllDirty ( )
static

Sets all status to dirty.

For testing puproses.

Definition at line 629 of file class.ilLPStatus.php.

References $DIC, and $ilDB.

629  : void
630  {
631  global $DIC;
632 
633  $ilDB = $DIC['ilDB'];
634 
635  $ilDB->manipulate(
636  "UPDATE ut_lp_marks SET " .
637  " status_dirty = " . $ilDB->quote(1, "integer")
638  );
639  }
global $DIC
Definition: feed.php:28

◆ setDirty()

static ilLPStatus::setDirty ( int  $a_obj_id)
static

Sets status of an object to dirty.

Definition at line 644 of file class.ilLPStatus.php.

References $DIC, and $ilDB.

644  : void
645  {
646  global $DIC;
647 
648  $ilDB = $DIC['ilDB'];
649 
650  $ilDB->manipulate(
651  "UPDATE ut_lp_marks SET " .
652  " status_dirty = " . $ilDB->quote(1, "integer") .
653  " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer")
654  );
655  }
global $DIC
Definition: feed.php:28

◆ setInProgressIfNotAttempted()

static ilLPStatus::setInProgressIfNotAttempted ( int  $a_obj_id,
int  $a_user_id 
)
static

This function shoudl be clalled for normal "read events".

The "in progress" status is only written, if current status is "NOT ATTEMPTED"

Definition at line 594 of file class.ilLPStatus.php.

References $DIC, $ilDB, and ilLPStatusWrapper\_updateStatus().

Referenced by ilLearningProgress\_tracProgress().

597  : void {
598  global $DIC;
599 
600  $ilDB = $DIC['ilDB'];
601 
602  // #11513
603 
604  $needs_update = false;
605 
606  $set = $ilDB->query(
607  "SELECT usr_id, status FROM ut_lp_marks WHERE " .
608  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
609  " usr_id = " . $ilDB->quote($a_user_id, "integer")
610  );
611  if ($rec = $ilDB->fetchAssoc($set)) {
612  // current status is not attempted, so we need to update
613  if ($rec["status"] == self::LP_STATUS_NOT_ATTEMPTED_NUM) {
614  $needs_update = true;
615  }
616  } else {
617  // no ut_lp_marks yet, we should update
618  $needs_update = true;
619  }
620 
621  if ($needs_update) {
622  ilLPStatusWrapper::_updateStatus($a_obj_id, $a_user_id);
623  }
624  }
global $DIC
Definition: feed.php:28
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validateLPForObjects()

static ilLPStatus::validateLPForObjects ( int  $a_user_id,
array  $a_obj_ids,
int  $a_parent_ref_id 
)
staticprotected

Process given objects for lp-relevance.

Definition at line 847 of file class.ilLPStatus.php.

References $obj_id, and ilObjectLP\getLPMemberships().

851  : array {
852  $lp_invalid = array();
853 
854  $memberships = ilObjectLP::getLPMemberships(
855  $a_user_id,
856  $a_obj_ids,
857  $a_parent_ref_id
858  );
859  foreach ($memberships as $obj_id => $status) {
860  if (!$status) {
861  $lp_invalid[] = $obj_id;
862  }
863  }
864 
865  return array_diff($a_obj_ids, $lp_invalid);
866  }
static getLPMemberships(int $usr_id, array $obj_ids, ?int $parent_ref_id=null, bool $mapped_ref_ids=false)
Get all objects where given user is member (from LP POV)
+ Here is the call graph for this function:

◆ writeStatus()

static ilLPStatus::writeStatus ( int  $a_obj_id,
int  $a_user_id,
int  $a_status,
int  $a_percentage = 0,
bool  $a_force_per = false,
?int &  $a_old_status = self::LP_STATUS_NOT_ATTEMPTED_NUM 
)
static

Write status for user and object.

Definition at line 426 of file class.ilLPStatus.php.

References $DIC, $ilDB, $log, $query, $res, ilObject\_lookupType(), ilLPStatusWrapper\_removeStatusCache(), ilLPStatusWrapper\_updateStatus(), ilDBConstants\FETCHMODE_OBJECT, and ilDBConstants\T_INTEGER.

Referenced by ilLTIConsumerGradeServiceScores\checkScore(), ilLTIConsumerResultService\deleteResult(), ilLPStatusSCORMPackage\refreshStatus(), ilLPStatusSCORM\refreshStatus(), ilLTIConsumerResultService\replaceResult(), ilObjSCORMTracking\syncGlobalStatus(), and ilSCORM2004StoreData\syncGlobalStatus().

433  : bool {
434  global $DIC;
435 
436  $ilDB = $DIC->database();
437  $log = $DIC->logger()->trac();
438 
439  $log->debug(
440  'Write status for: ' . "obj_id: " . $a_obj_id . ", user id: " . $a_user_id . ", status: " . $a_status . ", percentage: " . $a_percentage . ", force: " . $a_force_per
441  );
442  $update_dependencies = false;
443 
444  $a_old_status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
445 
446  // get status in DB
447  $set = $ilDB->query(
448  "SELECT usr_id,status,status_dirty FROM ut_lp_marks WHERE " .
449  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
450  " usr_id = " . $ilDB->quote($a_user_id, "integer")
451  );
452  $rec = $ilDB->fetchAssoc($set);
453 
454  // update
455  if ($rec) {
456  $a_old_status = $rec["status"];
457 
458  // status has changed: update
459  if ($rec["status"] != $a_status) {
460  $ret = $ilDB->manipulate(
461  "UPDATE ut_lp_marks SET " .
462  " status = " . $ilDB->quote($a_status, "integer") . "," .
463  " status_changed = " . $ilDB->now() . "," .
464  " status_dirty = " . $ilDB->quote(0, "integer") .
465  " WHERE usr_id = " . $ilDB->quote($a_user_id, "integer") .
466  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
467  );
468  if ($ret != 0) {
469  $update_dependencies = true;
470  }
471  } // status has not changed: reset dirty flag
472  elseif ($rec["status_dirty"]) {
473  $ilDB->manipulate(
474  "UPDATE ut_lp_marks SET " .
475  " status_dirty = " . $ilDB->quote(0, "integer") .
476  " WHERE usr_id = " . $ilDB->quote($a_user_id, "integer") .
477  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
478  );
479  }
480  } // insert
481  else {
482  // #13783
483  $ilDB->replace(
484  "ut_lp_marks",
485  array(
486  "obj_id" => array("integer", $a_obj_id),
487  "usr_id" => array("integer", $a_user_id)
488  ),
489  array(
490  "status" => array("integer", $a_status),
491  "status_changed" => array("timestamp", date("Y-m-d H:i:s")),
492  // was $ilDB->now()
493  "status_dirty" => array("integer", 0)
494  )
495  );
496 
497  $update_dependencies = true;
498  }
499 
500  // update percentage
501  if ($a_percentage || $a_force_per) {
502  $a_percentage = max(0, $a_percentage);
503  $a_percentage = min(100, $a_percentage);
504  $ret = $ilDB->manipulate(
505  "UPDATE ut_lp_marks SET " .
506  " percentage = " . $ilDB->quote($a_percentage, "integer") .
507  " WHERE usr_id = " . $ilDB->quote($a_user_id, "integer") .
508  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
509  );
510  }
511 
512  $log->debug(
513  'Update dependecies is ' . ($update_dependencies ? 'true' : 'false')
514  );
515 
516  // update collections
517  if ($update_dependencies) {
518  $log->debug('update dependencies');
519 
520  // a change occured - remove existing cache entry
521  ilLPStatusWrapper::_removeStatusCache($a_obj_id, $a_user_id);
522 
523  $set = $ilDB->query(
524  "SELECT ut_lp_collections.obj_id obj_id FROM " .
525  "object_reference JOIN ut_lp_collections ON " .
526  "(object_reference.obj_id = " . $ilDB->quote(
527  $a_obj_id,
528  "integer"
529  ) .
530  " AND object_reference.ref_id = ut_lp_collections.item_id)"
531  );
532  while ($rec = $ilDB->fetchAssoc($set)) {
533  if (in_array(
534  ilObject::_lookupType($rec["obj_id"]),
535  array("crs", "grp", "fold")
536  )) {
537  $log->debug(
538  'Calling update status for collection obj_id: ' . $rec['obj_id']
539  );
540  // just to make sure - remove existing cache entry
542  (int) $rec["obj_id"],
543  $a_user_id
544  );
546  (int) $rec["obj_id"],
547  $a_user_id
548  );
549  }
550  }
551 
552  // find all course references
553  if (ilObject::_lookupType($a_obj_id) == 'crs') {
554  $log->debug('update references');
555 
556  $query = 'select obj_id from container_reference ' .
557  'where target_obj_id = ' . $ilDB->quote(
558  $a_obj_id,
560  );
561  $res = $ilDB->query($query);
562  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
563  $log->debug(
564  'Calling update status for reference obj_id: ' . $row->obj_id
565  );
567  (int) $row->obj_id,
568  $a_user_id
569  );
571  (int) $row->obj_id,
572  $a_user_id
573  );
574  }
575  }
576 
577  self::raiseEvent(
578  $a_obj_id,
579  $a_user_id,
580  $a_status,
581  $a_old_status,
582  $a_percentage
583  );
584  }
585 
586  return $update_dependencies;
587  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$log
Definition: result.php:33
$query
static _removeStatusCache(int $a_obj_id, int $a_usr_id)
static _lookupType(int $id, bool $reference=false)
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilDBInterface ilLPStatus::$db
protected

Definition at line 32 of file class.ilLPStatus.php.

Referenced by ilLPStatusSurveyFinished\getInvitations().

◆ $ilObjDataCache

◆ $list_gui_cache

ilLPStatus::$list_gui_cache
static

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

◆ $obj_id

int ilLPStatus::$obj_id
protected

◆ LP_STATUS_COMPLETED

◆ LP_STATUS_COMPLETED_NUM

const ilLPStatus::LP_STATUS_COMPLETED_NUM = 2

Definition at line 44 of file class.ilLPStatus.php.

Referenced by ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__readStatus(), ilLPStatusCmiXapiAbstract\_getCompleted(), ilLPStatusStudyProgramme\_getCompleted(), ilLearningProgressBaseGUI\_getStatusText(), ilLMExplorerGUI\checkLPIcon(), ilObjCourse\checkLPStatusSync(), ilLTIConsumerGradeServiceScores\checkScore(), ilLPStatusSurveyFinished\determineStatus(), ilCourseLPBadge\evaluate(), ilCertificateCourseLearningProgressEvaluation\evaluate(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilForumStatisticsTableGUI\fillRow(), ilLPProgressTableGUI\fillRow(), ilTrObjectUsersPropsTableGUI\fillRow(), ilTrMatrixTableGUI\fillRow(), ilObjectListGUI\getAsCard(), ilLPStatusStudyProgramme\getAssignmentsLPMatrix(), ilLPStatusCourseReference\getCompleted(), ilLPMarks\getCompletionsOfUser(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilLPStatusIcons\getImagePathForStatus(), ilTrMatrixTableGUI\getItems(), ilTrSummaryTableGUI\getItems(), ilObjLearningSequence\getLPCompletionStates(), ilLOUserResults\getObjectiveStatusForLP(), ilTrQuery\getObjectsDataForUser(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilLPStatusStudyProgramme\getStatusForAssignments(), ilTrQuery\getSubItemsStatusForUser(), ilLOUserResults\getSummarizedObjectiveStatusForLP(), ilTrQuery\getUserObjectiveMatrix(), ilBadgeAppEventListener\handleEvent(), ilSkillAppEventListener\handleEvent(), ilCourseAppEventListener\handleEvent(), ilCertificateAppEventListener\handleLPUpdate(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilLPObjectStatisticsLPTableGUI\init(), ilLearningProgressGUI\initCollectionManualForm(), ilLearningProgressBaseGUI\initEditUserForm(), ilMStListCoursesTableGUI\initFilter(), ilMStShowUserCoursesTableGUI\initFilter(), ilTrObjectUsersPropsTableGUI\initFilter(), ilTrSummaryTableGUI\initFilter(), ilCourseObjectiveListGUI\insertProgressInfo(), ilLPStatusCmiXapiAbstract\loadStatusInfo(), ilLPStatusIcons\lookupNumStatus(), ilStudyProgrammeAppEventListener\onServiceTrackingUpdateStatus(), ilLPStatusCourseReference\readStatusInfo(), ilLTIConsumerResultService\replaceResult(), ilLearningProgressGUI\showtlt(), ilCertificateCourseLearningProgressEvaluationTest\testAllCoursesAreCompletedOnLPChange(), ilCertificateCourseLearningProgressEvaluationTest\testOnlyOneCourseIsCompletedOnLPChange(), ilLPStatusIconsTest\testSomeExamplesForImagePathsByStatus(), and ilLTIAppEventListener\tryOutcomeService().

◆ LP_STATUS_FAILED

◆ LP_STATUS_FAILED_NUM

const ilLPStatus::LP_STATUS_FAILED_NUM = 3

Definition at line 45 of file class.ilLPStatus.php.

Referenced by ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__readStatus(), ilLPStatusCmiXapiAbstract\_getFailed(), ilLPStatusStudyProgramme\_getFailed(), ilLearningProgressBaseGUI\_getStatusText(), ilObjSAHSLearningModuleAccess\checkCondition(), ilObjCmiXapiAccess\checkCondition(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilForumStatisticsTableGUI\fillRow(), ilLPStatusStudyProgramme\getAssignmentsLPMatrix(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilLPStatusIcons\getImagePathForStatus(), ilTrMatrixTableGUI\getItems(), ilTrSummaryTableGUI\getItems(), ilLOUserResults\getObjectiveStatusForLP(), ilTrQuery\getObjectsDataForUser(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilLPStatusStudyProgramme\getStatusForAssignments(), ilLOUserResults\getSummarizedObjectiveStatusForLP(), ilTrQuery\getUserObjectiveMatrix(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilLPObjectStatisticsLPTableGUI\init(), ilMStListCoursesTableGUI\initFilter(), ilMStShowUserCoursesTableGUI\initFilter(), ilTrObjectUsersPropsTableGUI\initFilter(), ilTrSummaryTableGUI\initFilter(), ilCourseObjectiveListGUI\insertProgressInfo(), ilLPStatusCmiXapiAbstract\loadStatusInfo(), ilLPStatusIcons\lookupNumStatus(), ilLPStatusCourseReference\readStatusInfo(), ilLPStatusIconsTest\testSomeExamplesForImagePathsByStatus(), and ilLTIAppEventListener\tryOutcomeService().

◆ LP_STATUS_IN_PROGRESS

◆ LP_STATUS_IN_PROGRESS_NUM

const ilLPStatus::LP_STATUS_IN_PROGRESS_NUM = 1

Definition at line 43 of file class.ilLPStatus.php.

Referenced by ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__readStatus(), ilLPStatusCmiXapiAbstract\_getInProgress(), ilLPStatusStudyProgramme\_getInProgress(), ilLPStatusObjectives\_getStatusInfo(), ilLearningProgressBaseGUI\_getStatusText(), ilLMExplorerGUI\checkLPIcon(), ilLTIConsumerGradeServiceScores\checkScore(), ilLTIConsumerResultService\deleteResult(), ilLPStatusSurveyFinished\determineStatus(), ilIndividualAssessmentLPInterface\determineStatusOfMember(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilForumStatisticsTableGUI\fillRow(), ilLPStatusStudyProgramme\getAssignmentsLPMatrix(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilLPStatusIcons\getImagePathForStatus(), ilLPStatusCourseReference\getInProgress(), ilTrMatrixTableGUI\getItems(), ilTrSummaryTableGUI\getItems(), ilLOUserResults\getObjectiveStatusForLP(), ilTrQuery\getObjectsDataForUser(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilLPStatusStudyProgramme\getStatusForAssignments(), ilTrQuery\getSubItemsStatusForUser(), ilLOUserResults\getSummarizedObjectiveStatusForLP(), ilTrQuery\getUserObjectiveMatrix(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilLPObjectStatisticsLPTableGUI\init(), ilMStListCoursesTableGUI\initFilter(), ilMStShowUserCoursesTableGUI\initFilter(), ilLPObjectStatisticsLPTableGUI\initFilter(), ilTrObjectUsersPropsTableGUI\initFilter(), ilTrSummaryTableGUI\initFilter(), ilDashboardLearningSequenceGUI\isRelevantLso(), ilLPStatusCmiXapiAbstract\loadStatusInfo(), ilLPStatusIcons\lookupNumStatus(), ilLPStatusCourseReference\readStatusInfo(), ilLTIConsumerResultService\replaceResult(), ilLearningProgressGUI\showtlt(), ilCertificateCourseLearningProgressEvaluationTest\testOnlyOneCourseIsCompletedOnLPChange(), and ilLPStatusIconsTest\testSomeExamplesForImagePathsByStatus().

◆ LP_STATUS_NOT_ATTEMPTED

◆ LP_STATUS_NOT_ATTEMPTED_NUM

const ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM = 0

Definition at line 42 of file class.ilLPStatus.php.

Referenced by ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__readStatus(), ilLPStatusCmiXapiAbstract\_getNotAttempted(), ilLearningProgressBaseGUI\_getStatusText(), _updateStatus(), ilTrQuery\buildFilters(), ilLMExplorerGUI\checkLPIcon(), ILIAS\MyStaff\ListCourses\ilMStListCourses\createWhereStatement(), ilLPStatusSurveyFinished\determineStatus(), ilIndividualAssessmentLPInterface\determineStatusOfMember(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilForumStatisticsTableGUI\fillRow(), ilTrMatrixTableGUI\fillRow(), ilLPStatusStudyProgramme\getAssignmentsLPMatrix(), ilCourseMailTemplateTutorContext\getCachedPeriodByObjId(), ilObjLearningSequenceLPPollingGUI\getCurrentItemLearningProgress(), ilScormMailTemplateLPContext\getDescription(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilLPStatusIcons\getImagePathForStatus(), ilTrMatrixTableGUI\getItems(), ilTrSummaryTableGUI\getItems(), ilLearnerProgressDB\getLearningProgressFor(), ilLPStatusCourseReference\getNotAttempted(), ilTrQuery\getObjectivesStatusForUser(), ilTrQuery\getObjectsDataForUser(), ilTrQuery\getObjectsStatusForUser(), ilLPStatusStudyProgramme\getStatusForAssignments(), ilTrQuery\getSubItemsStatusForUser(), ilTrQuery\getUserObjectiveMatrix(), ilCertificateAppEventListener\handleLPUpdate(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilLPObjectStatisticsLPTableGUI\init(), ilLearningProgressGUI\initCollectionManualForm(), ilMStListCoursesTableGUI\initFilter(), ilMStShowUserCoursesTableGUI\initFilter(), ilTrObjectUsersPropsTableGUI\initFilter(), ilTrSummaryTableGUI\initFilter(), ilCourseObjectiveListGUI\insertProgressInfo(), ilLPStatusCmiXapiAbstract\loadStatusInfo(), ilLPStatusIcons\lookupNumStatus(), ilLPStatusCourseReference\readStatusInfo(), ilLearningProgressGUI\showtlt(), and ilLTIAppEventListener\tryOutcomeService().

◆ LP_STATUS_NOT_PARTICIPATED

const ilLPStatus::LP_STATUS_NOT_PARTICIPATED = 'trac_not_participated'

Definition at line 50 of file class.ilLPStatus.php.

◆ LP_STATUS_NOT_REGISTERED

const ilLPStatus::LP_STATUS_NOT_REGISTERED = 'trac_not_registered'

Definition at line 48 of file class.ilLPStatus.php.

◆ LP_STATUS_PARTICIPATED

const ilLPStatus::LP_STATUS_PARTICIPATED = 'trac_participated'

Definition at line 49 of file class.ilLPStatus.php.

◆ LP_STATUS_REGISTERED

const ilLPStatus::LP_STATUS_REGISTERED = 'trac_registered'

Definition at line 47 of file class.ilLPStatus.php.


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