From 0d54f1bbe36e5e0dfa35aa60bd2f3a9115eeea3a Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Mon, 30 Jan 2023 14:55:26 +0100 Subject: [PATCH] Lti provider: adapt entity to accept string as indicated in the IMS LTI standard -refs BT#19577 --- plugin/lti_provider/Entity/Result.php | 8 ++++---- plugin/lti_provider/README.md | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/plugin/lti_provider/Entity/Result.php b/plugin/lti_provider/Entity/Result.php index d98ef53ec7..eecaefc113 100644 --- a/plugin/lti_provider/Entity/Result.php +++ b/plugin/lti_provider/Entity/Result.php @@ -37,9 +37,9 @@ class Result protected $userId; /** - * @var int + * @var string * - * @ORM\Column(name="client_uid", type="integer", nullable=false) + * @ORM\Column(name="client_uid", type="string", nullable=false) */ protected $clientUId; @@ -142,12 +142,12 @@ class Result return $this; } - public function getClientUId(): int + public function getClientUId(): string { return $this->clientUId; } - public function setClientUId(int $clientUId): Result + public function setClientUId(string $clientUId): Result { $this->clientUId = $clientUId; diff --git a/plugin/lti_provider/README.md b/plugin/lti_provider/README.md index 0bd3376604..9e34c6d5ee 100644 --- a/plugin/lti_provider/README.md +++ b/plugin/lti_provider/README.md @@ -65,3 +65,12 @@ CREATE TABLE plugin_lti_provider_result ( PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ``` + +## v1.1 +### Database changes +You need to execute this SQL query in your database after updating your Chamilo after version 1.11.18 if the plugin was already installed before. + +```sql +ALTER TABLE plugin_lti_provider_result MODIFY client_uid varchar(255) NOT NULL; +``` +