forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storeScorm.php
27 lines (22 loc) · 929 Bytes
/
storeScorm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
/**
* for storing Data also without session
* @author Uwe Kohnle <[email protected]>
* @version $Id$
*/
include_once "Services/Context/classes/class.ilContext.php";
ilContext::init(ilContext::CONTEXT_SCORM);
require_once("Services/Init/classes/class.ilInitialisation.php");
ilInitialisation::initILIAS();
include_once 'Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php';
if ((string) $_GET['do'] == "unload") {
ilObjSCORMTracking::checkIfAllowed((int) $_GET['package_id'], (int) $_GET['p'], (int) $_GET['hash']);
ilObjSCORMTracking::scorm12PlayerUnload();
} else {
global $ilUser;
$data = file_get_contents('php://input');
$ilUser->setId($data->p);
ilObjSCORMTracking::checkIfAllowed((int) $_GET['package_id'], (int) $data->p, (int) $data->hash);
ilObjSCORMTracking::storeJsApi();
}