ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
storeScorm.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
ilContext::init
(
ilContext::CONTEXT_SCORM
);
21
ilInitialisation::initILIAS
();
22
23
global
$DIC
;
24
$packageId
=
$DIC
->http()->wrapper()->query()->retrieve(
'package_id'
,
$DIC
->refinery()->kindlyTo()->int());
25
26
$doUnload
=
false
;
27
if
(
$DIC
->http()->wrapper()->query()->has(
'do'
)) {
28
if
(
$DIC
->http()->wrapper()->query()->retrieve(
'do'
,
$DIC
->refinery()->kindlyTo()->string()) ==
"unload"
) {
29
$doUnload
=
true
;
30
}
31
}
32
33
if
(
$doUnload
) {
34
$p =
$DIC
->http()->wrapper()->query()->retrieve(
'p'
,
$DIC
->refinery()->kindlyTo()->int());
35
$hash =
$DIC
->http()->wrapper()->query()->retrieve(
'hash'
,
$DIC
->refinery()->kindlyTo()->int());
36
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, $p, $hash);
37
ilObjSCORMTracking::scorm12PlayerUnload
();
38
}
else
{
39
global $ilUser;
40
$data
= json_decode(file_get_contents(
'php://input'
));
41
$ilUser->setId((
int
)
$data
->p);
42
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, (
int
)
$data
->p, (
int
)
$data
->hash);
43
ilObjSCORMTracking::storeJsApi
();
44
}
$DIC
global $DIC
Definition:
storeScorm.php:23
$data
$data
Definition:
storeScorm.php:40
$packageId
$packageId
Definition:
storeScorm.php:24
ilObjSCORMTracking\storeJsApi
static storeJsApi()
Definition:
class.ilObjSCORMTracking.php:28
ilContext\CONTEXT_SCORM
const CONTEXT_SCORM
Definition:
class.ilContext.php:42
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:1145
$doUnload
$doUnload
Definition:
storeScorm.php:26
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
class.ilContext.php:52
ilObjSCORMTracking\checkIfAllowed
static checkIfAllowed(int $packageId, int $userId, int $hash)
Definition:
class.ilObjSCORMTracking.php:612
ilObjSCORMTracking\scorm12PlayerUnload
static scorm12PlayerUnload()
Definition:
class.ilObjSCORMTracking.php:578
components
ILIAS
Scorm2004
resources
storeScorm.php
Generated on Sat Apr 5 2025 23:03:54 for ILIAS by
1.8.13 (using
Doxyfile
)