ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
storeScorm.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
22 
23 global $DIC;
24 $packageId = $DIC->http()->wrapper()->query()->retrieve('package_id', $DIC->refinery()->kindlyTo()->int());
25 
26 $doUnload = false;
27 if ($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 
33 if ($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 }
global $DIC
Definition: storeScorm.php:23
$data
Definition: storeScorm.php:40
$packageId
Definition: storeScorm.php:24
const CONTEXT_SCORM
static initILIAS()
ilias initialisation
$doUnload
Definition: storeScorm.php:26
static init(string $a_type)
Init context by type.
static checkIfAllowed(int $packageId, int $userId, int $hash)