Skip to content

Commit

Permalink
Merge pull request #8346 from surlabs/ilias10_LTI_002
Browse files Browse the repository at this point in the history
Remaining routes have been renamed from LTI to LTIProvider
  • Loading branch information
ZallaxDev authored Nov 6, 2024
2 parents 3216409 + e4745bc commit 1fb8786
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion components/ILIAS/Init/classes/class.ilInitialisation.php
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ protected static function initHTML(): void
$_GET['offset'] = (int) $_GET['offset']; // old code
}

self::initGlobal("lti", "ilLTIViewGUI", "./components/ILIAS/LTI/classes/class.ilLTIViewGUI.php");
self::initGlobal("lti", "ilLTIViewGUI", "./components/ILIAS/LTIProvider/classes/class.ilLTIViewGUI.php");
$GLOBALS["DIC"]["lti"]->init();
self::initKioskMode($GLOBALS["DIC"]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace ILIAS;

class LTI implements Component\Component
class LTIProvider implements Component\Component
{
public function init(
array | \ArrayAccess &$define,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -17,6 +16,8 @@
*
*********************************************************************/

declare(strict_types=1);

/**
* TableGUI class for LTI consumer listing
*
Expand Down Expand Up @@ -53,7 +54,7 @@ public function __construct(?object $a_parent_obj, string $a_parent_cmd)
$this->addColumn($DIC->language()->txt("actions"), "");

$this->setFormAction($DIC->ctrl()->getFormAction($a_parent_obj));
$this->setRowTemplate("tpl.lti_consumer_list_row.html", "components/ILIAS/LTI");
$this->setRowTemplate("tpl.lti_consumer_list_row.html", "components/ILIAS/LTIProvider");
$this->setDefaultOrderField("title");

$this->getItems();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -18,6 +16,8 @@
*
*********************************************************************/

declare(strict_types=1);

/**
* Description of class class
*
Expand Down Expand Up @@ -47,7 +47,7 @@ public function init(): void
$this->addColumn($this->lng->txt('lti_consumer'), 'consumer', '30%');

$this->setOrderColumn('title');
$this->setRowTemplate('tpl.lti_object_table_row.html', 'components/ILIAS/LTI');
$this->setRowTemplate('tpl.lti_object_table_row.html', 'components/ILIAS/LTIProvider');
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -18,6 +16,8 @@
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\LTI\Screen;

use ILIAS\GlobalScreen\Scope\Layout\Provider\PagePart\PagePartProvider;
Expand Down Expand Up @@ -55,7 +55,7 @@ public function isInterestedInContexts(): ContextCollection
*/
public function getPageBuilderDecorator(CalledContexts $screen_context_stack): ?PageBuilderModification
{
$this->globalScreen()->layout()->meta()->addCss('./components/ILIAS/LTI/templates/default/lti.css');
$this->globalScreen()->layout()->meta()->addCss('./components/ILIAS/LTIProvider/templates/default/lti.css');
$is_exit_mode = $this->isLTIExitMode($screen_context_stack);
$external_css = ($is_exit_mode) ? '' : $this->dic["lti"]->getExternalCss();
if ($external_css !== '') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function loadPlatform(Platform $platform): bool
$platform->clientId = $row->client_id;
$platform->deploymentId = $row->deployment_id;
$platform->rsaKey = $row->public_key;
$platform->ltiVersion = LtiVersion::from($row->lti_version);
$platform->ltiVersion = isset($row->lti_version) ? LtiVersion::from($row->lti_version) : LtiVersion::V1;
$platform->signatureMethod = $row->signature_method;
$platform->consumerName = $row->consumer_name;
$platform->consumerVersion = $row->consumer_version;
Expand Down
18 changes: 17 additions & 1 deletion scripts/Rector/ilUtils/ilutil_rector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

use ILIAS\scripts\Rector\ilUtils\ReplaceUtilSendMessageRector;
Expand All @@ -15,7 +31,7 @@
// there a several classes which make Rector break (multiple classes
// in one file, wrong declarations in inheritance, ...)
"components/ILIAS/LTIConsumer",
"components/ILIAS/LTI",
"components/ILIAS/LTIProvider",
"components/ILIAS/SOAPAuth/include"
]);
$rectorConfig->parameters()->set(Option::DEBUG, false);
Expand Down

0 comments on commit 1fb8786

Please sign in to comment.