Skip to content

Commit

Permalink
Merge branch 'trunk' into 9_remove_pdf_service_cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
gvollbach committed Oct 19, 2023
2 parents 05565a9 + e6cdcc7 commit 5977bb2
Show file tree
Hide file tree
Showing 452 changed files with 9,268 additions and 11,772 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/Services/UICore/artifacts/ctrl_security.php
/Services/Component/artifacts/*
/Services/EventHandling/artifacts/*
/Services/Object/artifacts/*

# Directories
/data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ class ilCmiXapiPlaceholderValues implements ilCertificatePlaceholderValues

private ?\ilCertificateObjectHelper $objectHelper;

// private \ilCertificateUserObjectHelper $userObjectHelper;
// private \ilCertificateUserObjectHelper $userObjectHelper;

private ?\ilCertificateUtilHelper $utilHelper;

// private ?\ilCertificateLPStatusHelper $lpStatusHelper;
// private ?\ilCertificateLPStatusHelper $lpStatusHelper;

/**
* @var ilCertificateDateHelper|ilDatePresentation|null
*/
// private $dateHelper;
// private $dateHelper;

private ?\ilLanguage $language;

Expand Down Expand Up @@ -84,12 +84,12 @@ public function __construct(
if (null === $userObjectHelper) {
$userObjectHelper = new ilCertificateUserObjectHelper();
}
// $this->userObjectHelper = $userObjectHelper;
// $this->userObjectHelper = $userObjectHelper;

if (null === $lpStatusHelper) {
$lpStatusHelper = new ilCertificateLPStatusHelper();
}
// $this->lpStatusHelper = $lpStatusHelper;
// $this->lpStatusHelper = $lpStatusHelper;

if (null === $utilHelper) {
$utilHelper = new ilCertificateUtilHelper();
Expand All @@ -99,7 +99,7 @@ public function __construct(
if (null === $dateHelper) {
$dateHelper = new ilCertificateDateHelper();
}
// $this->dateHelper = $dateHelper;
// $this->dateHelper = $dateHelper;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function save(): void
$newObj = $certificateVerificationFileService->createFile($userCertificatePresentation);
} catch (\Exception $exception) {
$this->tpl->setOnScreenMessage('failure', $this->lng->txt('error_creating_certificate_pdf'));
// $this->create();
// $this->create();
}

if ($newObj !== null) {
Expand Down
8 changes: 4 additions & 4 deletions Modules/CmiXapi/classes/XapiProxy/DataService.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public static function initIlias(string $client_id): void
$_GET['client_id'] = $client_id;

// Im Plugin war das auskommentiert(?)
// define('IL_COOKIE_HTTPONLY', true); // Default Value
// define('IL_COOKIE_EXPIRE', 0);
// define('IL_COOKIE_PATH', '/');
// define('IL_COOKIE_DOMAIN', '');
// define('IL_COOKIE_HTTPONLY', true); // Default Value
// define('IL_COOKIE_EXPIRE', 0);
// define('IL_COOKIE_PATH', '/');
// define('IL_COOKIE_DOMAIN', '');
require_once("Services/Init/classes/class.ilInitialisation.php");
\ilContext::init(\ilContext::CONTEXT_SCORM);
\ilInitialisation::initILIAS();
Expand Down
2 changes: 1 addition & 1 deletion Modules/CmiXapi/classes/XapiProxy/XapiProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function processStatements(\Psr\Http\Message\RequestInterface $request, $
if ($up === []) { // nothing allowed
$this->log()->debug($this->msg("no allowed statements in array - fake response..."));
$this->xapiProxyResponse->fakeResponseBlocked("");
// $this->xapiProxyResponse->fakeResponseBlocked($ret);
// $this->xapiProxyResponse->fakeResponseBlocked($ret);
} elseif (count($up) !== count($ret)) { // mixed request with allowed and not allowed statements
$this->log()->debug($this->msg("mixed with allowed and unallowed statements"));
return array($up,$ret);
Expand Down
48 changes: 24 additions & 24 deletions Modules/CmiXapi/classes/XapiProxy/XapiProxyPolyFill.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ public function msg(string $msg): string
public function initLrs(): void
{
$this->log()->debug($this->msg('initLrs'));
// if ($this->plugin) {
// try {
// $authToken = \ilXapiCmi5AuthToken::getInstanceByToken($this->token);
// }
// catch (\ilXapiCmi5Exception $e) {
// $this->log()->error($this->msg($e->getMessage()));
// header('HTTP/1.1 401 Unauthorized');
// header('Access-Control-Allow-Origin: '.$_SERVER["HTTP_ORIGIN"]);
// header('Access-Control-Allow-Credentials: true');
// exit;
// }
// $this->authToken = $authToken;
// $this->getLrsTypePlugin();
// }
// else {
// if ($this->plugin) {
// try {
// $authToken = \ilXapiCmi5AuthToken::getInstanceByToken($this->token);
// }
// catch (\ilXapiCmi5Exception $e) {
// $this->log()->error($this->msg($e->getMessage()));
// header('HTTP/1.1 401 Unauthorized');
// header('Access-Control-Allow-Origin: '.$_SERVER["HTTP_ORIGIN"]);
// header('Access-Control-Allow-Credentials: true');
// exit;
// }
// $this->authToken = $authToken;
// $this->getLrsTypePlugin();
// }
// else {
try {
$authToken = \ilCmiXapiAuthToken::getInstanceByToken($this->token);
} catch (\ilCmiXapiException $e) {
Expand All @@ -113,7 +113,7 @@ public function initLrs(): void

$this->authToken = $authToken;
$this->getLrsType();
// }
// }
}

private function getLrsTypePlugin(): void
Expand All @@ -128,13 +128,13 @@ private function getLrsTypePlugin(): void
header('Access-Control-Allow-Credentials: true');
exit;
}
// $this->defaultLrsEndpoint = $lrsType->getDefaultLrsEndpoint();
// $this->defaultLrsKey = $lrsType->getDefaultLrsKey();
// $this->defaultLrsSecret = $lrsType->getDefaultLrsSecret();
//
// $this->fallbackLrsEndpoint = $lrsType->getFallbackLrsEndpoint();
// $this->fallbackLrsKey = $lrsType->getFallbackLrsKey();
// $this->fallbackLrsSecret = $lrsType->getFallbackLrsSecret();
// $this->defaultLrsEndpoint = $lrsType->getDefaultLrsEndpoint();
// $this->defaultLrsKey = $lrsType->getDefaultLrsKey();
// $this->defaultLrsSecret = $lrsType->getDefaultLrsSecret();
//
// $this->fallbackLrsEndpoint = $lrsType->getFallbackLrsEndpoint();
// $this->fallbackLrsKey = $lrsType->getFallbackLrsKey();
// $this->fallbackLrsSecret = $lrsType->getFallbackLrsSecret();

$this->lrsType = $lrsType;
} catch (\Exception $e) {
Expand Down Expand Up @@ -210,7 +210,7 @@ private function getLrsTypeAndMoreByToken(): ?\ilCmiXapiLrsType
while ($row = $db->fetchObject($res)) {
$type_id = (int) $row->lrs_type_id;
if ($type_id) {
// $lrs = ($this->plugin) ? new \ilXapiCmi5LrsType($type_id) : new \ilCmiXapiLrsType($type_id);
// $lrs = ($this->plugin) ? new \ilXapiCmi5LrsType($type_id) : new \ilCmiXapiLrsType($type_id);
$lrs = new \ilCmiXapiLrsType($type_id);
}

Expand Down
4 changes: 2 additions & 2 deletions Modules/CmiXapi/classes/XapiProxy/XapiProxyResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

class XapiProxyResponse
{
// private $dic;
// private $dic;
private XapiProxy $xapiproxy;
//private $xapiProxyRequest;

public function __construct(XapiProxy $xapiproxy)
{
// $this->dic = $GLOBALS['DIC'];
// $this->dic = $GLOBALS['DIC'];
$this->xapiproxy = $xapiproxy;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ public function getUserRank(): ?int

public function getResponseDebug(): string
{
// foreach($this->response as $key => $item)
// {
// $user = ilCmiXapiUser::getUserFromIdent(
// ilObjectFactory::getInstanceByRefId($_GET['ref_id']),
// $tableRowData['mbox']
// );
//
// $this->response[$key]['realname'] = $user->getFullname();
// }
// foreach($this->response as $key => $item)
// {
// $user = ilCmiXapiUser::getUserFromIdent(
// ilObjectFactory::getInstanceByRefId($_GET['ref_id']),
// $tableRowData['mbox']
// );
//
// $this->response[$key]['realname'] = $user->getFullname();
// }
return '<pre>' . json_encode($this->response, JSON_PRETTY_PRINT) . '</pre>';
}
}
4 changes: 2 additions & 2 deletions Modules/CmiXapi/classes/class.ilCmiXapiDataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public function __construct(int $a_id = 0, bool $a_reference = true)
global $DIC;
/** @var \ILIAS\DI\Container $DIC */

// $this->_main_object_id = $a_id;
// $this->_dataSetMapping = ilObjCmiXapi::getInstance($a_id, $a_reference)->getDataSetMapping();
// $this->_main_object_id = $a_id;
// $this->_dataSetMapping = ilObjCmiXapi::getInstance($a_id, $a_reference)->getDataSetMapping();

//var_dump($this->_dataSetMapping); exit;
parent::__construct();
Expand Down
2 changes: 1 addition & 1 deletion Modules/CmiXapi/classes/class.ilCmiXapiExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ilCmiXapiExporter extends ilXmlExporter
public const ENTITY = 'cmix';
public const SCHEMA_VERSION = '5.1.0';

// private $main_object = null;
// private $main_object = null;
private ?ilCmiXapiDataSet $_dataset = null;

public function __construct()
Expand Down
Loading

0 comments on commit 5977bb2

Please sign in to comment.