ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
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 Sun Aug 31 2025 22:02:50 for ILIAS by
1.8.13 (using
Doxyfile
)