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