19 declare(strict_types=0);
26 $users = $status_info[
'in_progress'];
27 return array_unique($users);
33 $users = $status_info[
'completed'];
34 return array_unique($users);
40 $users = $status_info[
'failed'];
41 return array_unique($users);
46 $status_info[
'subtype'] =
"scorm2004";
49 $status_info[
'completed'] = $info[
'completed'];
50 $status_info[
'failed'] = $info[
'failed'];
51 $status_info[
'in_progress'] = $info[
'in_progress'];
72 $ilLog = $DIC[
'ilLog'];
78 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
79 switch ($scorm_status) {
81 $status = self::LP_STATUS_IN_PROGRESS_NUM;
84 $status = self::LP_STATUS_COMPLETED_NUM;
87 $status = self::LP_STATUS_FAILED_NUM;
96 parent::refreshStatus($a_obj_id, $a_users);
101 $all_active_users = array_unique(
102 array_merge($in_progress, $completed, $failed)
108 $not_attempted_users = array_diff(
112 unset($all_tracked_users);
113 unset($all_active_users);
116 if ($not_attempted_users) {
117 foreach ($not_attempted_users as $usr_id) {
122 self::LP_STATUS_NOT_ATTEMPTED_NUM,
132 ?
object $a_obj =
null static _getProgressInfoOfUser(int $a_obj_id, int $a_user_id)
Get overall scorm status.
static _getProgressInfo(int $a_obj_id)
Get overall scorm status.
refreshStatus(int $a_obj_id, ?array $a_users=null)
static _getCompleted(int $a_obj_id)
Static function to read the users who have the status 'completed'.
static _getStatusInfo(int $a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
static _getTrackedUsers(int $a_obj_id)
Get all tracked users.
static _getInProgress(int $a_obj_id)
Static function to read users who have the status 'in_progress'.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _getFailed(int $a_obj_id)
Static function to read the users who have the status 'completed'.
determineStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
Determine status.
ilObjectDataCache $ilObjDataCache
static _getInProgress(int $a_obj_id)
static _getFailed(int $a_obj_id)
determinePercentage(int $a_obj_id, int $a_usr_id, ?object $a_obj=null)
static _getStatusInfo(int $a_obj_id)
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.
static _getCompleted(int $a_obj_id)