◆ __construct()
ilLearningProgress::__construct |
( |
| ) |
|
◆ _getProgress()
static ilLearningProgress::_getProgress |
( |
|
$a_user_id, |
|
|
|
$a_obj_id |
|
) |
| |
|
static |
Definition at line 55 of file class.ilLearningProgress.php.
References $row, ilChangeEvent\_lookupReadEvents(), array, IL_CAL_DATETIME, and IL_CAL_UNIX.
Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilScormMailTemplateLPContext\getDescription(), ilCourseMailTemplateTutorContext\getDescription(), and ilInfoScreenGUI\showLearningProgress().
57 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
60 include_once
'./Services/Calendar/classes/class.ilDateTime.php';
62 foreach ($events as
$row) {
70 $progress[
'spent_seconds'] += $row[
'spent_seconds'];
71 $progress[
'access_time'] = max($progress[
'access_time'], $row[
'last_access']);
72 $progress[
'access_time_min'] = min($progress[
'access_time_min'], $row[
'first_access']);
74 $progress[
'obj_id'] = $row[
'obj_id'];
75 $progress[
'user_id'] = $row[
'usr_id'];
76 $progress[
'spent_seconds'] = $row[
'spent_seconds'];
77 $progress[
'access_time'] = $row[
'last_access'];
78 $progress[
'access_time_min'] = $row[
'first_access'];
79 $progress[
'visits'] = $row[
'read_count'];
82 return $progress ? $progress :
array();
static _lookupReadEvents($obj_id, $usr_id=null)
Reads all read events which occured on the object which happened after the last time the user caught ...
Create styles array
The data for the language used.
◆ _lookupProgressByObjId()
static ilLearningProgress::_lookupProgressByObjId |
( |
|
$a_obj_id | ) |
|
|
static |
lookup progress for a specific object
public
- Parameters
-
- Returns
- array of progress data
Definition at line 92 of file class.ilLearningProgress.php.
References $row, ilChangeEvent\_lookupReadEvents(), and array.
Referenced by ilCourseMembershipGUI\getPrintMemberData(), ilObjGroupGUI\readMemberData(), and ilObjCourseGUI\readMemberData().
94 include_once(
'./Services/Tracking/classes/class.ilChangeEvent.php');
96 if (isset($progress[$row[
'usr_id']])) {
97 $progress[$row[
'usr_id']][
'spent_seconds'] += $row[
'spent_seconds'];
98 $progress[$row[
'usr_id']][
'read_count'] += $row[
'read_count'];
99 $progress[$row[
'usr_id']][
'ts'] = max($row[
'last_access'], $progress[$row[
'usr_id']][
'ts']);
101 $progress[$row[
'usr_id']][
'spent_seconds'] = $row[
'spent_seconds'];
102 $progress[$row[
'usr_id']][
'read_count'] = $row[
'read_count'];
103 $progress[$row[
'usr_id']][
'ts'] = $row[
'last_access'];
105 $progress[$row[
'usr_id']][
'usr_id'] = $row[
'usr_id'];
106 $progress[$row[
'usr_id']][
'obj_id'] = $row[
'obj_id'];
108 return $progress ? $progress :
array();
static _lookupReadEvents($obj_id, $usr_id=null)
Reads all read events which occured on the object which happened after the last time the user caught ...
Create styles array
The data for the language used.
◆ _tracProgress()
static ilLearningProgress::_tracProgress |
( |
|
$a_user_id, |
|
|
|
$a_obj_id, |
|
|
|
$a_ref_id, |
|
|
|
$a_obj_type = '' |
|
) |
| |
|
static |
Definition at line 44 of file class.ilLearningProgress.php.
References ilChangeEvent\_recordReadEvent(), and ilLPStatus\setInProgressIfNotAttempted().
Referenced by ilObjGroupGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilSurveyExecutionGUI\outSurveyPage(), ilTestSessionDynamicQuestionSet\saveToDb(), ilObjFileBasedLMGUI\showLearningModule(), ilObjExerciseGUI\showOverviewObject(), ilLMTracker\trackAccess(), ilObjFolderGUI\viewObject(), ilObjCourseGUI\viewObject(), and ilObjGroupGUI\viewObject().
46 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
49 require_once
'Services/Tracking/classes/class.ilLPStatus.php';
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static setInProgressIfNotAttempted($a_obj_id, $a_user_id)
This function shoudl be clalled for normal "read events".
◆ $db
ilLearningProgress::$db = null |
The documentation for this class was generated from the following file: