Skip to content

Commit 15c2caa

Browse files
committed
[FIX] LTI: Adjust certificate integration types
- Adjust the certificate-related LTI consumer integration to use compatible object and profile types. - This fixes type mismatches in the certificate settings form repository and placeholder description handling.
1 parent d3cb0ea commit 15c2caa

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

components/ILIAS/LTIConsumer/classes/Certificate/class.ilCertificateSettingsLTIConsumerFormRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ilCertificateSettingsLTIConsumerFormRepository implements ilCertificateFor
3535
// private \ilObjLTIConsumer $object;
3636

3737
public function __construct(
38-
ilObjLTIConsumer $object,
38+
ilObject $object,
3939
string $certificatePath,
4040
bool $hasAdditionalElements,
4141
ilLanguage $language,

components/ILIAS/LTIConsumer/classes/Certificate/class.ilLTIConsumerPlaceholderDescription.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
declare(strict_types=1);
2020

21+
use ILIAS\User\Profile\Profile;
22+
2123
/**
2224
* Class ilLTIConsumerPlaceholderDescription
2325
*
@@ -37,7 +39,8 @@ class ilLTIConsumerPlaceholderDescription implements ilCertificatePlaceholderDes
3739
public function __construct(
3840
?ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject = null,
3941
?ilLanguage $language = null,
40-
?ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject = null
42+
?ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject = null,
43+
?Profile $profile = null
4144
) {
4245
global $DIC;
4346

@@ -48,7 +51,7 @@ public function __construct(
4851
$this->language = $language;
4952

5053
if (null === $defaultPlaceholderDescriptionObject) {
51-
$defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
54+
$defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $profile ?? $DIC['user']->getProfile(), $userDefinedFieldPlaceHolderDescriptionObject);
5255
}
5356
$this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
5457

0 commit comments

Comments
 (0)