ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilLPStatusContentVisited.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
5require_once 'Services/Tracking/classes/class.ilLPStatus.php';
6require_once 'Services/Tracking/classes/class.ilLearningProgress.php';
7
13{
17 public static function _getCompleted($a_obj_id)
18 {
19 $userIds = [];
20
21 $allReadEvents = \ilChangeEvent::_lookupReadEvents($a_obj_id);
22 foreach ($allReadEvents as $event) {
23 $userIds[] = $event['usr_id'];
24 }
25
26 return $userIds;
27 }
28
32 public function determineStatus($a_obj_id, $a_user_id, $a_obj = null)
33 {
37 global $DIC;
38
39 $ilObjDataCache = $DIC['ilObjDataCache'];
40
42
43 switch ($ilObjDataCache->lookupType($a_obj_id)) {
44 case 'file':
45 case 'copa':
46 if (\ilChangeEvent::hasAccessed($a_obj_id, $a_user_id)) {
48 }
49 break;
50 }
51
52 return $status;
53 }
54}
An exception for terminatinating execution or to throw for unit testing.
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 ...
static hasAccessed($a_obj_id, $a_usr_id)
Has accessed.
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
const LP_STATUS_COMPLETED_NUM
determineStatus($a_obj_id, $a_usr_id, $a_obj=null)
Determine status.
const LP_STATUS_NOT_ATTEMPTED_NUM
global $DIC
Definition: saml.php:7