ILIAS  release_8 Revision v8.24
class.ilLTIConsumeProviderFormGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
30{
35
39 protected bool $adminContext = false;
40
45 {
47 $this->provider = $provider;
48 }
49
50 public function isAdminContext(): bool
51 {
53 }
54
55 public function setAdminContext(bool $adminContext): void
56 {
57 $this->adminContext = $adminContext;
58 }
59
60 public function initForm(string $formaction, string $saveCmd, string $cancelCmd): void
61 {
62 global $DIC; /* @var \ILIAS\DI\Container $DIC */
63 $lng = $DIC->language();
64
65 $this->setFormAction($formaction);
66 $this->addCommandButton($saveCmd, $lng->txt('save'));
67 $this->addCommandButton($cancelCmd, $lng->txt('cancel'));
68
69 if ($this->provider->getId() !== 0) {
70 $this->setTitle($lng->txt('lti_form_provider_edit'));
71 } else {
72 $this->setTitle($lng->txt('lti_form_provider_create'));
73 }
74
75 $titleInp = new ilTextInputGUI($lng->txt('lti_con_prov_title'), 'title');
76 $titleInp->setValue($this->provider->getTitle());
77 $titleInp->setRequired(true);
78 $this->addItem($titleInp);
79
80 $descInp = new ilTextInputGUI($lng->txt('lti_con_prov_description'), 'description');
81 $descInp->setValue($this->provider->getDescription());
82 $this->addItem($descInp);
83
84 $iconInp = new ilImageFileInputGUI($lng->txt('lti_con_prov_icon'), 'icon');
85 $iconInp->setInfo($lng->txt('obj_tile_image_info'));
87 $iconInp->setUseCache(false);
88 if ($this->provider->hasProviderIcon() && $this->provider->getProviderIcon()->exists()) {
89 $iconInp->setImage($this->provider->getProviderIcon()->getAbsoluteFilePath());
90 } else {
91 $iconInp->setImage('');//todo default image?
92 }
93 $this->addItem($iconInp);
94
95 if ($this->isAdminContext()) {
96 $availabilityInp = new ilRadioGroupInputGUI($lng->txt('lti_con_prov_availability'), 'availability');
97 $availabilityInp->setValue((string) $this->provider->getAvailability());
98 $availabilityInp->setRequired(true);
99 $optionCreate = new ilRadioOption(
100 $lng->txt('lti_con_prov_availability_create'),
102 );
103 $availabilityInp->addOption($optionCreate);
104 $optionCreate = new ilRadioOption(
105 $lng->txt('lti_con_prov_availability_existing'),
107 );
108 $availabilityInp->addOption($optionCreate);
109 $optionCreate = new ilRadioOption(
110 $lng->txt('lti_con_prov_availability_non'),
112 );
113 $availabilityInp->addOption($optionCreate);
114 $this->addItem($availabilityInp);
115 }
116
117 $sectionHeader = new ilFormSectionHeaderGUI();
118 $sectionHeader->setTitle($lng->txt('lti_con_prov_authentication'));
119 $this->addItem($sectionHeader);
120
121 $versionInp = new ilRadioGroupInputGUI($lng->txt('lti_con_version'), 'lti_version');
122
123 //1.3
124 $lti13 = new ilRadioOption($lng->txt('lti_con_version_1.3'), '1.3.0');
125 if ($this->provider->getId() == 0) {
126 $lti13->setInfo($lng->txt('lti_con_version_1.3_before_id'));
127 }
128 $versionInp->addOption($lti13);
129 $providerUrlInp = new ilTextInputGUI($lng->txt('lti_con_tool_url'), 'provider_url13');
130 $providerUrlInp->setValue($this->provider->getProviderUrl());
131 $providerUrlInp->setRequired(true);
132 $lti13->addSubItem($providerUrlInp);
133
134 $initiateLogin = new ilTextInputGUI($lng->txt('lti_con_initiate_login_url'), 'initiate_login');
135 $initiateLogin->setValue($this->provider->getInitiateLogin());
136 $initiateLogin->setRequired(true);
137 $lti13->addSubItem($initiateLogin);
138
139 $redirectionUris = new ilTextAreaInputGUI($lng->txt('lti_con_redirection_uris'), 'redirection_uris');
140 $redirectionUris->setRows(4);
141 $redirectionUris->setValue(implode("\n", explode(",", $this->provider->getRedirectionUris())));
142 $redirectionUris->setRequired(true);
143 $lti13->addSubItem($redirectionUris);
144
145 //key_type
146 $keyType = new ilRadioGroupInputGUI($lng->txt('lti_con_key_type'), 'key_type');
147 $keyType->setRequired(true);
148 //RSA
149 $keyRsa = new ilRadioOption($lng->txt('lti_con_key_type_rsa'), 'RSA_KEY');
150 $keyType->addOption($keyRsa);
151 $publicKey = new ilTextAreaInputGUI($lng->txt('lti_con_key_type_rsa_public_key'), 'public_key');
152 $publicKey->setRows(6);
153 $publicKey->setRequired(true);
154 $publicKey->setInfo($lng->txt('lti_con_key_type_rsa_public_key_info'));
155 $keyRsa->addSubItem($publicKey);
156 //JWK
157 $keyJwk = new ilRadioOption($lng->txt('lti_con_key_type_jwk'), 'JWK_KEYSET');
158 $keyType->addOption($keyJwk);
159 $keyset = new ilTextInputGUI($lng->txt('lti_con_key_type_jwk_url'), 'public_keyset');
160 $keyset->setValue($this->provider->getPublicKeyset());
161 $keyset->setRequired(true);
162 $keyJwk->addSubItem($keyset);
163
164 $keyType->setValue($this->provider->getKeyType());
165 $lti13->addSubItem($keyType);
166
167 $contentItem = new ilCheckboxInputGUI($lng->txt('lti_con_content_item'), 'content_item');
168 $contentItem->setValue('1');
169 $contentItem->setChecked($this->provider->isContentItem());
170
171 $contentItemUrl = new ilTextInputGUI($lng->txt('lti_con_content_item_url'), 'content_item_url');
172 $contentItemUrl->setValue($this->provider->getContentItemUrl());
173 $contentItem->addSubItem($contentItemUrl);
174 $lti13->addSubItem($contentItem);
175
176 //grade sync
177 $gradeSynchronization = new ilCheckboxInputGUI($lng->txt('lti_con_grade_synchronization'), 'grade_synchronization');
178 $gradeSynchronization->setInfo($lng->txt('lti_con_grade_synchronization_info'));
179 $gradeSynchronization->setValue('1');
180 $gradeSynchronization->setChecked($this->provider->isGradeSynchronization());
181 $lti13->addSubItem($gradeSynchronization);
182
183 if ($this->provider->getId() > 0) {
184 $Lti13Info = new ilTextAreaInputGUI($lng->txt('lti13_hints'), 'lti13_hints');
185 $Lti13Info->setRows(6);
186 $Lti13Info->setValue(
187 "Platform ID: \t\t\t\t\t" . ilObjLTIConsumer::getPlattformId()
188 . "\nClient ID: \t\t\t\t\t" . $this->provider->getClientId()
189 . "\nDeployment ID: \t\t\t\t" . (string) $this->provider->getId()
190 . "\nPublic keyset URL: \t\t\t" . ilObjLTIConsumer::getPublicKeysetUrl()
191 . "\nAccess token URL: \t\t\t" . ilObjLTIConsumer::getAccessTokenUrl()
192 . "\nAuthentication request URL: \t" . ilObjLTIConsumer::getAuthenticationRequestUrl()
193 );
194 $Lti13Info->setDisabled(true);
195 $lti13->addSubItem($Lti13Info);
196 }
197
198 $versionInp->setValue($this->provider->getLtiVersion());
199 $this->addItem($versionInp);
200
201 $lti11 = new ilRadioOption($lng->txt('lti_con_version_1.1'), 'LTI-1p0');
202 $versionInp->addOption($lti11);
203
204 $providerUrlInp = new ilTextInputGUI($lng->txt('lti_con_prov_url'), 'provider_url');
205 $providerUrlInp->setValue($this->provider->getProviderUrl());
206 $providerUrlInp->setRequired(true);
207 $lti11->addSubItem($providerUrlInp);
208 // Abfrage ob Key und secret von Objekterstellern eingegeben werden soll
209 $keyGlobal = new ilCheckboxInputGUI($lng->txt('lti_con_prov_provider_key_global'), 'provider_key_global');
210 $keyGlobal->setValue("1");
211 if (!$this->provider->isProviderKeyCustomizable()) {
212 $keyGlobal->setChecked(true);
213 }
214 $keyGlobal->setInfo($lng->txt('lti_con_prov_provider_key_global_info'));
215
216 $providerKeyInp = new ilTextInputGUI($lng->txt('lti_con_prov_key'), 'provider_key');
217 $providerKeyInp->setValue($this->provider->getProviderKey());
218 $providerKeyInp->setRequired(true);
219 $keyGlobal->addSubItem($providerKeyInp);
220
221 $providerSecretInp = new ilTextInputGUI($lng->txt('lti_con_prov_secret'), 'provider_secret');
222 $providerSecretInp->setValue($this->provider->getProviderSecret());
223 $providerSecretInp->setRequired(true);
224 $keyGlobal->addSubItem($providerSecretInp);
225 $lti11->addSubItem($keyGlobal);
226
227 //privacy-settings
228
229 $sectionHeader = new ilFormSectionHeaderGUI();
230 $sectionHeader->setTitle($lng->txt('lti_con_prov_privacy_settings'));
231 $this->addItem($sectionHeader);
232
233 $item = new ilRadioGroupInputGUI($lng->txt('conf_privacy_ident'), 'privacy_ident');
234 $op = new ilRadioOption(
235 $lng->txt('conf_privacy_ident_il_uuid_user_id'),
237 );
238 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_user_id_info'));
239 $item->addOption($op);
240 $op = new ilRadioOption(
241 $lng->txt('conf_privacy_ident_il_uuid_login'),
243 );
244 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_login_info'));
245 $item->addOption($op);
246 $op = new ilRadioOption(
247 $lng->txt('conf_privacy_ident_il_uuid_ext_account'),
249 );
250 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_ext_account_info'));
251 $item->addOption($op);
252 $op = new ilRadioOption(
253 $lng->txt('conf_privacy_ident_il_uuid_sha256'),
255 );
256 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_sha256_info'));
257 $item->addOption($op);
258 $op = new ilRadioOption(
259 $lng->txt('conf_privacy_ident_il_uuid_sha256url'),
261 );
262 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_sha256url_info'));
263 $item->addOption($op);
264
265 $op = new ilRadioOption(
266 $lng->txt('conf_privacy_ident_il_uuid_random'),
268 );
269 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_random_info'));
270 $item->addOption($op);
271
272 $op = new ilRadioOption(
273 $lng->txt('conf_privacy_ident_real_email'),
275 );
276 $op->setInfo($lng->txt('conf_privacy_ident_real_email_info'));
277 $item->addOption($op);
278 $item->setValue((string) $this->provider->getPrivacyIdent());
279 $item->setInfo(
280 $lng->txt('conf_privacy_ident_info') . ' ' . ilCmiXapiUser::getIliasUuid() . '.ilias'
281 );
282 $item->setRequired(false);
283 $this->addItem($item);
284
285 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_instructor_email'), 'instructor_email');
286 $item->setValue("1");
287 if ($this->provider->isInstructorSendEmail()) {
288 $item->setChecked(true);
289 }
290 $item->setInfo($lng->txt('lti_con_prov_instructor_email_info'));
291 $this->addItem($item);
292
293 $item = new ilRadioGroupInputGUI($lng->txt('conf_privacy_name'), 'privacy_name');
294 $op = new ilRadioOption($lng->txt('conf_privacy_name_none'), (string) ilLTIConsumeProvider::PRIVACY_NAME_NONE);
295 $op->setInfo($lng->txt('conf_privacy_name_none_info'));
296 $item->addOption($op);
297 $op = new ilRadioOption($lng->txt('conf_privacy_name_firstname'), (string) ilLTIConsumeProvider::PRIVACY_NAME_FIRSTNAME);
298 $op->setInfo($lng->txt('conf_privacy_name_firstname_info'));
299 $item->addOption($op);
300 $op = new ilRadioOption($lng->txt('conf_privacy_name_lastname'), (string) ilLTIConsumeProvider::PRIVACY_NAME_LASTNAME);
301 $op->setInfo($lng->txt('conf_privacy_name_lastname_info'));
302 $item->addOption($op);
303 $op = new ilRadioOption($lng->txt('conf_privacy_name_fullname'), (string) ilLTIConsumeProvider::PRIVACY_NAME_FULLNAME);
304 $op->setInfo($lng->txt('conf_privacy_name_fullname_info'));
305 $item->addOption($op);
306 $item->setValue((string) $this->provider->getPrivacyName());
307 $item->setInfo($lng->txt('conf_privacy_name_info'));
308 $item->setRequired(false);
309 $this->addItem($item);
310
311 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_instructor_name'), 'instructor_name');
312 $item->setValue("1");
313 if ($this->provider->isInstructorSendName()) {
314 $item->setChecked(true);
315 }
316 $item->setInfo($lng->txt('lti_con_prov_instructor_name_info'));
317 $this->addItem($item);
318
319 $includeUserImage = new ilCheckboxInputGUI($lng->txt('lti_con_prov_inc_usr_pic'), 'inc_usr_pic');
320 $includeUserImage->setInfo($lng->txt('lti_con_prov_inc_usr_pic_info'));
321 $includeUserImage->setChecked($this->provider->getIncludeUserPicture());
322 $this->addItem($includeUserImage);
323
324 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_external_provider'), 'is_external_provider');
325 $item->setValue("1");
326 if ($this->provider->IsExternalProvider()) {
327 $item->setChecked(true);
328 }
329 $item->setInfo($lng->txt('lti_con_prov_external_provider_info'));
330 $this->addItem($item);
331
332
333 $sectionHeader = new ilFormSectionHeaderGUI();
334 $sectionHeader->setTitle($lng->txt('lti_con_prov_learning_progress_options'));
335 $this->addItem($sectionHeader);
336 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_has_outcome_service'), 'has_outcome_service');
337 $item->setValue("1");
338 if ($this->provider->getHasOutcome()) {
339 $item->setChecked(true);
340 }
341 $item->setInfo($lng->txt('lti_con_prov_has_outcome_service_info'));
342 $masteryScore = new ilNumberInputGUI($lng->txt('lti_con_prov_mastery_score_default'), 'mastery_score');
343 $masteryScore->setInfo($lng->txt('lti_con_prov_mastery_score_default_info'));
344 $masteryScore->setSuffix('%');
345 $masteryScore->allowDecimals(true);
346 $masteryScore->setDecimals(2);
347 $masteryScore->setMinvalueShouldBeGreater(false);
348 $masteryScore->setMinValue(0);
349 $masteryScore->setMaxvalueShouldBeLess(false);
350 $masteryScore->setMaxValue(100);
351 $masteryScore->setSize(4);
352 $masteryScore->setValue((string) $this->provider->getMasteryScorePercent());
353 $item->addSubItem($masteryScore);
354 $this->addItem($item);
355
356 $sectionHeader = new ilFormSectionHeaderGUI();
357 $sectionHeader->setTitle($lng->txt('lti_con_prov_launch_options'));
358 $this->addItem($sectionHeader);
359
360 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_use_provider_id'), 'use_provider_id');
361 $item->setValue("1");
362 if ($this->provider->getUseProviderId()) {
363 $item->setChecked(true);
364 }
365 $item->setInfo($lng->txt('lti_con_prov_use_provider_id_info'));
366
367 $this->addItem($item);
368
369 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_always_learner'), 'always_learner');
370 $item->setValue("1");
371 if ($this->provider->getAlwaysLearner()) {
372 $item->setChecked(true);
373 }
374 $item->setInfo($lng->txt('lti_con_prov_always_learner_info'));
375 $this->addItem($item);
376
377 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_use_xapi'), 'use_xapi');
378 $item->setValue("1");
379 if ($this->provider->getUseXapi()) {
380 $item->setChecked(true);
381 }
382 $item->setInfo($lng->txt('lti_con_prov_use_xapi_info'));
383
384 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_url'), 'xapi_launch_url');
385 $subitem->setValue($this->provider->getXapiLaunchUrl());
386 $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_url_info'));
387 $subitem->setRequired(true);
388 $subitem->setMaxLength(255);
389 $item->addSubItem($subitem);
390
391 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_key'), 'xapi_launch_key');
392 $subitem->setValue($this->provider->getXapiLaunchKey());
393 $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_key_info'));
394 $subitem->setRequired(true);
395 $subitem->setMaxLength(64);
396 $item->addSubItem($subitem);
397
398 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_secret'), 'xapi_launch_secret');
399 $subitem->setValue($this->provider->getXapiLaunchSecret());
400 $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_secret_info'));
401 $subitem->setRequired(true);
402 $subitem->setMaxLength(64);
403 $item->addSubItem($subitem);
404
405 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_activity_id'), 'xapi_activity_id');
406 $subitem->setValue($this->provider->getXapiActivityId());
407 $subitem->setInfo($lng->txt('lti_con_prov_xapi_activity_id_info'));
408 $subitem->setMaxLength(128);
409 $item->addSubItem($subitem);
410
411 $this->addItem($item);
412
413 $item = new ilTextAreaInputGUI($lng->txt('lti_con_prov_custom_params'), 'custom_params');
414 $item->setValue($this->provider->getCustomParams());
415
416 $item->setRows(6);
417 $item->setInfo($lng->txt('lti_con_prov_custom_params_info'));
418 $this->addItem($item);
419
420 $sectionHeader = new ilFormSectionHeaderGUI();
421 $sectionHeader->setTitle($lng->txt('lti_con_prov_group_options'));
422 $this->addItem($sectionHeader);
423
424 $item = new ilTextInputGUI($lng->txt('lti_con_prov_keywords'), 'keywords');
425 $item->setValue($this->provider->getKeywords());
426 $item->setInfo($lng->txt('lti_con_prov_keywords_info'));
427 $item->setMaxLength(1000);
428 $this->addItem($item);
429
430 $category = new ilRadioGroupInputGUI($lng->txt('lti_con_prov_category'), 'category');
431 $category->setInfo($lng->txt('lti_con_prov_category_info'));
432 $category->setValue($this->provider->getCategory());
433 $category->setRequired(true);
434 foreach (ilLTIConsumeProvider::getCategoriesSelectOptions() as $value => $label) {
435 $category->addOption(new ilRadioOption($label, $value));
436 }
437 $this->addItem($category);
438
439 $sectionHeader = new ilFormSectionHeaderGUI();
440 $sectionHeader->setTitle($lng->txt('lti_con_prov_hints'));
441 $this->addItem($sectionHeader);
442
443 $remarksInp = new ilTextAreaInputGUI($lng->txt('lti_con_prov_remarks'), 'remarks');
444 $remarksInp->setValue($this->provider->getRemarks());
445 $remarksInp->setRows(6);
446 $this->addItem($remarksInp);
447 }
448
449 public function initToolConfigForm(string $formaction, string $saveCmd, string $cancelCmd): void
450 {
451 global $DIC; /* @var \ILIAS\DI\Container $DIC */
452 $lng = $DIC->language();
453
454 $this->setFormAction($formaction);
455 $this->addCommandButton($saveCmd, $lng->txt('save'));
456
457 $this->setTitle($lng->txt('lti_form_provider_edit'));
458
459 $titleInp = new ilTextInputGUI($lng->txt('lti_con_prov_title'), 'title');
460 $titleInp->setValue($this->provider->getTitle());
461 $titleInp->setRequired(true);
462 $this->addItem($titleInp);
463
464 $descInp = new ilTextInputGUI($lng->txt('lti_con_prov_description'), 'description');
465 $descInp->setValue($this->provider->getDescription());
466 $this->addItem($descInp);
467
468 $iconInp = new ilImageFileInputGUI($lng->txt('lti_con_prov_icon'), 'icon');
469 $iconInp->setInfo($lng->txt('obj_tile_image_info'));
471 $iconInp->setUseCache(false);
472 if ($this->provider->hasProviderIcon() && $this->provider->getProviderIcon()->exists()) {
473 $iconInp->setImage($this->provider->getProviderIcon()->getAbsoluteFilePath());
474 } else {
475 $iconInp->setImage('');//todo default image?
476 }
477 $this->addItem($iconInp);
478
479 if ($this->isAdminContext()) {
480 $availabilityInp = new ilRadioGroupInputGUI($lng->txt('lti_con_prov_availability'), 'availability');
481 $availabilityInp->setValue((string) $this->provider->getAvailability());
482 $availabilityInp->setRequired(true);
483 $optionCreate = new ilRadioOption(
484 $lng->txt('lti_con_prov_availability_create'),
486 );
487 $availabilityInp->addOption($optionCreate);
488 $optionCreate = new ilRadioOption(
489 $lng->txt('lti_con_prov_availability_existing'),
491 );
492 $availabilityInp->addOption($optionCreate);
493 $optionCreate = new ilRadioOption(
494 $lng->txt('lti_con_prov_availability_non'),
496 );
497 $availabilityInp->addOption($optionCreate);
498 $this->addItem($availabilityInp);
499 }
500
501 $sectionHeader = new ilFormSectionHeaderGUI();
502 $sectionHeader->setTitle($lng->txt('lti_con_prov_authentication'));
503 $this->addItem($sectionHeader);
504
505 $versionInp = new ilRadioGroupInputGUI($lng->txt('lti_con_version'), 'lti_version');
506 $versionInp->setDisabled(true);
507 //1.3
508 $lti13 = new ilRadioOption($lng->txt('lti_con_version_1.3'), '1.3.0');
509 if ($this->provider->getId() == 0) {
510 $lti13->setInfo($lng->txt('lti_con_version_1.3_before_id'));
511 }
512 $versionInp->addOption($lti13);
513 $providerUrlInp = new ilTextInputGUI($lng->txt('lti_con_tool_url'), 'provider_url13');
514 $providerUrlInp->setValue($this->provider->getProviderUrl());
515 $providerUrlInp->setRequired(true);
516 $lti13->addSubItem($providerUrlInp);
517
518 $initiateLogin = new ilTextInputGUI($lng->txt('lti_con_initiate_login_url'), 'initiate_login');
519 $initiateLogin->setValue($this->provider->getInitiateLogin());
520 $initiateLogin->setRequired(true);
521 $lti13->addSubItem($initiateLogin);
522
523 $redirectionUris = new ilTextAreaInputGUI($lng->txt('lti_con_redirection_uris'), 'redirection_uris');
524 $redirectionUris->setRows(4);
525 $redirectionUris->setValue(implode("\n", explode(",", $this->provider->getRedirectionUris())));
526 $redirectionUris->setRequired(true);
527 $lti13->addSubItem($redirectionUris);
528
529 //key_type
530 $keyType = new ilRadioGroupInputGUI($lng->txt('lti_con_key_type'), 'key_type');
531 $keyType->setRequired(true);
532 //RSA
533 $keyRsa = new ilRadioOption($lng->txt('lti_con_key_type_rsa'), 'RSA_KEY');
534 $keyType->addOption($keyRsa);
535 $publicKey = new ilTextAreaInputGUI($lng->txt('lti_con_key_type_rsa_public_key'), 'public_key');
536 $publicKey->setRows(6);
537 $publicKey->setRequired(true);
538 $publicKey->setValue($this->provider->getPublicKey());
539 $publicKey->setInfo($lng->txt('lti_con_key_type_rsa_public_key_info'));
540 $keyRsa->addSubItem($publicKey);
541 //JWK
542 $keyJwk = new ilRadioOption($lng->txt('lti_con_key_type_jwk'), 'JWK_KEYSET');
543 $keyType->addOption($keyJwk);
544 $keyset = new ilTextInputGUI($lng->txt('lti_con_key_type_jwk_url'), 'public_keyset');
545 $keyset->setValue($this->provider->getPublicKeyset());
546 $keyset->setRequired(true);
547 $keyJwk->addSubItem($keyset);
548
549 $keyType->setValue($this->provider->getKeyType());
550 $lti13->addSubItem($keyType);
551
552 $contentItem = new ilCheckboxInputGUI($lng->txt('lti_con_content_item'), 'content_item');
553 $contentItem->setValue('1');
554 // check if dynreg transaction session
556 if (!ilSession::has('lti_dynamic_registration_custom_params') && !empty($this->provider->getContentItemUrl())) {
557 $contentItem->setChecked(true);
558 } else {
559 $contentItem->setChecked(false);
560 }
561 } else {
562 if (empty($this->provider->getContentItemUrl())) {
563 $contentItem->setChecked(false);
564 } else {
565 $contentItem->setChecked($this->provider->isContentItem());
566 }
567 }
568 $contentItemUrl = new ilTextInputGUI($lng->txt('lti_con_content_item_url'), 'content_item_url');
569 $contentItemUrl->setValue($this->provider->getContentItemUrl());
570 $contentItem->addSubItem($contentItemUrl);
571 $lti13->addSubItem($contentItem);
572
573 //grade sync
574 $gradeSynchronization = new ilCheckboxInputGUI($lng->txt('lti_con_grade_synchronization'), 'grade_synchronization');
575 $gradeSynchronization->setInfo($lng->txt('lti_con_grade_synchronization_info'));
576 $gradeSynchronization->setValue('1');
577 $gradeSynchronization->setChecked($this->provider->isGradeSynchronization());
578 $lti13->addSubItem($gradeSynchronization);
579
580 $Lti13Info = new ilTextAreaInputGUI($lng->txt('lti13_hints'), 'lti13_hints');
581 $Lti13Info->setRows(6);
582 $Lti13Info->setValue(
583 "Platform ID: \t\t\t\t\t" . ilObjLTIConsumer::getPlattformId()
584 . "\nClient ID: \t\t\t\t\t" . $this->provider->getClientId()
585 . "\nDeployment ID: \t\t\t\t" . (string) $this->provider->getId()
586 . "\nPublic keyset URL: \t\t\t" . ilObjLTIConsumer::getPublicKeysetUrl()
587 . "\nAccess token URL: \t\t\t" . ilObjLTIConsumer::getAccessTokenUrl()
588 . "\nAuthentication request URL: \t" . ilObjLTIConsumer::getAuthenticationRequestUrl()
589 );
590 $Lti13Info->setDisabled(true);
591 $lti13->addSubItem($Lti13Info);
592
593 $versionInp->setValue($this->provider->getLtiVersion());
594 $this->addItem($versionInp);
595
596 $lti11 = new ilRadioOption($lng->txt('lti_con_version_1.1'), 'LTI-1p0');
597 $versionInp->addOption($lti11);
598
599 $providerUrlInp = new ilTextInputGUI($lng->txt('lti_con_prov_url'), 'provider_url');
600 $providerUrlInp->setValue($this->provider->getProviderUrl());
601 $providerUrlInp->setRequired(true);
602 $lti11->addSubItem($providerUrlInp);
603 // Abfrage ob Key und secret von Objekterstellern eingegeben werden soll
604 $keyGlobal = new ilCheckboxInputGUI($lng->txt('lti_con_prov_provider_key_global'), 'provider_key_global');
605 $keyGlobal->setValue("1");
606 if (!$this->provider->isProviderKeyCustomizable()) {
607 $keyGlobal->setChecked(true);
608 }
609 $keyGlobal->setInfo($lng->txt('lti_con_prov_provider_key_global_info'));
610
611 $providerKeyInp = new ilTextInputGUI($lng->txt('lti_con_prov_key'), 'provider_key');
612 $providerKeyInp->setValue($this->provider->getProviderKey());
613 $providerKeyInp->setRequired(true);
614 $keyGlobal->addSubItem($providerKeyInp);
615
616 $providerSecretInp = new ilTextInputGUI($lng->txt('lti_con_prov_secret'), 'provider_secret');
617 $providerSecretInp->setValue($this->provider->getProviderSecret());
618 $providerSecretInp->setRequired(true);
619 $keyGlobal->addSubItem($providerSecretInp);
620 $lti11->addSubItem($keyGlobal);
621
622 //privacy-settings
623
624 $sectionHeader = new ilFormSectionHeaderGUI();
625 $sectionHeader->setTitle($lng->txt('lti_con_prov_privacy_settings'));
626 $this->addItem($sectionHeader);
627
628 $item = new ilRadioGroupInputGUI($lng->txt('conf_privacy_ident'), 'privacy_ident');
629 $op = new ilRadioOption(
630 $lng->txt('conf_privacy_ident_il_uuid_user_id'),
632 );
633 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_user_id_info'));
634 $item->addOption($op);
635 $op = new ilRadioOption(
636 $lng->txt('conf_privacy_ident_il_uuid_login'),
638 );
639 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_login_info'));
640 $item->addOption($op);
641 $op = new ilRadioOption(
642 $lng->txt('conf_privacy_ident_il_uuid_ext_account'),
644 );
645 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_ext_account_info'));
646 $item->addOption($op);
647 $op = new ilRadioOption(
648 $lng->txt('conf_privacy_ident_il_uuid_sha256'),
650 );
651 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_sha256_info'));
652 $item->addOption($op);
653 $op = new ilRadioOption(
654 $lng->txt('conf_privacy_ident_il_uuid_sha256url'),
656 );
657 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_sha256url_info'));
658 $item->addOption($op);
659
660 $op = new ilRadioOption(
661 $lng->txt('conf_privacy_ident_il_uuid_random'),
663 );
664 $op->setInfo($lng->txt('conf_privacy_ident_il_uuid_random_info'));
665 $item->addOption($op);
666
667 $op = new ilRadioOption(
668 $lng->txt('conf_privacy_ident_real_email'),
670 );
671 $op->setInfo($lng->txt('conf_privacy_ident_real_email_info'));
672 $item->addOption($op);
673 $item->setValue((string) $this->provider->getPrivacyIdent());
674 $item->setInfo(
675 $lng->txt('conf_privacy_ident_info') . ' ' . ilCmiXapiUser::getIliasUuid() . '.ilias'
676 );
677 $item->setRequired(false);
678 $this->addItem($item);
679
680 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_instructor_email'), 'instructor_email');
681 $item->setValue("1");
682 if ($this->provider->isInstructorSendEmail()) {
683 $item->setChecked(true);
684 }
685 $item->setInfo($lng->txt('lti_con_prov_instructor_email_info'));
686 $this->addItem($item);
687
688 $item = new ilRadioGroupInputGUI($lng->txt('conf_privacy_name'), 'privacy_name');
689 $op = new ilRadioOption($lng->txt('conf_privacy_name_none'), (string) ilLTIConsumeProvider::PRIVACY_NAME_NONE);
690 $op->setInfo($lng->txt('conf_privacy_name_none_info'));
691 $item->addOption($op);
692 $op = new ilRadioOption($lng->txt('conf_privacy_name_firstname'), (string) ilLTIConsumeProvider::PRIVACY_NAME_FIRSTNAME);
693 $op->setInfo($lng->txt('conf_privacy_name_firstname_info'));
694 $item->addOption($op);
695 $op = new ilRadioOption($lng->txt('conf_privacy_name_lastname'), (string) ilLTIConsumeProvider::PRIVACY_NAME_LASTNAME);
696 $op->setInfo($lng->txt('conf_privacy_name_lastname_info'));
697 $item->addOption($op);
698 $op = new ilRadioOption($lng->txt('conf_privacy_name_fullname'), (string) ilLTIConsumeProvider::PRIVACY_NAME_FULLNAME);
699 $op->setInfo($lng->txt('conf_privacy_name_fullname_info'));
700 $item->addOption($op);
701 $item->setValue((string) $this->provider->getPrivacyName());
702 $item->setInfo($lng->txt('conf_privacy_name_info'));
703 $item->setRequired(false);
704 $this->addItem($item);
705
706 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_instructor_name'), 'instructor_name');
707 $item->setValue("1");
708 if ($this->provider->isInstructorSendName()) {
709 $item->setChecked(true);
710 }
711 $item->setInfo($lng->txt('lti_con_prov_instructor_name_info'));
712 $this->addItem($item);
713
714 $includeUserImage = new ilCheckboxInputGUI($lng->txt('lti_con_prov_inc_usr_pic'), 'inc_usr_pic');
715 $includeUserImage->setInfo($lng->txt('lti_con_prov_inc_usr_pic_info'));
716 $includeUserImage->setChecked($this->provider->getIncludeUserPicture());
717 $this->addItem($includeUserImage);
718
719 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_external_provider'), 'is_external_provider');
720 $item->setValue("1");
721 if ($this->provider->IsExternalProvider()) {
722 $item->setChecked(true);
723 }
724 $item->setInfo($lng->txt('lti_con_prov_external_provider_info'));
725 $this->addItem($item);
726
727
728 $sectionHeader = new ilFormSectionHeaderGUI();
729 $sectionHeader->setTitle($lng->txt('lti_con_prov_learning_progress_options'));
730 $this->addItem($sectionHeader);
731 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_has_outcome_service'), 'has_outcome_service');
732 $item->setValue("1");
733 if ($this->provider->getHasOutcome()) {
734 $item->setChecked(true);
735 }
736 $item->setInfo($lng->txt('lti_con_prov_has_outcome_service_info'));
737 $masteryScore = new ilNumberInputGUI($lng->txt('lti_con_prov_mastery_score_default'), 'mastery_score');
738 $masteryScore->setInfo($lng->txt('lti_con_prov_mastery_score_default_info'));
739 $masteryScore->setSuffix('%');
740 $masteryScore->allowDecimals(true);
741 $masteryScore->setDecimals(2);
742 $masteryScore->setMinvalueShouldBeGreater(false);
743 $masteryScore->setMinValue(0);
744 $masteryScore->setMaxvalueShouldBeLess(false);
745 $masteryScore->setMaxValue(100);
746 $masteryScore->setSize(4);
747 $masteryScore->setValue((string) $this->provider->getMasteryScorePercent());
748 $item->addSubItem($masteryScore);
749 $this->addItem($item);
750
751 $sectionHeader = new ilFormSectionHeaderGUI();
752 $sectionHeader->setTitle($lng->txt('lti_con_prov_launch_options'));
753 $this->addItem($sectionHeader);
754
755 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_use_provider_id'), 'use_provider_id');
756 $item->setValue("1");
757 if ($this->provider->getUseProviderId()) {
758 $item->setChecked(true);
759 }
760 $item->setInfo($lng->txt('lti_con_prov_use_provider_id_info'));
761
762 $this->addItem($item);
763
764 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_always_learner'), 'always_learner');
765 $item->setValue("1");
766 if ($this->provider->getAlwaysLearner()) {
767 $item->setChecked(true);
768 }
769 $item->setInfo($lng->txt('lti_con_prov_always_learner_info'));
770 $this->addItem($item);
771
772 $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_use_xapi'), 'use_xapi');
773 $item->setValue("1");
774 if ($this->provider->getUseXapi()) {
775 $item->setChecked(true);
776 }
777 $item->setInfo($lng->txt('lti_con_prov_use_xapi_info'));
778
779 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_url'), 'xapi_launch_url');
780 $subitem->setValue($this->provider->getXapiLaunchUrl());
781 $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_url_info'));
782 $subitem->setRequired(true);
783 $subitem->setMaxLength(255);
784 $item->addSubItem($subitem);
785
786 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_key'), 'xapi_launch_key');
787 $subitem->setValue($this->provider->getXapiLaunchKey());
788 $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_key_info'));
789 $subitem->setRequired(true);
790 $subitem->setMaxLength(64);
791 $item->addSubItem($subitem);
792
793 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_secret'), 'xapi_launch_secret');
794 $subitem->setValue($this->provider->getXapiLaunchSecret());
795 $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_secret_info'));
796 $subitem->setRequired(true);
797 $subitem->setMaxLength(64);
798 $item->addSubItem($subitem);
799
800 $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_activity_id'), 'xapi_activity_id');
801 $subitem->setValue($this->provider->getXapiActivityId());
802 $subitem->setInfo($lng->txt('lti_con_prov_xapi_activity_id_info'));
803 $subitem->setMaxLength(128);
804 $item->addSubItem($subitem);
805
806 $this->addItem($item);
807
808 $item = new ilTextAreaInputGUI($lng->txt('lti_con_prov_custom_params'), 'custom_params');
809
810 if (ilSession::has('lti_dynamic_registration_custom_params')) {
811 $item->setValue(ilSession::get('lti_dynamic_registration_custom_params'));
812 } else {
813 $item->setValue($this->provider->getCustomParams());
814 }
815
816 $item->setRows(6);
817 $item->setInfo($lng->txt('lti_con_prov_custom_params_info'));
818 $this->addItem($item);
819
820 $sectionHeader = new ilFormSectionHeaderGUI();
821 $sectionHeader->setTitle($lng->txt('lti_con_prov_group_options'));
822 $this->addItem($sectionHeader);
823
824 $item = new ilTextInputGUI($lng->txt('lti_con_prov_keywords'), 'keywords');
825 $item->setValue($this->provider->getKeywords());
826 $item->setInfo($lng->txt('lti_con_prov_keywords_info'));
827 $item->setMaxLength(1000);
828 $this->addItem($item);
829
830 $category = new ilRadioGroupInputGUI($lng->txt('lti_con_prov_category'), 'category');
831 $category->setInfo($lng->txt('lti_con_prov_category_info'));
832 $category->setValue($this->provider->getCategory());
833 $category->setRequired(true);
834 foreach (ilLTIConsumeProvider::getCategoriesSelectOptions() as $value => $label) {
835 $category->addOption(new ilRadioOption($label, $value));
836 }
837 $this->addItem($category);
838
839 $sectionHeader = new ilFormSectionHeaderGUI();
840 $sectionHeader->setTitle($lng->txt('lti_con_prov_hints'));
841 $this->addItem($sectionHeader);
842
843 $remarksInp = new ilTextAreaInputGUI($lng->txt('lti_con_prov_remarks'), 'remarks');
844 $remarksInp->setValue($this->provider->getRemarks());
845 $remarksInp->setRows(6);
846 $this->addItem($remarksInp);
847 }
848
850 {
851 $provider->setTitle($this->getInput('title'));
852 $provider->setDescription($this->getInput('description'));
853
854 $provider->setProviderIconUploadFileData((array) $this->getInput('icon'));
855 $provider->setProviderIconUploadInput($this->getItemByPostVar('icon'));
856
857 $provider->setHasOutcome((bool) $this->getInput('has_outcome_service'));
858 $provider->setMasteryScorePercent($this->getInput('mastery_score'));
859
860 if ($this->isAdminContext()) {
861 $provider->setAvailability((int) $this->getInput('availability'));
862 }
863
864 //authenticate
865 $provider->setLtiVersion($this->getInput('lti_version'));
866 if ($provider->getLtiVersion() == 'LTI-1p0') {
867 if (null !== $this->getInput('provider_url')) {
868 $provider->setProviderUrl($this->getInput('provider_url'));
869 }
870 if ($this->getInput('provider_key_global') == 1) {
871 $provider->setProviderKeyCustomizable(false);
872 $provider->setProviderKey($this->getInput('provider_key'));
873 $provider->setProviderSecret($this->getInput('provider_secret'));
874 } else {
875 $provider->setProviderKeyCustomizable(true);
876 }
877 } else {
878 if (null !== $this->getInput('provider_url13')) {
879 $provider->setProviderUrl($this->getInput('provider_url13'));
880 }
881 $provider->setInitiateLogin($this->getInput('initiate_login'));
882 if (preg_match_all('/\S+/sm', $this->getInput('redirection_uris'), $redirect_uris_matches)) {
883 $provider->setRedirectionUris(implode(",", $redirect_uris_matches[0]));
884 } else {
885 $provider->setRedirectionUris($this->provider->getInitiateLogin());
886 }
887 $provider->setKeyType($this->getInput('key_type'));
888 if ($provider->getKeyType() == 'RSA_KEY') {
889 $provider->setPublicKey($this->getInput('public_key'));
890 } else {
891 $provider->setPublicKeyset($this->getInput('public_keyset'));
892 }
893 $provider->setContentItem((bool) $this->getInput('content_item'));
894 //ToDo: maybe its usefull to seperate the switch from the content field
895 if ($provider->isContentItem()) {
896 $provider->setContentItemUrl($this->getInput('content_item_url'));
897 }
898 $provider->setGradeSynchronization((bool) $this->getInput('grade_synchronization'));
899 }
900 $provider->setPrivacyIdent((int) $this->getInput('privacy_ident'));
901 $provider->setInstructorSendEmail((bool) $this->getInput('instructor_email'));
902 $provider->setPrivacyName((int) $this->getInput('privacy_name'));
903 $provider->setInstructorSendName((bool) $this->getInput('instructor_name'));
904 $provider->setIncludeUserPicture((bool) $this->getInput('inc_usr_pic'));
905 $provider->setIsExternalProvider((bool) $this->getInput('is_external_provider'));
906
907 $provider->setAlwaysLearner((bool) $this->getInput('always_learner'));
908
909 $provider->setUseProviderId((bool) $this->getInput('use_provider_id'));
910 $provider->setXapiActivityId($this->getInput('xapi_activity_id'));
911
912 $provider->setUseXapi((bool) $this->getInput('use_xapi'));
913 $provider->setXapiLaunchUrl($this->getInput('xapi_launch_url'));
914 $provider->setXapiLaunchKey($this->getInput('xapi_launch_key'));
915 $provider->setXapiLaunchSecret($this->getInput('xapi_launch_secret'));
916 $provider->setCustomParams($this->getInput('custom_params'));
917 $provider->setKeywords($this->getInput('keywords'));
918
919 if ($provider->isValidCategory($this->getInput('category'))) {
920 $provider->setCategory($this->getInput('category'));
921 }
922
923 if ($provider->isProviderKeyCustomizable()) {
924 $provider->setProviderKey($this->getInput('provider_key'));
925 $provider->setProviderSecret($this->getInput('provider_secret'));
926 }
927 $provider->setRemarks($this->getInput('remarks'));
928 }
929
930 public function initDynRegForm(string $formaction): void
931 {
932 global $DIC; /* @var \ILIAS\DI\Container $DIC */
933 $lng = $DIC->language();
934 $this->setFormAction($formaction);
935 $this->clearCommandButtons();
936
937 $this->setTitle($lng->txt('lti_form_provider_create'));
938 $regUrlInp = new ilTextInputGUI($lng->txt('lti_con_prov_dyn_reg_url'), 'lti_dyn_reg_url');
939 $regUrlInp->setInfo($lng->txt('lti_con_prov_dyn_reg_url_info'));
940 $regUrlInp->setRequired(true);
941 $this->addItem($regUrlInp);
942 $regParamsInp = new ilTextInputGUI($lng->txt('lti_con_prov_dyn_reg_params'), 'lti_dyn_reg_custom_params');
943 $regParamsInp->setInfo($lng->txt('lti_con_prov_dyn_reg_params_info'));
944 $this->addCommandButton("addDynReg", $DIC->language()->txt('lti_dyn_reg_add_tool'));
945 $this->addItem($regParamsInp);
946 }
947
948 public function getContentSelectionFrame($formaction): string
949 {
950 global $DIC;
951 $lng = $DIC->language();
953 $this->setTitle($lng->txt('lti_form_provider_content_selection'));
954 $this->clearCommandButtons();
955 $this->addCommandButton("cancelContentSelection", $lng->txt('cancel'));
956 $src = $DIC->ctrl()->getLinkTargetByClass(ilObjLTIConsumerGUI::class, 'contentSelectionRequest');
957 $template = new ilTemplate('tpl.lti_content_selection.html', true, true, "Modules/LTIConsumer");
958 $template->setVariable('LTI_CONTENT_SELECTION_IFRAME_SRC', $src);
959 return $this->getHTML() . $template->get();
960 }
961
962 public function getDynRegRequest(): string
963 {
964 global $DIC;
965 $lng = $DIC->language();
966 //ToDo: is url format validation?
967 $toolRegUrl = $this->getInput('lti_dyn_reg_url');
968 $customParams = $this->getInput('lti_dyn_reg_custom_params');
969 $regUrl = ilObjLTIConsumer::getRegistrationStartUrl() . "?url=" . urlencode($toolRegUrl);
970 if (!empty($customParams)) {
971 $regUrl .= "&custom_params=" . urlencode($customParams);
972 }
973 $showToolConfigUrl = $DIC->ctrl()->getLinkTargetByClass([ilRepositoryGUI::class,ilObjLTIConsumerGUI::class], 'showToolConfig');
974 $regErrorUrl = $DIC->ctrl()->getLinkTargetByClass([ilRepositoryGUI::class,ilObjLTIConsumerGUI::class], 'addDynReg');
975 $this->getItemByPostVar('lti_dyn_reg_url')->setDisabled(true);
976 $this->getItemByPostVar('lti_dyn_reg_custom_params')->setDisabled(true);
977 $this->clearCommandButtons();
978 //$this->addCommandButton("cancelDynReg", $DIC->language()->txt('cancel'));
979 $template = new ilTemplate('tpl.lti_dyn_reg_request.html', true, true, "Modules/LTIConsumer");
980 $template->setVariable('LTI_TOOL_REG_URL', $toolRegUrl);
981 $template->setVariable('LTI_DYN_REG_URL', $regUrl);
982 $template->setVariable('LTI_DYN_REG_URL_BY_POST', $toolRegUrl);
983 $template->setVariable('LTI_REG_END_URL', ilObjLTIConsumer::getRegistrationEndUrl());
984 $template->setVariable('LTI_SHOW_TOOL_CONFIG_URL', $showToolConfigUrl);
985 $template->setVariable('LTI_REG_ERROR_URL', $regErrorUrl);
986 //$DIC->ui()->mainTemplate()->setOnScreenMessage('info', $lng->txt('lti_dyn_reg_redirect_after_10_secs'));
987 return $template->get() . $this->getHTML();
988 }
989
990 public function getDynRegError(): string
991 {
992 global $DIC; /* @var \ILIAS\DI\Container $DIC */
993 $lng = $DIC->language();
994 $this->removeItemByPostVar('lti_dyn_reg_url');
995 $this->removeItemByPostVar('lti_dyn_reg_custom_params');
996 $this->setTitle("");
997 $this->clearCommandButtons();
998 $this->addCommandButton("cancelDynReg", $DIC->language()->txt('cancel'));
999 return $this->getHTML();
1000 }
1001
1003 {
1004 return $this->provider;
1005 }
1006}
This class represents a checkbox property in a property form.
setFormAction(string $a_formaction)
string $formaction
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initForm(string $formaction, string $saveCmd, string $cancelCmd)
initToolConfigForm(string $formaction, string $saveCmd, string $cancelCmd)
__construct(ilLTIConsumeProvider $provider)
ilLTIConsumeProviderFormGUI constructor.
initProvider(ilLTIConsumeProvider $provider)
setProviderUrl(string $provider_url)
setPrivacyIdent(int $privacy_ident)
setUseProviderId(bool $use_provider_id)
setCustomParams(string $custom_params)
setPublicKeyset(string $public_keyset)
setDescription(string $description)
setProviderIconUploadFileData(array $providerIconUploadFileData)
setProviderIconUploadInput(ilFormPropertyGUI $providerIconUploadInput)
setInstructorSendEmail(bool $instructor_send_email)
setXapiLaunchSecret(string $xapi_launch_secret)
setInstructorSendName(bool $instructor_send_name)
setProviderKey(string $provider_key)
setMasteryScorePercent(float $mastery_score_percent)
setLtiVersion(string $lti_version)
setIncludeUserPicture(bool $include_user_picture)
setIsExternalProvider(bool $is_external_provider)
setXapiLaunchUrl(string $xapi_launch_url)
setContentItemUrl(string $content_item_url)
setAlwaysLearner(bool $always_learner)
setRedirectionUris(string $redirection_uris)
setProviderKeyCustomizable(bool $provider_key_customizable)
setXapiActivityId(string $xapi_activity_id)
setContentItem(bool $content_item)
setInitiateLogin(string $initiate_login)
setGradeSynchronization(bool $grade_synchronization)
setXapiLaunchKey(string $xapi_launch_key)
setProviderSecret(string $provider_secret)
static isUserDynamicRegistrationTransaction(ilLTIConsumeProvider $provider)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a number property in a property form.
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
removeItemByPostVar(string $a_post_var, bool $a_remove_unused_headers=false)
getItemByPostVar(string $a_post_var)
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static get(string $a_var)
static has($a_var)
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc