ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
storeScorm.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
require_once __DIR__ .
"/../vendor/composer/vendor/autoload.php"
;
21
22
ilContext::init
(
ilContext::CONTEXT_SCORM
);
23
ilInitialisation::initILIAS
();
24
25
global
$DIC
;
26
$packageId
=
$DIC
->http()->wrapper()->query()->retrieve(
'package_id'
,
$DIC
->refinery()->kindlyTo()->int());
27
28
$doUnload
=
false
;
29
if
(
$DIC
->http()->wrapper()->query()->has(
'do'
)) {
30
if
(
$DIC
->http()->wrapper()->query()->retrieve(
'do'
,
$DIC
->refinery()->kindlyTo()->string()) ==
"unload"
) {
31
$doUnload
=
true
;
32
}
33
}
34
35
if
(
$doUnload
) {
36
$p =
$DIC
->http()->wrapper()->query()->retrieve(
'p'
,
$DIC
->refinery()->kindlyTo()->int());
37
$hash =
$DIC
->http()->wrapper()->query()->retrieve(
'hash'
,
$DIC
->refinery()->kindlyTo()->int());
38
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, $p, $hash);
39
ilObjSCORMTracking::scorm12PlayerUnload
();
40
}
else
{
41
global $ilUser;
42
$data
= json_decode(file_get_contents(
'php://input'
));
43
$ilUser->setId((
int
)
$data
->p);
44
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, (
int
)
$data
->p, (
int
)
$data
->hash);
45
ilObjSCORMTracking::storeJsApi
();
46
}
$DIC
global $DIC
Definition:
storeScorm.php:25
$data
$data
Definition:
storeScorm.php:42
$packageId
$packageId
Definition:
storeScorm.php:26
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:1153
$doUnload
$doUnload
Definition:
storeScorm.php:28
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 Wed Sep 10 2025 15:16:15 for ILIAS by
1.8.13 (using
Doxyfile
)