ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
storeScorm.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
20require_once("Services/Init/classes/class.ilInitialisation.php");
23
24global $DIC;
25$packageId = $DIC->http()->wrapper()->query()->retrieve('package_id', $DIC->refinery()->kindlyTo()->int());
26
27$doUnload = false;
28if ($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
34if ($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());
39} else {
40 global $ilUser;
41 $data = json_decode(file_get_contents('php://input'));
42 $ilUser->setId((int) $data->p);
45}
const CONTEXT_SCORM
static init(string $a_type)
Init context by type.
static initILIAS()
ilias initialisation
static checkIfAllowed(int $packageId, int $userId, int $hash)
$ilUser
Definition: imgupload.php:34
$packageId
Definition: storeScorm.php:25
global $DIC
Definition: storeScorm.php:24
$data
Definition: storeScorm.php:41
$doUnload
Definition: storeScorm.php:27