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