14 require_once
'Services/Tracking/classes/status/class.ilLPStatusPlugin.php';
29 return self::getLPStatusData($a_obj_id, $a_status);
42 return self::getLPDataForUser($a_obj_id, $a_user_id);
56 public static function trackAccess($a_user_id, $a_obj_id, $a_ref_id)
58 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
61 $status = self::getLPDataForUser($a_obj_id, $a_user_id);
62 if ($status == self::LP_STATUS_NOT_ATTEMPTED_NUM) {
63 self::writeStatus($a_obj_id, $a_user_id, self::LP_STATUS_IN_PROGRESS_NUM);
64 self::raiseEventStatic(
67 self::LP_STATUS_IN_PROGRESS_NUM,
68 self::getPercentageForUser($a_obj_id, $a_user_id)
83 public static function trackResult($a_user_id, $a_obj_id, $a_status = self::LP_STATUS_IN_PROGRESS_NUM, $a_percentage)
85 self::writeStatus($a_obj_id, $a_user_id, $a_status, $a_percentage,
true);
86 self::raiseEventStatic($a_obj_id, $a_user_id, $a_status, $a_percentage);
98 protected static function raiseEventStatic($a_obj_id, $a_usr_id, $a_status, $a_percentage)
102 $DIC->event()->raise(
"Services/Tracking",
"updateStatus", array(
103 "obj_id" => $a_obj_id,
104 "usr_id" => $a_usr_id,
105 "status" => $a_status,
106 "percentage" => $a_percentage
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 raiseEventStatic($a_obj_id, $a_usr_id, $a_status, $a_percentage)
Static version if ilLPStatus::raiseEvent This function is just a workaround for PHP7 until ilLPStatus...
static trackAccess($a_user_id, $a_obj_id, $a_ref_id)
Track read access to the object Prevents a call of determineStatus() that would return "not attempted...
static getLPDataForUserFromDb($a_obj_id, $a_user_id)
Get the LP data directly from the database table This can be called from ilLTIConsumer::getLP* method...
static trackResult($a_user_id, $a_obj_id, $a_status=self::LP_STATUS_IN_PROGRESS_NUM, $a_percentage)
Track result from the LTI Consumer.
static getLPStatusDataFromDb($a_obj_id, $a_status)
Get the LP status data directly from the database table This can be called from ilLTIConsumer::getLP*...