ILIAS
trunk Revision v12.0_alpha-1221-g4e438232683
◀ ilDoc Overview
storeScorm.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
require_once __DIR__ .
"/../vendor/composer/vendor/autoload.php"
;
22
23
ilContext::init
(
ilContext::CONTEXT_SCORM
);
24
25
require_once __DIR__ .
'/../artifacts/bootstrap_default.php'
;
26
entry_point
(
'ILIAS Legacy Initialisation Adapter'
);
27
28
global
$DIC
;
29
$packageId
=
$DIC
->http()->wrapper()->query()->retrieve(
'package_id'
,
$DIC
->refinery()->kindlyTo()->int());
30
31
$doUnload
=
false
;
32
if
(
$DIC
->http()->wrapper()->query()->has(
'do'
)) {
33
if
(
$DIC
->http()->wrapper()->query()->retrieve(
'do'
,
$DIC
->refinery()->kindlyTo()->string()) ==
"unload"
) {
34
$doUnload
=
true
;
35
}
36
}
37
38
if
(
$doUnload
) {
39
$p =
$DIC
->http()->wrapper()->query()->retrieve(
'p'
,
$DIC
->refinery()->kindlyTo()->int());
40
$hash =
$DIC
->http()->wrapper()->query()->retrieve(
'hash'
,
$DIC
->refinery()->kindlyTo()->int());
41
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, $p, $hash);
42
ilObjSCORMTracking::scorm12PlayerUnload
();
43
}
else
{
44
global $ilUser;
45
$data
= json_decode(file_get_contents(
'php://input'
));
46
$ilUser->setId((
int
)
$data
->p);
47
ilObjSCORMTracking::checkIfAllowed
(
$packageId
, (
int
)
$data
->p, (
int
)
$data
->hash);
48
ilObjSCORMTracking::storeJsApi
();
49
}
ilContext\CONTEXT_SCORM
const CONTEXT_SCORM
Definition:
ilContext.php:42
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
ilContext.php:52
ilObjSCORMTracking\storeJsApi
static storeJsApi()
Definition:
class.ilObjSCORMTracking.php:28
ilObjSCORMTracking\checkIfAllowed
static checkIfAllowed(int $packageId, int $userId, int $hash)
Definition:
class.ilObjSCORMTracking.php:609
ilObjSCORMTracking\scorm12PlayerUnload
static scorm12PlayerUnload()
Definition:
class.ilObjSCORMTracking.php:575
entry_point
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
result1.php:21
$packageId
$packageId
Definition:
storeScorm.php:29
$DIC
global $DIC
Definition:
storeScorm.php:28
$data
$data
Definition:
storeScorm.php:45
$doUnload
$doUnload
Definition:
storeScorm.php:31
components
ILIAS
Scorm2004
resources
storeScorm.php
Generated on Sun Apr 5 2026 23:03:40 for ILIAS by
1.9.4 (using
Doxyfile
)