ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
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:611
ilObjSCORMTracking\scorm12PlayerUnload
static scorm12PlayerUnload()
Definition:
class.ilObjSCORMTracking.php:577
components
ILIAS
Scorm2004
resources
storeScorm.php
Generated on Sun Aug 31 2025 23:03:38 for ILIAS by
1.8.13 (using
Doxyfile
)