19 declare(strict_types=1);
22 require_once
'vendor/composer/vendor/autoload.php';
39 $error = array(
'error-code' => 3,
'error-text' =>
'invalid request: missing or empty param request parameter');
46 $param = json_decode(openssl_decrypt(
60 #\XapiProxy\DataService::initIlias($_COOKIE['ilClientId']); 64 $error = array(
'error-code' =>
'3',
'error-text' =>
'internal server error');
72 $tokenCmi5Session =
$token->getCmi5Session();
73 $alreadyReturnedCmi5Session =
$token->getReturnedForCmi5Session();
74 if ($tokenCmi5Session == $alreadyReturnedCmi5Session) {
79 $error = array(
'error-code' =>
'1',
'error-text' =>
'The authorization token has already been returned.');
83 $token->setReturnedForCmi5Session($tokenCmi5Session);
86 if ($object->isBypassProxyEnabled()) {
87 $authToken = $object->getLrsType()->getBasicAuthWithoutBasic();
96 $error = array(
'error-code' =>
'2',
'error-text' =>
'could not create valid session from token.');
103 header(
'Access-Control-Allow-Origin: ' .
$_SERVER[
"HTTP_ORIGIN"]);
105 header(
'Access-Control-Allow-Credentials: true');
106 header(
'Content-type:application/json;charset=utf-8');
$tokenRestriction
see: https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#fetch_url response should al...
const OPENSSL_ENCRYPTION_METHOD
static initILIAS()
ilias initialisation
static getInstanceByObjIdAndRefIdAndUsrId(int $objId, int $refId, int $usrId, bool $checkValid=true)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
catch(ilCmiXapiException $e) send($response)