ILIAS
release_4-3 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilLPStatusSCORMPackage.php
Go to the documentation of this file.
1
<?php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
32
include_once
'./Services/Tracking/classes/class.ilLPStatus.php'
;
33
34
class
ilLPStatusSCORMPackage
extends
ilLPStatus
35
{
36
37
function
ilLPStatusSCORMPackage
($a_obj_id)
38
{
39
global $ilDB;
40
41
parent::ilLPStatus
($a_obj_id);
42
$this->db =& $ilDB;
43
}
44
45
function
_getInProgress
($a_obj_id)
46
{
47
$status_info =
ilLPStatusWrapper::_getStatusInfo
($a_obj_id);
48
$users = $status_info[
'in_progress'
];
49
return
array_unique($users);
50
}
51
52
function
_getCompleted
($a_obj_id)
53
{
54
$status_info =
ilLPStatusWrapper::_getStatusInfo
($a_obj_id);
55
$users = $status_info[
'completed'
];
56
return
array_unique($users);
57
}
58
59
function
_getFailed
($a_obj_id)
60
{
61
$status_info =
ilLPStatusWrapper::_getStatusInfo
($a_obj_id);
62
$users = $status_info[
'failed'
];
63
return
array_unique($users);
64
}
65
66
67
function
_getStatusInfo
($a_obj_id)
68
{
69
include_once
'./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php'
;
70
$status_info[
'subtype'
] =
"scorm2004"
;
71
$info =
ilSCORM2004Tracking::_getProgressInfo
($a_obj_id);
72
73
$status_info[
'completed'
] = $info[
'completed'
];
74
$status_info[
'failed'
] = $info[
'failed'
];
75
$status_info[
'in_progress'
] = $info[
'in_progress'
];
76
77
return
$status_info;
78
}
79
88
function
determineStatus
($a_obj_id, $a_user_id, $a_obj = null)
89
{
90
global $ilObjDataCache, $ilDB,
$ilLog
;
91
92
include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Tracking.php"
);
93
$scorm_status =
ilSCORM2004Tracking::_getProgressInfoOfUser
($a_obj_id, $a_user_id);
94
$status =
LP_STATUS_NOT_ATTEMPTED_NUM
;
95
switch
($scorm_status)
96
{
97
case
"in_progress"
:
98
$status =
LP_STATUS_IN_PROGRESS_NUM
;
99
break
;
100
case
"completed"
:
101
$status =
LP_STATUS_COMPLETED_NUM
;
102
break
;
103
case
"failed"
:
104
$status =
LP_STATUS_FAILED_NUM
;
105
break
;
106
}
107
108
return
$status;
109
}
110
111
}
112
?>
Services
Tracking
classes
class.ilLPStatusSCORMPackage.php
Generated on Sat Apr 30 2016 19:01:16 for ILIAS by
1.8.1.2 (using
Doxyfile
)