ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
storeScorm.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
22
23global $DIC;
24$packageId = $DIC->http()->wrapper()->query()->retrieve('package_id', $DIC->refinery()->kindlyTo()->int());
25
26$doUnload = false;
27if ($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
33if ($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());
38} else {
39 global $ilUser;
40 $data = json_decode(file_get_contents('php://input'));
41 $ilUser->setId((int) $data->p);
44}
const CONTEXT_SCORM
static init(string $a_type)
Init context by type.
static initILIAS()
ilias initialisation
static checkIfAllowed(int $packageId, int $userId, int $hash)
$packageId
Definition: storeScorm.php:24
global $DIC
Definition: storeScorm.php:23
$data
Definition: storeScorm.php:40
$doUnload
Definition: storeScorm.php:26