◆ _getProgress()
ilLearningProgress::_getProgress |
( |
|
$a_user_id, |
|
|
|
$a_obj_id |
|
) |
| |
Definition at line 61 of file class.ilLearningProgress.php.
References $row, ilChangeEvent\_lookupReadEvents(), IL_CAL_TIMESTAMP, and IL_CAL_UNIX.
Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), and ilInfoScreenGUI\showLearningProgress().
63 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
66 include_once
'./Services/Calendar/classes/class.ilDateTime.php';
68 foreach($events as
$row)
75 $progress[
'spent_seconds'] += $row[
'spent_seconds'];
76 $progress[
'access_time'] = max($progress[
'access_time'], $row[
'last_access']);
80 $progress[
'obj_id'] = $row[
'obj_id'];
81 $progress[
'user_id'] = $row[
'usr_id'];
82 $progress[
'spent_seconds'] = $row[
'spent_seconds'];
83 $progress[
'access_time'] = $row[
'last_access'];
84 $progress[
'visits'] = $row[
'read_count'];
87 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 ...
◆ _lookupProgressByObjId()
static ilLearningProgress::_lookupProgressByObjId |
( |
|
$a_obj_id | ) |
|
|
static |
lookup progress for a specific object
public
- Parameters
-
- Returns
- array of progress data
Definition at line 97 of file class.ilLearningProgress.php.
References $row, and ilChangeEvent\_lookupReadEvents().
Referenced by ilObjCourseGUI\fetchPrintMemberData(), ilObjGroupGUI\readMemberData(), and ilObjCourseGUI\readMemberData().
99 include_once(
'./Services/Tracking/classes/class.ilChangeEvent.php');
102 if(isset($progress[$row[
'usr_id']]))
104 $progress[$row[
'usr_id']][
'spent_seconds'] += $row[
'spent_seconds'];
105 $progress[$row[
'usr_id']][
'read_count'] += $row[
'read_count'];
106 $progress[$row[
'usr_id']][
'ts'] = max($row[
'last_access'],$progress[$row[
'usr_id']][
'ts']);
110 $progress[$row[
'usr_id']][
'spent_seconds'] = $row[
'spent_seconds'];
111 $progress[$row[
'usr_id']][
'read_count'] = $row[
'read_count'];
112 $progress[$row[
'usr_id']][
'ts'] = $row[
'last_access'];
115 $progress[$row[
'usr_id']][
'usr_id'] = $row[
'usr_id'];
116 $progress[$row[
'usr_id']][
'obj_id'] = $row[
'obj_id'];
118 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 ...
◆ _tracProgress()
static ilLearningProgress::_tracProgress |
( |
|
$a_user_id, |
|
|
|
$a_obj_id, |
|
|
|
$a_ref_id, |
|
|
|
$a_obj_type = '' |
|
) |
| |
|
static |
Definition at line 48 of file class.ilLearningProgress.php.
References $ilDB, ilChangeEvent\_recordReadEvent(), and ilLPStatus\setInProgressIfNotAttempted().
Referenced by ilTestSessionDynamicQuestionSet\saveToDb(), ilTestSession\saveToDb(), ilObjFileBasedLMGUI\showLearningModule(), ilObjExerciseGUI\showOverviewObject(), ilLMTracker\trackAccess(), ilObjCourseGUI\viewObject(), and ilObjGroupGUI\viewObject().
52 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
55 require_once
'Services/Tracking/classes/class.ilLPStatus.php';
_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".
◆ ilLearningProgress()
ilLearningProgress::ilLearningProgress |
( |
| ) |
|
◆ $db
ilLearningProgress::$db = null |
The documentation for this class was generated from the following file: