ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ($a_obj_id)
 
 _updateStatus ($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
 New status handling (st: status, nr: accesses, p: percentage, t: time spent, m: mark) More...
 
 determinePercentage ($a_obj_id, $a_usr_id, $a_obj=null)
 Determine percentage. More...
 
 determineStatus ($a_obj_id, $a_usr_id, $a_obj=null)
 Determine status. More...
 
 refreshStatus ($a_obj_id, $a_users=null)
 Refresh status. More...
 

Static Public Member Functions

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

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

Protected Attributes

 $obj_id = null
 
 $db = null
 

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 15 of file class.ilLPStatus.php.

Constructor & Destructor Documentation

◆ __construct()

ilLPStatus::__construct (   $a_obj_id)

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

References $DIC, and $ilDB.

39  {
40  global $DIC;
41 
42  $ilDB = $DIC['ilDB'];
43 
44  $this->obj_id = $a_obj_id;
45  $this->db = $ilDB;
46  }
global $ilDB
$DIC
Definition: xapitoken.php:46

Member Function Documentation

◆ _getCompleted()

static ilLPStatus::_getCompleted (   $a_obj_id)
static

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

Referenced by ilTimingCache\readObjectInformation().

74  {
75  return array();
76  }
+ Here is the caller graph for this function:

◆ _getCountCompleted()

static ilLPStatus::_getCountCompleted (   $a_obj_id)
static

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

69  {
70  return 0;
71  }

◆ _getCountFailed()

static ilLPStatus::_getCountFailed ( )
static

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

84  {
85  return 0;
86  }

◆ _getCountInProgress()

static ilLPStatus::_getCountInProgress (   $a_obj_id)
static

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

59  {
60  return 0;
61  }

◆ _getCountNotAttempted()

static ilLPStatus::_getCountNotAttempted (   $a_obj_id)
static

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

49  {
50  return 0;
51  }

◆ _getFailed()

static ilLPStatus::_getFailed (   $a_obj_id)
static

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

79  {
80  return array();
81  }

◆ _getInProgress()

static ilLPStatus::_getInProgress (   $a_obj_id)
static

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

64  {
65  return array();
66  }

◆ _getNotAttempted()

static ilLPStatus::_getNotAttempted (   $a_obj_id)
static

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

54  {
55  return array();
56  }

◆ _getStatusInfo()

static ilLPStatus::_getStatusInfo (   $a_obj_id)
static

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

89  {
90  return array();
91  }

◆ _getTypicalLearningTime()

static ilLPStatus::_getTypicalLearningTime (   $a_obj_id)
static

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

References ilMDEducational\_getTypicalLearningTimeSeconds().

94  {
95  include_once 'Services/MetaData/classes/class.ilMDEducational.php';
97  }
static _getTypicalLearningTimeSeconds($a_rbac_id, $a_obj_id=0)
+ Here is the call graph for this function:

◆ _hasUserCompleted()

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

Lookup user object completion.

Parameters
int$a_obj_id
int$a_user_id
Returns
bool

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

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

633  {
634  return (self::_lookupStatus($a_obj_id, $a_user_id) == self::LP_STATUS_COMPLETED_NUM);
635  }
+ Here is the caller graph for this function:

◆ _lookupCompletedForObject()

static ilLPStatus::_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 715 of file class.ilLPStatus.php.

Referenced by ilTimingsUser\lookupTimings().

716  {
717  return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_COMPLETED_NUM, $a_user_ids);
718  }
+ Here is the caller graph for this function:

◆ _lookupFailedForObject()

static ilLPStatus::_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 727 of file class.ilLPStatus.php.

728  {
729  return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_FAILED_NUM, $a_user_ids);
730  }

◆ _lookupInProgressForObject()

static ilLPStatus::_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 739 of file class.ilLPStatus.php.

740  {
741  return self::_lookupStatusForObject($a_obj_id, self::LP_STATUS_IN_PROGRESS_NUM, $a_user_ids);
742  }

◆ _lookupPercentage()

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

Lookup percentage.

Parameters
int$a_obj_idobject id
int$a_user_iduser id

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

References $DIC, and $ilDB.

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

609  {
610  global $DIC;
611 
612  $ilDB = $DIC['ilDB'];
613 
614  $set = $ilDB->query(
615  "SELECT percentage FROM ut_lp_marks WHERE " .
616  " status_dirty = " . $ilDB->quote(0, "integer") .
617  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
618  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
619  );
620  if ($rec = $ilDB->fetchAssoc($set)) {
621  return $rec["percentage"];
622  }
623  }
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ _lookupStatus()

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

Lookup status.

Parameters
int$a_obj_idobject id
int$a_user_iduser id
bool$a_create

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

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

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

574  {
575  global $DIC;
576 
577  $ilDB = $DIC['ilDB'];
578 
579  $set = $ilDB->query(
580  "SELECT status FROM ut_lp_marks WHERE " .
581  " status_dirty = " . $ilDB->quote(0, "integer") .
582  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
583  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
584  );
585  if ($rec = $ilDB->fetchAssoc($set)) {
586  return $rec["status"];
587  } elseif ((bool) $a_create) {
588  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
589  ilLPStatusWrapper::_updateStatus($a_obj_id, $a_user_id);
590  $set = $ilDB->query(
591  "SELECT status FROM ut_lp_marks WHERE " .
592  " status_dirty = " . $ilDB->quote(0, "integer") .
593  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
594  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
595  );
596  if ($rec = $ilDB->fetchAssoc($set)) {
597  return $rec["status"];
598  }
599  }
600  }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupStatusChanged()

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

Lookup status changed.

Parameters
int$a_obj_idobject id
int$a_user_iduser id

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

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

Referenced by ilCertificateLPStatusHelper\lookupStatusChanged().

644  {
645  global $DIC;
646 
647  $ilDB = $DIC['ilDB'];
648 
649  $set = $ilDB->query(
650  "SELECT status_changed FROM ut_lp_marks WHERE " .
651  " status_dirty = " . $ilDB->quote(0, "integer") .
652  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
653  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
654  );
655  if ($rec = $ilDB->fetchAssoc($set)) {
656  return $rec["status_changed"];
657  } else {
658  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
659  ilLPStatusWrapper::_updateStatus($a_obj_id, $a_user_id);
660  $set = $ilDB->query(
661  "SELECT status_changed FROM ut_lp_marks WHERE " .
662  " status_dirty = " . $ilDB->quote(0, "integer") .
663  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
664  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
665  );
666  if ($rec = $ilDB->fetchAssoc($set)) {
667  return $rec["status_changed"];
668  }
669  }
670  }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupStatusForObject()

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

Get users with given status for object.

Parameters
int$a_obj_id
int$a_status
array$a_user_ids
Returns
array

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

References $DIC, $ilDB, and $res.

681  {
682  global $DIC;
683 
684  $ilDB = $DIC['ilDB'];
685 
686  $sql = "SELECT usr_id, status, status_dirty FROM ut_lp_marks" .
687  " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer") .
688  " AND status = " . $ilDB->quote($a_status, "integer");
689  if ($a_user_ids) {
690  $sql .= " AND " . $ilDB->in("usr_id", $a_user_ids, "", "integer");
691  }
692 
693  $set = $ilDB->query($sql);
694  $res = array();
695  while ($rec = $ilDB->fetchAssoc($set)) {
696  if ($res["status_dirty"]) {
697  // update status and check again
698  if (self::_lookupStatus($a_obj_id, $rec["usr_id"]) != $a_status) {
699  continue;
700  }
701  }
702  $res[] = $rec["usr_id"];
703  }
704 
705  return $res;
706  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ _updateStatus()

ilLPStatus::_updateStatus (   $a_obj_id,
  $a_usr_id,
  $a_obj = null,
  $a_percentage = false,
  $a_force_raise = false 
)

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

Learning progress:

Added determine Status to:

Updating the status:

- ilLearningProgress->_tracProgress() added to:

  • 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() Write status
Parameters

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

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

204  {
206  $log->debug(sprintf(
207  "obj_id: %s, user id: %s, object: %s",
208  $a_obj_id,
209  $a_usr_id,
210  (is_object($a_obj) ? get_class($a_obj) : 'null')
211  ));
212 
213  $status = $this->determineStatus($a_obj_id, $a_usr_id, $a_obj);
214  $percentage = $this->determinePercentage($a_obj_id, $a_usr_id, $a_obj);
215  $old_status = null;
216  $changed = self::writeStatus($a_obj_id, $a_usr_id, $status, $percentage, false, $old_status);
217 
218  // ak: I don't think that this is a good way to fix 15529, we should not
219  // raise the event, if the status does not change imo.
220  // for now the changes in the next line just prevent the event being raised twice
221  if (!$changed && (bool) $a_force_raise) { // #15529
222  self::raiseEvent($a_obj_id, $a_usr_id, $status, $old_status, $percentage);
223  }
224  }
determineStatus($a_obj_id, $a_usr_id, $a_obj=null)
Determine status.
$log
Definition: result.php:15
static getLogger($a_component_id)
Get component logger.
determinePercentage($a_obj_id, $a_usr_id, $a_obj=null)
Determine percentage.
+ Here is the call graph for this function:

◆ checkLPModesForObjects()

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

Process lp modes for given objects.

Parameters
array$a_obj_ids
Returns
array

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

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

779  {
780  $valid = array();
781 
782  // all lp modes with collections (gathered separately)
783  include_once "Services/Tracking/classes/collection/class.ilLPCollection.php";
784  $coll_modes = ilLPCollection::getCollectionModes();
785 
786  include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
787 
788  // check if objects have LP activated at all (DB entries)
789  $existing = ilLPObjSettings::_lookupDBModeForObjects($a_obj_ids);
790  foreach ($existing as $obj_id => $obj_mode) {
791  if ($obj_mode != ilLPObjSettings::LP_MODE_DEACTIVATED) {
793 
794  if (in_array($obj_mode, $coll_modes)) {
795  $a_coll_obj_ids[] = $obj_id;
796  }
797  }
798  }
799 
800  // missing objects in DB (default mode)
801  include_once "Services/Object/classes/class.ilObjectLP.php";
802  if (sizeof($existing) != sizeof($a_obj_ids)) {
803  foreach (array_diff($a_obj_ids, $existing) as $obj_id) {
804  $olp = ilObjectLP::getInstance($obj_id);
805  $mode = $olp->getCurrentMode();
807  // #11141
808  unset($valid[$obj_id]);
809  } elseif ($mode != ilLPObjSettings::LP_MODE_UNDEFINED) {
811 
812  if (in_array($mode, $coll_modes)) {
813  $a_coll_obj_ids[] = $obj_id;
814  }
815  }
816  }
817  unset($existing);
818  }
819 
820  return array_values($valid);
821  }
$valid
static _lookupDBModeForObjects(array $a_obj_ids)
static getInstance($a_obj_id)
+ Here is the call graph for this function:

◆ checkStatusForObject()

static ilLPStatus::checkStatusForObject (   $a_obj_id,
  $a_users = false 
)
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

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

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

Referenced by ilTrQuery\refreshObjectsStatus().

257  {
258  global $DIC;
259 
260  $ilDB = $DIC['ilDB'];
261 
262  //@todo: there maybe the need to add extra handling for sessions here, since the
263  // "in progress" status is time dependent here. On the other hand, if they registered
264  // to the session, they already accessed the course and should have a "in progress"
265  // anyway. But the status on the session itself may not be correct.
266 
267  $sql = "SELECT usr_id FROM ut_lp_marks WHERE " .
268  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
269  " status_dirty = " . $ilDB->quote(1, "integer");
270  if (is_array($a_users) && count($a_users) > 0) {
271  $sql .= " AND " . $ilDB->in("usr_id", $a_users, false, "integer");
272  }
273  $set = $ilDB->query($sql);
274  $dirty = false;
275  if ($rec = $ilDB->fetchAssoc($set)) {
276  $dirty = true;
277  }
278 
279  // check if any records are missing
280  $missing = false;
281  if (!$dirty && is_array($a_users) && count($a_users) > 0) {
282  $set = $ilDB->query("SELECT count(usr_id) cnt FROM ut_lp_marks WHERE " .
283  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
284  $ilDB->in("usr_id", $a_users, false, "integer"));
285  $r = $ilDB->fetchAssoc($set);
286  if ($r["cnt"] < count($a_users)) {
287  $missing = true;
288  }
289  }
290 
291  // refresh status, if records are dirty or missing
292  if ($dirty || $missing) {
293  require_once "Services/Tracking/classes/class.ilLPStatusFactory.php"; // #13330
294  $trac_obj = ilLPStatusFactory::_getInstance($a_obj_id);
295  $trac_obj->refreshStatus($a_obj_id, $a_users);
296  }
297  }
static _getInstance($a_obj_id, $a_mode=null)
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determinePercentage()

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

Determine percentage.

Parameters

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

Referenced by _updateStatus(), and refreshStatus().

233  {
234  return false;
235  }
+ Here is the caller graph for this function:

◆ determineStatus()

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

Determine status.

Parameters

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

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

244  {
245  return false;
246  }
+ Here is the caller graph for this function:

◆ getListGUIStatus()

static ilLPStatus::getListGUIStatus (   $a_obj_id,
  $a_image_only = true 
)
static

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

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

914  {
915  if ($a_image_only) {
916  $image = '';
917  if (isset(self::$list_gui_cache[$a_obj_id]["image"])) {
918  $image = self::$list_gui_cache[$a_obj_id]["image"];
919  }
920 
921  return $image;
922  }
923  return self::$list_gui_cache[$a_obj_id];
924  }
+ Here is the caller graph for this function:

◆ getLPStatusForObjects()

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

Get LP status for given objects (and user)

Parameters
int$a_user_id
array$a_obj_ids
Returns
array

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

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

831  {
832  global $DIC;
833 
834  $ilDB = $DIC['ilDB'];
835 
836  $res = array();
837 
838  // get user lp data
839  $sql = "SELECT status, status_dirty, obj_id FROM ut_lp_marks" .
840  " WHERE " . $ilDB->in("obj_id", $a_obj_ids, "", "integer") .
841  " AND usr_id = " . $ilDB->quote($a_user_id, "integer");
842  $set = $ilDB->query($sql);
843  while ($row = $ilDB->fetchAssoc($set)) {
844  if (!$row["status_dirty"]) {
845  $res[$row["obj_id"]] = $row["status"];
846  } else {
847  $res[$row["obj_id"]] = self::_lookupStatus($row["obj_id"], $a_user_id);
848  }
849  }
850 
851  // process missing user entries (same as dirty entries, see above)
852  foreach ($a_obj_ids as $obj_id) {
853  if (!isset($res[$obj_id])) {
854  $res[$obj_id] = self::_lookupStatus($obj_id, $a_user_id);
855  if ($res[$obj_id] === null) {
856  $res[$obj_id] = self::LP_STATUS_NOT_ATTEMPTED_NUM;
857  }
858  }
859  }
860 
861  return $res;
862  }
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ preloadListGUIData()

static ilLPStatus::preloadListGUIData (   $a_obj_ids)
static

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

References $_GET, $DIC, $ilUser, $lng, $obj_id, $res, ilObjUserTracking\_enabledLearningProgress(), ilLearningProgressBaseGUI\_getImagePathForStatus(), ilLearningProgressBaseGUI\_getStatusText(), ilObjUserTracking\_hasLearningProgressLearner(), ilObjUserTracking\_hasLearningProgressListGUI(), and ilUtil\img().

Referenced by ilObjectListGUIPreloader\preload().

865  {
866  global $DIC;
867 
868  $ilUser = $DIC['ilUser'];
869  $lng = $DIC['lng'];
870 
871  $user_id = $ilUser->getId();
872 
873  $res = array();
874 
875  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
876  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
880  // -- validate
881 
882  // :TODO: we need the parent ref id, but this is awful
883  $a_obj_ids = self::validateLPForObjects($user_id, $a_obj_ids, (int) $_GET["ref_id"]);
884 
885  // we are not handling the collections differently yet
886  $coll_obj_ids = array();
887  $a_obj_ids = self::checkLPModesForObjects($a_obj_ids, $coll_obj_ids);
888 
889 
890  // -- gather
891 
892  $res = self::getLPStatusForObjects($user_id, $a_obj_ids);
893 
894 
895  // -- render
896 
897  // value to icon
898  $lng->loadLanguageModule("trac");
899  include_once("./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
900  foreach ($res as $obj_id => $status) {
902  $text = ilLearningProgressBaseGUI::_getStatusText((int) $status);
903  $res[$obj_id] = [
904  "image" => ilUtil::img($path, $text),
905  "status" => $status
906  ];
907  }
908  }
909 
910  self::$list_gui_cache = $res;
911  }
static _getImagePathForStatus($a_status)
Get image path for status.
$_GET["client_id"]
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
static _enabledLearningProgress()
check wether learing progress is enabled or not
foreach($_POST as $key=> $value) $res
$lng
$ilUser
Definition: imgupload.php:18
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ raiseEvent()

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

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

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

300  {
301  global $DIC;
302 
303  $ilAppEventHandler = $DIC['ilAppEventHandler'];
304 
306  $log->debug("obj_id: " . $a_obj_id . ", user id: " . $a_usr_id . ", status: " .
307  $a_status . ", percentage: " . $a_percentage);
308 
309  $ilAppEventHandler->raise("Services/Tracking", "updateStatus", array(
310  "obj_id" => $a_obj_id,
311  "usr_id" => $a_usr_id,
312  "status" => $a_status,
313  "old_status" => $a_old_status,
314  "percentage" => $a_percentage
315  ));
316  }
$log
Definition: result.php:15
$DIC
Definition: xapitoken.php:46
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

◆ refreshStatus()

ilLPStatus::refreshStatus (   $a_obj_id,
  $a_users = null 
)

Refresh status.

Parameters

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

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

325  {
326  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
327  $not_attempted = ilLPStatusWrapper::_getNotAttempted($a_obj_id);
328  foreach ($not_attempted as $user_id) {
329  $percentage = $this->determinePercentage($a_obj_id, $user_id);
330  if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, $percentage, true)) {
331  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, $percentage);
332  }
333  }
334  $in_progress = ilLPStatusWrapper::_getInProgress($a_obj_id);
335  foreach ($in_progress as $user_id) {
336  $percentage = $this->determinePercentage($a_obj_id, $user_id);
337  if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_IN_PROGRESS_NUM, $percentage, true)) {
338  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_IN_PROGRESS_NUM, $percentage);
339  }
340  }
341  $completed = ilLPStatusWrapper::_getCompleted($a_obj_id);
342  foreach ($completed as $user_id) {
343  $percentage = $this->determinePercentage($a_obj_id, $user_id);
344  if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_COMPLETED_NUM, $percentage, true)) {
345  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_COMPLETED_NUM, $percentage);
346  }
347  }
349  foreach ($failed as $user_id) {
350  $percentage = $this->determinePercentage($a_obj_id, $user_id);
351  if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_FAILED_NUM, $percentage, true)) {
352  //self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_FAILED_NUM, $percentage);
353  }
354  }
355  if ($a_users) {
356  $missing_users = array_diff($a_users, $not_attempted + $in_progress + $completed + $failed);
357  if ($missing_users) {
358  foreach ($missing_users as $user_id) {
359  ilLPStatusWrapper::_updateStatus($a_obj_id, $user_id);
360  }
361  }
362  }
363  }
static _getInProgress($a_obj_id)
Static function to read users who have the status &#39;in_progress&#39;.
static _getCompleted($a_obj_id)
Static function to read the users who have the status &#39;completed&#39;.
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
static _getNotAttempted($a_obj_id)
Static function to read the number of user who have the status &#39;not_attempted&#39;.
static _getFailed($a_obj_id)
Static function to read the users who have the status &#39;completed&#39;.
$failed
Definition: Utf8Test.php:85
determinePercentage($a_obj_id, $a_usr_id, $a_obj=null)
Determine percentage.
+ Here is the call graph for this function:

◆ setAllDirty()

static ilLPStatus::setAllDirty ( )
static

Sets all status to dirty.

For testing puproses.

Parameters

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

References $DIC, and $ilDB.

536  {
537  global $DIC;
538 
539  $ilDB = $DIC['ilDB'];
540 
541  $ilDB->manipulate(
542  "UPDATE ut_lp_marks SET " .
543  " status_dirty = " . $ilDB->quote(1, "integer")
544  );
545  }
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ setDirty()

static ilLPStatus::setDirty (   $a_obj_id)
static

Sets status of an object to dirty.

Parameters
integerobject id
Returns

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

References $DIC, and $ilDB.

554  {
555  global $DIC;
556 
557  $ilDB = $DIC['ilDB'];
558 
559  $ilDB->manipulate(
560  "UPDATE ut_lp_marks SET " .
561  " status_dirty = " . $ilDB->quote(1, "integer") .
562  " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer")
563  );
564  }
global $ilDB
$DIC
Definition: xapitoken.php:46

◆ setInProgressIfNotAttempted()

static ilLPStatus::setInProgressIfNotAttempted (   $a_obj_id,
  $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 498 of file class.ilLPStatus.php.

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

Referenced by ilLearningProgress\_tracProgress().

499  {
500  global $DIC;
501 
502  $ilDB = $DIC['ilDB'];
503 
504  // #11513
505 
506  $needs_update = false;
507 
508  $set = $ilDB->query(
509  "SELECT usr_id, status FROM ut_lp_marks WHERE " .
510  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
511  " usr_id = " . $ilDB->quote($a_user_id, "integer")
512  );
513  if ($rec = $ilDB->fetchAssoc($set)) {
514  // current status is not attempted, so we need to update
515  if ($rec["status"] == self::LP_STATUS_NOT_ATTEMPTED_NUM) {
516  $needs_update = true;
517  }
518  } else {
519  // no ut_lp_marks yet, we should update
520  $needs_update = true;
521  }
522 
523  if ($needs_update) {
524  require_once "Services/Tracking/classes/class.ilLPStatusWrapper.php";
525  ilLPStatusWrapper::_updateStatus($a_obj_id, $a_user_id);
526  }
527  }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
global $ilDB
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validateLPForObjects()

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

Process given objects for lp-relevance.

Parameters
int$a_user_id
array$a_obj_ids
int$a_parent_ref_id
Returns
arraye

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

References $obj_id, and ilObjectLP\getLPMemberships().

758  {
759  $lp_invalid = array();
760 
761  include_once "Services/Object/classes/class.ilObjectLP.php";
762  $memberships = ilObjectLP::getLPMemberships($a_user_id, $a_obj_ids, $a_parent_ref_id);
763  foreach ($memberships as $obj_id => $status) {
764  if (!$status) {
765  $lp_invalid[] = $obj_id;
766  }
767  }
768 
769  return array_diff($a_obj_ids, $lp_invalid);
770  }
static getLPMemberships($a_usr_id, array $a_obj_ids, $a_parent_ref_id=null, $a_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 (   $a_obj_id,
  $a_user_id,
  $a_status,
  $a_percentage = false,
  $a_force_per = false,
$a_old_status = self::LP_STATUS_NOT_ATTEMPTED_NUM 
)
static

Write status for user and object.

Parameters

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

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

Referenced by ilLPStatusSCORMPackage\refreshStatus(), ilLPStatusSCORM\refreshStatus(), ilObjSCORMTracking\syncGlobalStatus(), and ilSCORM2004StoreData\syncGlobalStatus().

372  {
373  global $DIC;
374 
375  $ilDB = $DIC->database();
376  $log = $DIC->logger()->trac();
377 
378  $log->debug('Write status for: ' . "obj_id: " . $a_obj_id . ", user id: " . $a_user_id . ", status: " . $a_status . ", percentage: " . $a_percentage . ", force: " . $a_force_per);
379  $update_dependencies = false;
380 
381  $a_old_status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
382 
383  // get status in DB
384  $set = $ilDB->query(
385  "SELECT usr_id,status,status_dirty FROM ut_lp_marks WHERE " .
386  " obj_id = " . $ilDB->quote($a_obj_id, "integer") . " AND " .
387  " usr_id = " . $ilDB->quote($a_user_id, "integer")
388  );
389  $rec = $ilDB->fetchAssoc($set);
390 
391  // update
392  if ($rec) {
393  $a_old_status = $rec["status"];
394 
395  // status has changed: update
396  if ($rec["status"] != $a_status) {
397  $ret = $ilDB->manipulate(
398  "UPDATE ut_lp_marks SET " .
399  " status = " . $ilDB->quote($a_status, "integer") . "," .
400  " status_changed = " . $ilDB->now() . "," .
401  " status_dirty = " . $ilDB->quote(0, "integer") .
402  " WHERE usr_id = " . $ilDB->quote($a_user_id, "integer") .
403  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
404  );
405  if ($ret != 0) {
406  $update_dependencies = true;
407  }
408  }
409  // status has not changed: reset dirty flag
410  elseif ($rec["status_dirty"]) {
411  $ilDB->manipulate(
412  "UPDATE ut_lp_marks SET " .
413  " status_dirty = " . $ilDB->quote(0, "integer") .
414  " WHERE usr_id = " . $ilDB->quote($a_user_id, "integer") .
415  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
416  );
417  }
418  }
419  // insert
420  else {
421  // #13783
422  $ilDB->replace(
423  "ut_lp_marks",
424  array(
425  "obj_id" => array("integer", $a_obj_id),
426  "usr_id" => array("integer", $a_user_id)
427  ),
428  array(
429  "status" => array("integer", $a_status),
430  "status_changed" => array("timestamp", date("Y-m-d H:i:s")), // was $ilDB->now()
431  "status_dirty" => array("integer", 0)
432  )
433  );
434 
435  $update_dependencies = true;
436  }
437 
438  // update percentage
439  if ($a_percentage !== false || $a_force_per) {
440  $a_percentage = max(0, (int) $a_percentage);
441  $a_percentage = min(100, $a_percentage);
442  $ret = $ilDB->manipulate(
443  "UPDATE ut_lp_marks SET " .
444  " percentage = " . $ilDB->quote($a_percentage, "integer") .
445  " WHERE usr_id = " . $ilDB->quote($a_user_id, "integer") .
446  " AND obj_id = " . $ilDB->quote($a_obj_id, "integer")
447  );
448  }
449 
450  $log->debug('Update dependecies is ' . ($update_dependencies ? 'true' : 'false'));
451 
452  // update collections
453  if ($update_dependencies) {
454  $log->debug('update dependencies');
455 
456  // a change occured - remove existing cache entry
457  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
458  ilLPStatusWrapper::_removeStatusCache($a_obj_id, $a_user_id);
459 
460  $set = $ilDB->query("SELECT ut_lp_collections.obj_id obj_id FROM " .
461  "object_reference JOIN ut_lp_collections ON " .
462  "(object_reference.obj_id = " . $ilDB->quote($a_obj_id, "integer") .
463  " AND object_reference.ref_id = ut_lp_collections.item_id)");
464  while ($rec = $ilDB->fetchAssoc($set)) {
465  if (in_array(ilObject::_lookupType($rec["obj_id"]), array("crs", "grp", "fold"))) {
466  $log->debug('Calling update status for collection obj_id: ' . $rec['obj_id']);
467  // just to make sure - remove existing cache entry
468  ilLPStatusWrapper::_removeStatusCache($rec["obj_id"], $a_user_id);
469  ilLPStatusWrapper::_updateStatus($rec["obj_id"], $a_user_id);
470  }
471  }
472 
473  // find all course references
474  if (ilObject::_lookupType($a_obj_id) == 'crs') {
475  $log->debug('update references');
476 
477  $query = 'select obj_id from container_reference ' .
478  'where target_obj_id = ' . $ilDB->quote($a_obj_id, ilDBConstants::T_INTEGER);
479  $res = $ilDB->query($query);
480  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
481  $log->debug('Calling update status for reference obj_id: ' . $row->obj_id);
482  \ilLPStatusWrapper::_removeStatusCache($row->obj_id, $a_user_id);
483  \ilLPStatusWrapper::_updateStatus($row->obj_id, $a_user_id);
484  }
485  }
486 
487  self::raiseEvent($a_obj_id, $a_user_id, $a_status, $a_old_status, $a_percentage);
488  }
489 
490  return $update_dependencies;
491  }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
foreach($_POST as $key=> $value) $res
$log
Definition: result.php:15
$query
static _lookupType($a_id, $a_reference=false)
lookup object type
static _removeStatusCache($a_obj_id, $a_usr_id)
global $ilDB
$ret
Definition: parser.php:6
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilLPStatus::$db = null
protected

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

◆ $list_gui_cache

ilLPStatus::$list_gui_cache
static

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

◆ $obj_id

ilLPStatus::$obj_id = null
protected

◆ LP_STATUS_COMPLETED

◆ LP_STATUS_COMPLETED_NUM

const ilLPStatus::LP_STATUS_COMPLETED_NUM = 2

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

Referenced by ilLPObjectStatisticsLPTableGUI\__construct(), ilLearningProgressBaseGUI\__readStatus(), ilLPStatusCmiXapiAbstract\_getCompleted(), ilLearningProgressBaseGUI\_getImagePathForStatus(), ilLearningProgressBaseGUI\_getStatusText(), ilLMExplorerGUI\checkLPIcon(), ilObjCourse\checkLPStatusSync(), ilLPStatusSurveyFinished\determineStatus(), ilLPStatusStudyProgramme\determineStatus(), ilCourseLPBadge\evaluate(), ilCertificateCourseLearningProgressEvaluation\evaluate(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilLPProgressTableGUI\fillRow(), ilTrObjectUsersPropsTableGUI\fillRow(), ilTrMatrixTableGUI\fillRow(), ilObjectListGUI\getAsCard(), ilLPStatusCourseReference\getCompleted(), ilLPMarks\getCompletionsOfUser(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilTrMatrixTableGUI\getItems(), ilTrSummaryTableGUI\getItems(), ilObjLearningSequence\getLPCompletionStates(), ilLOUserResults\getObjectiveStatusForLP(), ilTrQuery\getObjectsDataForUser(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilLOUserResults\getSummarizedObjectiveStatusForLP(), ilTrQuery\getUserObjectiveMatrix(), ilBadgeAppEventListener\handleEvent(), ilSkillAppEventListener\handleEvent(), ilCourseAppEventListener\handleEvent(), ilCertificateAppEventListener\handleLPUpdate(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilLearningProgressGUI\initCollectionManualForm(), ilLearningProgressBaseGUI\initEditUserForm(), ILIAS\MyStaff\ListCourses\ilMStListCoursesTableGUI\initFilter(), ILIAS\MyStaff\Courses\ShowUser\ilMStShowUserCoursesTableGUI\initFilter(), ilTrSummaryTableGUI\initFilter(), ilTrObjectUsersPropsTableGUI\initFilter(), ilLPStatusCmiXapiAbstract\loadStatusInfo(), ilStudyProgrammeLeafMock\markCompletedFor(), ilStudyProgrammeAppEventListener\onServiceTrackingUpdateStatus(), ilLPStatusCourseReference\readStatusInfo(), ilLearningProgressGUI\showtlt(), ilStudyProgrammeLPTest\test_invalidate(), ilCertificateCourseLearningProgressEvaluationTest\testAllCoursesAreCompletedOnLPChange(), ilStudyProgrammeLPTest\testMarkAccredited(), ilCertificateCourseLearningProgressEvaluationTest\testOnlyOneCourseIsCompletedOnLPChange(), ilStudyProgrammeLPTest\testUnmarkAccredited(), ilObjContentPage\trackProgress(), and ilLTIAppEventListener\tryOutcomeService().

◆ LP_STATUS_FAILED

◆ LP_STATUS_FAILED_NUM

◆ LP_STATUS_IN_PROGRESS

◆ LP_STATUS_IN_PROGRESS_NUM

const ilLPStatus::LP_STATUS_IN_PROGRESS_NUM = 1

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

Referenced by ilLPObjectStatisticsLPTableGUI\__construct(), ilLearningProgressBaseGUI\__readStatus(), ilLearningProgressBaseGUI\_getImagePathForStatus(), ilLPStatusCmiXapiAbstract\_getInProgress(), ilLPStatusObjectives\_getStatusInfo(), ilLearningProgressBaseGUI\_getStatusText(), ilLMExplorerGUI\checkLPIcon(), ilLPStatusSurveyFinished\determineStatus(), ilLPStatusStudyProgramme\determineStatus(), ilIndividualAssessmentLPInterface\determineStatusOfMember(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilLPStatusCourseReference\getInProgress(), ilTrMatrixTableGUI\getItems(), ilTrSummaryTableGUI\getItems(), ilLOUserResults\getObjectiveStatusForLP(), ilTrQuery\getObjectsDataForUser(), ilSoapSCORMAdministration\getSCORMCompletionStatus(), ilLOUserResults\getSummarizedObjectiveStatusForLP(), ilTrQuery\getUserObjectiveMatrix(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ILIAS\MyStaff\ListCourses\ilMStListCoursesTableGUI\initFilter(), ILIAS\MyStaff\Courses\ShowUser\ilMStShowUserCoursesTableGUI\initFilter(), ilLPObjectStatisticsLPTableGUI\initFilter(), ilTrSummaryTableGUI\initFilter(), ilTrObjectUsersPropsTableGUI\initFilter(), ilDashboardLearningSequenceGUI\isRelevantLso(), ilLPStatusCmiXapiAbstract\loadStatusInfo(), ilLPStatusCourseReference\readStatusInfo(), ilLearningProgressGUI\showtlt(), ilStudyProgrammeLPTest\testInitialLPActive(), ilStudyProgrammeLPTest\testInitialLPDraft(), ilStudyProgrammeLPTest\testInitialProgressOutdated(), ilStudyProgrammeLPTest\testMarkAccredited(), ilStudyProgrammeLPTest\testMarkFailed(), ilStudyProgrammeLPTest\testMarkNotFailed(), ilStudyProgrammeLPTest\testMarkNotRelevant(), and ilStudyProgrammeLPTest\testUnmarkAccredited().

◆ LP_STATUS_NOT_ATTEMPTED

◆ LP_STATUS_NOT_ATTEMPTED_NUM

const ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM = 0

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

Referenced by ilLPObjectStatisticsLPTableGUI\__construct(), ilLearningProgressBaseGUI\__readStatus(), ilLPStatusCmiXapiAbstract\_getNotAttempted(), ilLearningProgressBaseGUI\_getStatusText(), ilTrQuery\buildFilters(), ilLMExplorerGUI\checkLPIcon(), ILIAS\MyStaff\ListCourses\ilMStListCourses\createWhereStatement(), ilLPStatusSurveyFinished\determineStatus(), ilLPStatusStudyProgramme\determineStatus(), ilIndividualAssessmentLPInterface\determineStatusOfMember(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillRow(), ilCourseMailTemplateTutorContext\getCachedPeriodByObjId(), ilScormMailTemplateLPContext\getDescription(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilTrMatrixTableGUI\getItems(), ilTrSummaryTableGUI\getItems(), ilLearnerProgressDB\getLearningProgressFor(), ilLPStatusCourseReference\getNotAttempted(), ilTrQuery\getObjectivesStatusForUser(), ilTrQuery\getObjectsDataForUser(), ilTrQuery\getObjectsStatusForUser(), ilTrQuery\getUserObjectiveMatrix(), ilCertificateAppEventListener\handleLPUpdate(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilLearningProgressGUI\initCollectionManualForm(), ILIAS\MyStaff\ListCourses\ilMStListCoursesTableGUI\initFilter(), ILIAS\MyStaff\Courses\ShowUser\ilMStShowUserCoursesTableGUI\initFilter(), ilTrSummaryTableGUI\initFilter(), ilTrObjectUsersPropsTableGUI\initFilter(), ilLPStatusCmiXapiAbstract\loadStatusInfo(), ilLPStatusCourseReference\readStatusInfo(), ilLearningProgressGUI\showtlt(), ilStudyProgrammeLPTest\testInitialLPDraft(), ilStudyProgrammeLPTest\testInitialProgressOutdated(), ilStudyProgrammeLPTest\testMarkNotRelevant(), ilStudyProgrammeLPTest\testNewNodesAreNotRelevant(), and ilLTIAppEventListener\tryOutcomeService().

◆ LP_STATUS_NOT_PARTICIPATED

const ilLPStatus::LP_STATUS_NOT_PARTICIPATED = 'trac_not_participated'

◆ LP_STATUS_NOT_REGISTERED

const ilLPStatus::LP_STATUS_NOT_REGISTERED = 'trac_not_registered'

◆ LP_STATUS_PARTICIPATED

const ilLPStatus::LP_STATUS_PARTICIPATED = 'trac_participated'

◆ LP_STATUS_REGISTERED

const ilLPStatus::LP_STATUS_REGISTERED = 'trac_registered'

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