ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
storeScorm.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_once __DIR__ . "/../vendor/composer/vendor/autoload.php";
22
24
25require_once __DIR__ . '/../artifacts/bootstrap_default.php';
26entry_point('ILIAS Legacy Initialisation Adapter');
27
28global $DIC;
29$packageId = $DIC->http()->wrapper()->query()->retrieve('package_id', $DIC->refinery()->kindlyTo()->int());
30
31$doUnload = false;
32if ($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
38if ($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());
43} else {
44 global $ilUser;
45 $data = json_decode(file_get_contents('php://input'));
46 $ilUser->setId((int) $data->p);
49}
const CONTEXT_SCORM
Definition: ilContext.php:42
static init(string $a_type)
Init context by type.
Definition: ilContext.php:52
static checkIfAllowed(int $packageId, int $userId, int $hash)
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
Definition: storeScorm.php:29
global $DIC
Definition: storeScorm.php:28
$data
Definition: storeScorm.php:45
$doUnload
Definition: storeScorm.php:31