ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
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
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
storeScorm.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
require_once(
"Services/Init/classes/class.ilInitialisation.php"
);
21
ilContext::init
(
ilContext::CONTEXT_SCORM
);
22
ilInitialisation::initILIAS
();
23
24
global
$DIC
;
25
$packageId
=
$DIC
->http()->wrapper()->query()->retrieve(
'package_id'
,
$DIC
->refinery()->kindlyTo()->int());
26
27
$doUnload
=
false
;
28
if
(
$DIC
->http()->wrapper()->query()->has(
'do'
)) {
29
if
(
$DIC
->http()->wrapper()->query()->retrieve(
'do'
,
$DIC
->refinery()->kindlyTo()->string()) ==
"unload"
) {
30
$doUnload
=
true
;
31
}
32
}
33
34
if
(
$doUnload
) {
35
$p =
$DIC
->http()->wrapper()->query()->retrieve(
'p'
,
$DIC
->refinery()->kindlyTo()->int());
36
$hash =
$DIC
->http()->wrapper()->query()->retrieve(
'hash'
,
$DIC
->refinery()->kindlyTo()->int());
37
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, $p, $hash);
38
ilObjSCORMTracking::scorm12PlayerUnload
();
39
}
else
{
40
global
$ilUser
;
41
$data
= json_decode(file_get_contents(
'php://input'
));
42
$ilUser->setId((
int
)
$data
->p);
43
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, (
int
)
$data
->p, (
int
)
$data
->hash);
44
ilObjSCORMTracking::storeJsApi
();
45
}
$DIC
global $DIC
Definition:
storeScorm.php:24
$data
$data
Definition:
storeScorm.php:41
$packageId
$packageId
Definition:
storeScorm.php:25
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:1225
$doUnload
$doUnload
Definition:
storeScorm.php:27
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
class.ilContext.php:52
$ilUser
$ilUser
Definition:
imgupload.php:34
ilObjSCORMTracking\checkIfAllowed
static checkIfAllowed(int $packageId, int $userId, int $hash)
Definition:
class.ilObjSCORMTracking.php:616
ilObjSCORMTracking\scorm12PlayerUnload
static scorm12PlayerUnload()
Definition:
class.ilObjSCORMTracking.php:582
storeScorm.php
Generated on Mon Apr 14 2025 22:03:06 for ILIAS by
1.8.13 (using
Doxyfile
)