ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjCmiXapiAdministrationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
33{
34 public const TAB_ID_LRS_TYPES = 'tab_lrs_types';
35 public const TAB_ID_PERMISSIONS = 'perm_settings';
36
37 public const CMD_SHOW_LRS_TYPES_LIST = 'showLrsTypesList';
38 public const CMD_SHOW_LRS_TYPE_FORM = 'showLrsTypeForm';
39 public const CMD_SAVE_LRS_TYPE_FORM = 'saveLrsTypeForm';
40
42
43 public function getAdminTabs(): void
44 {
45 // lrs types tab
46
47 $this->tabs_gui->addTab(
48 self::TAB_ID_LRS_TYPES,
49 $this->lng->txt(self::TAB_ID_LRS_TYPES),
50 $this->ctrl->getLinkTargetByClass(self::class)
51 );
52
53 // permissions tab
54 if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
55 $this->tabs_gui->addTab(
56 self::TAB_ID_PERMISSIONS,
57 $this->lng->txt(self::TAB_ID_PERMISSIONS),
58 $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class, 'perm')
59 );
60 }
61 }
62
63 public function executeCommand(): void
64 {
65 $this->lng->loadLanguageModule('cmix');
66
67 $this->prepareOutput();
68
69 switch ($this->ctrl->getNextClass()) {
70 case 'ilpermissiongui':
71
72 $this->tabs_gui->activateTab(self::TAB_ID_PERMISSIONS);
73 $gui = new ilPermissionGUI($this);
74 $this->ctrl->forwardCommand($gui);
75 break;
76
77 default:
78
79 $command = $this->ctrl->getCmd(self::DEFAULT_CMD) . 'Cmd';
80 $this->{$command}();
81 }
82 }
83
84 protected function viewCmd(): void
85 {
86 $this->showLrsTypesListCmd();
87 }
88
89 protected function showLrsTypesListCmd(): void
90 {
91 $this->tabs_gui->activateTab(self::TAB_ID_LRS_TYPES);
92
93 $toolbarHtml = "";
94 if ($this->rbac_system->checkAccess('write', $this->getRefId())) {
95 $toolbarHtml = $this->buildLrsTypesToolbarGUI()->getHTML();
96 }
97
98 $table = $this->buildLrsTypesTableGUI();
99
100 $table->setData(ilCmiXapiLrsTypeList::getTypesData(true));
101 $this->tpl->setContent($toolbarHtml . $table->getHTML());
102 }
103
105 {
106 return new ilCmiXapiLrsTypesTableGUI($this, self::CMD_SHOW_LRS_TYPES_LIST);
107 }
108
110 {
111 global $DIC;
112 $button = $DIC->ui()->factory()->button()->primary(
113 $this->lng->txt("btn_create_lrs_type"),
114 $this->ctrl->getLinkTarget($this, self::CMD_SHOW_LRS_TYPE_FORM)
115 );
116
117 $toolbar = new ilToolbarGUI();
118 $toolbar->addComponent($button);
119
120 return $toolbar;
121 }
122
123 protected function showLrsTypeFormCmd(?ilPropertyFormGUI $form = null): void
124 {
125 $this->tabs_gui->activateTab(self::TAB_ID_LRS_TYPES);
126
127 if ($form === null) {
128 $lrsType = $this->initLrsType();
129
130 $form = $this->buildLrsTypeForm($lrsType);
131 }
132
133 $this->tpl->setContent($form->getHTML());
134 }
135
136 protected function initLrsType(): \ilCmiXapiLrsType
137 {
138 if ($this->post_wrapper->has('lrs_type_id')) {
139 if (is_int($this->post_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()))) {
140 return new ilCmiXapiLrsType($this->post_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()));
141 }
142 }
143
144 if ($this->request_wrapper->has('lrs_type_id')) {
145 if (is_int($this->request_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()))) {
146 return new ilCmiXapiLrsType($this->request_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()));
147 }
148 }
149
150 return new ilCmiXapiLrsType();
151 }
152
154 {
155 global $DIC; /* @var \ILIAS\DI\Container $DIC */
156
157 $form = new ilPropertyFormGUI();
158 $form->setFormAction($DIC->ctrl()->getFormAction($this));
159
160 if ($lrsType->getTypeId()) {
161 $form->setTitle($DIC->language()->txt('edit_lrs_type_form'));
162 } else {
163 $form->setTitle($DIC->language()->txt('create_lrs_type_form'));
164 // $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt('create'));
165 }
166 $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt('save'));
167 $form->addCommandButton(self::CMD_SHOW_LRS_TYPES_LIST, $DIC->language()->txt('cancel'));
168
169 $hiddenId = new ilHiddenInputGUI('lrs_type_id');
170 $hiddenId->setValue((string) $lrsType->getTypeId());
171 $form->addItem($hiddenId);
172
173
174 $item = new ilTextInputGUI($DIC->language()->txt('conf_title'), 'title');
175 $item->setValue($lrsType->getTitle());
176 $item->setInfo($DIC->language()->txt('info_title'));
177 $item->setRequired(true);
178 $item->setMaxLength(255);
179 $form->addItem($item);
180
181 $item = new ilTextInputGUI($DIC->language()->txt('conf_description'), 'description');
182 $item->setValue($lrsType->getDescription());
183 $item->setInfo($DIC->language()->txt('info_description'));
184 $form->addItem($item);
185
186 $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_availability'), 'availability');
187 $optionCreate = new ilRadioOption(
188 $DIC->language()->txt('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_CREATE),
190 );
191 $optionCreate->setInfo('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_CREATE . '_info');
192 $item->addOption($optionCreate);
193 $optionCreate = new ilRadioOption(
194 $DIC->language()->txt('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_EXISTING),
196 );
197 $optionCreate->setInfo('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_EXISTING . '_info');
198 $item->addOption($optionCreate);
199 $optionCreate = new ilRadioOption(
200 $DIC->language()->txt('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_NONE),
202 );
203 $optionCreate->setInfo('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_NONE . '_info');
204 $item->addOption($optionCreate);
205 $item->setValue((string) $lrsType->getAvailability());
206 $item->setRequired(true);
207 $form->addItem($item);
208
209 $sectionHeader = new ilFormSectionHeaderGUI();
210 $sectionHeader->setTitle($DIC->language()->txt('lrs_authentication'));
211 $form->addItem($sectionHeader);
212
213 $item = new ilTextInputGUI($DIC->language()->txt('conf_lrs_endpoint'), 'lrs_endpoint');
214 $item->setValue($lrsType->getLrsEndpoint());
215 $item->setInfo($DIC->language()->txt('info_lrs_endpoint'));
216 $item->setRequired(true);
217 $item->setMaxLength(255);
218 $form->addItem($item);
219
220 $item = new ilTextInputGUI($DIC->language()->txt('conf_lrs_key'), 'lrs_key');
221 $item->setValue($lrsType->getLrsKey());
222 $item->setInfo($DIC->language()->txt('info_lrs_key'));
223 $item->setRequired(true);
224 $item->setMaxLength(128);
225 $form->addItem($item);
226
227 $item = new ilTextInputGUI($DIC->language()->txt('conf_lrs_secret'), 'lrs_secret');
228 $item->setValue($lrsType->getLrsSecret());
229 $item->setInfo($DIC->language()->txt('info_lrs_secret'));
230 $item->setRequired(true);
231 $item->setMaxLength(128);
232 $form->addItem($item);
233
234 $sectionHeader = new ilFormSectionHeaderGUI();
235 $sectionHeader->setTitle($DIC->language()->txt('privacy_options'));
236 $form->addItem($sectionHeader);
237
238 $useProxy = new ilCheckboxInputGUI($DIC->language()->txt('conf_use_proxy'), 'use_proxy');
239 $useProxy->setInfo($DIC->language()->txt('conf_use_proxy_info'));
240 if($lrsType->isBypassProxyEnabled() == false) {
241 $useProxy->setChecked(true);
242 }
243
244 $options = array(
245 "achieved" => $DIC->language()->txt('achieved_label'),
246 "answered" => $DIC->language()->txt('answered_label'),
247 "completed" => $DIC->language()->txt('completed_label'),
248 "failed" => $DIC->language()->txt('failed_label'),
249 "initialized" => $DIC->language()->txt('initialized_label'),
250 "passed" => $DIC->language()->txt('passed_label'),
251 "progressed" => $DIC->language()->txt('progressed_label'),
252 "satisfied" => $DIC->language()->txt('satisfied_label'),
253 "terminated" => $DIC->language()->txt('terminated_label'),
254 );
255 $multi = $DIC->ui()->factory()->input()->field()->multiselect($DIC->language()->txt('conf_store_only_verbs'), $options, $DIC->language()->txt('conf_store_only_verbs_info'))
256 ->withRequired(true);
257
258 // $form =($DIC->ui()->factory()->input()->container()->form()->standard('#', ['multi' => $multi]);
259
260 $item = new ilCheckboxInputGUI($DIC->language()->txt('only_moveon_label'), 'only_moveon');
261 $item->setInfo($DIC->language()->txt('only_moveon_info'));
262 $item->setChecked($lrsType->getOnlyMoveon());
263
264 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('achieved_label'), 'achieved');
265 $subitem->setInfo($DIC->language()->txt('achieved_info'));
266 $subitem->setChecked($lrsType->getAchieved());
267 $item->addSubItem($subitem);
268
269 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('answered_label'), 'answered');
270 $subitem->setInfo($DIC->language()->txt('answered_info'));
271 $subitem->setChecked($lrsType->getAnswered());
272 $item->addSubItem($subitem);
273
274 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('completed_label'), 'completed');
275 $subitem->setInfo($DIC->language()->txt('completed_info'));
276 $subitem->setChecked($lrsType->getCompleted());
277 $item->addSubItem($subitem);
278
279 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('failed_label'), 'failed');
280 $subitem->setInfo($DIC->language()->txt('failed_info'));
281 $subitem->setChecked($lrsType->getFailed());
282 $item->addSubItem($subitem);
283
284 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('initialized_label'), 'initialized');
285 $subitem->setInfo($DIC->language()->txt('initialized_info'));
286 $subitem->setChecked($lrsType->getInitialized());
287 $item->addSubItem($subitem);
288
289 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('passed_label'), 'passed');
290 $subitem->setInfo($DIC->language()->txt('passed_info'));
291 $subitem->setChecked($lrsType->getPassed());
292 $item->addSubItem($subitem);
293
294 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('progressed_label'), 'progressed');
295 $subitem->setInfo($DIC->language()->txt('progressed_info'));
296 $subitem->setChecked($lrsType->getProgressed());
297 $item->addSubItem($subitem);
298
299 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('satisfied_label'), 'satisfied');
300 $subitem->setInfo($DIC->language()->txt('satisfied_info'));
301 $subitem->setChecked($lrsType->getSatisfied());
302 $item->addSubItem($subitem);
303
304 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('terminated_label'), 'terminated');
305 $subitem->setInfo($DIC->language()->txt('terminated_info'));
306 $subitem->setChecked($lrsType->getTerminated());
307 $item->addSubItem($subitem);
308
309 $useProxy->addSubItem($item);
310
311 $item = new ilCheckboxInputGUI($DIC->language()->txt('hide_data_label'), 'hide_data');
312 $item->setInfo($DIC->language()->txt('hide_data_info'));
313 $item->setChecked($lrsType->getHideData());
314
315 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('timestamp_label'), 'timestamp');
316 $subitem->setInfo($DIC->language()->txt('timestamp_info'));
317 $subitem->setChecked($lrsType->getTimestamp());
318 $item->addSubItem($subitem);
319
320 $subitem = new ilCheckboxInputGUI($DIC->language()->txt('duration_label'), 'duration');
321 $subitem->setInfo($DIC->language()->txt('duration_info'));
322 $subitem->setChecked($lrsType->getDuration());
323 $item->addSubItem($subitem);
324
325 $useProxy->addSubItem($item);
326
327 $item = new ilCheckboxInputGUI($DIC->language()->txt('no_substatements_label'), 'no_substatements');
328 $item->setInfo($DIC->language()->txt('no_substatements_info'));
329 $item->setChecked($lrsType->getNoSubstatements());
330 $useProxy->addSubItem($item);
331
332
333
334 $form->addItem($useProxy);
335
336 // $sectionHeader = new ilFormSectionHeaderGUI();
337 // $sectionHeader->setTitle('Privacy Settings');
338 // $form->addItem($sectionHeader);
339
340 $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_ident'), 'privacy_ident');
341 $op = new ilRadioOption(
342 $DIC->language()->txt('conf_privacy_ident_il_uuid_user_id'),
344 );
345 $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_user_id_info'));
346 $item->addOption($op);
347 $op = new ilRadioOption(
348 $DIC->language()->txt('conf_privacy_ident_il_uuid_login'),
350 );
351 $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_login_info'));
352 $item->addOption($op);
353 $op = new ilRadioOption(
354 $DIC->language()->txt('conf_privacy_ident_il_uuid_ext_account'),
356 );
357 $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_ext_account_info'));
358 $item->addOption($op);
359 $op = new ilRadioOption(
360 $DIC->language()->txt('conf_privacy_ident_il_uuid_sha256'),
362 );
363 $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_sha256_info'));
364 $item->addOption($op);
365 $op = new ilRadioOption(
366 $DIC->language()->txt('conf_privacy_ident_il_uuid_sha256url'),
368 );
369 $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_sha256url_info'));
370 $item->addOption($op);
371
372 $op = new ilRadioOption(
373 $DIC->language()->txt('conf_privacy_ident_il_uuid_random'),
375 );
376 $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_random_info'));
377 $item->addOption($op);
378 $op = new ilRadioOption(
379 $DIC->language()->txt('conf_privacy_ident_real_email'),
381 );
382 $op->setInfo($DIC->language()->txt('conf_privacy_ident_real_email_info'));
383 $item->addOption($op);
384 $item->setValue((string) $lrsType->getPrivacyIdent());
385 $item->setInfo(
386 $DIC->language()->txt('conf_privacy_ident_info') . ' ' . ilCmiXapiUser::getIliasUuid()
387 );
388 $item->setRequired(false);
389 $form->addItem($item);
390
391 $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_name'), 'privacy_name');
392 $op = new ilRadioOption(
393 $DIC->language()->txt('conf_privacy_name_none'),
395 );
396 $op->setInfo($DIC->language()->txt('conf_privacy_name_none_info'));
397 $item->addOption($op);
398 $op = new ilRadioOption(
399 $DIC->language()->txt('conf_privacy_name_firstname'),
401 );
402 $item->addOption($op);
403 $op = new ilRadioOption(
404 $DIC->language()->txt('conf_privacy_name_lastname'),
406 );
407 $item->addOption($op);
408 $op = new ilRadioOption(
409 $DIC->language()->txt('conf_privacy_name_fullname'),
411 );
412 $item->addOption($op);
413 $item->setValue((string) $lrsType->getPrivacyName());
414 $item->setInfo($DIC->language()->txt('conf_privacy_name_info'));
415 $item->setRequired(false);
416 $form->addItem($item);
417
418 // $item = new ilCheckboxInputGUI($DIC->language()->txt('only_moveon_label'), 'only_moveon');
419 // $item->setInfo($DIC->language()->txt('only_moveon_info'));
420 // $item->setChecked($lrsType->getOnlyMoveon());
421 //
422 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('achieved_label'), 'achieved');
423 // $subitem->setInfo($DIC->language()->txt('achieved_info'));
424 // $subitem->setChecked($lrsType->getAchieved());
425 // $item->addSubItem($subitem);
426 //
427 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('answered_label'), 'answered');
428 // $subitem->setInfo($DIC->language()->txt('answered_info'));
429 // $subitem->setChecked($lrsType->getAnswered());
430 // $item->addSubItem($subitem);
431 //
432 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('completed_label'), 'completed');
433 // $subitem->setInfo($DIC->language()->txt('completed_info'));
434 // $subitem->setChecked($lrsType->getCompleted());
435 // $item->addSubItem($subitem);
436 //
437 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('failed_label'), 'failed');
438 // $subitem->setInfo($DIC->language()->txt('failed_info'));
439 // $subitem->setChecked($lrsType->getFailed());
440 // $item->addSubItem($subitem);
441 //
442 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('initialized_label'), 'initialized');
443 // $subitem->setInfo($DIC->language()->txt('initialized_info'));
444 // $subitem->setChecked($lrsType->getInitialized());
445 // $item->addSubItem($subitem);
446 //
447 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('passed_label'), 'passed');
448 // $subitem->setInfo($DIC->language()->txt('passed_info'));
449 // $subitem->setChecked($lrsType->getPassed());
450 // $item->addSubItem($subitem);
451 //
452 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('progressed_label'), 'progressed');
453 // $subitem->setInfo($DIC->language()->txt('progressed_info'));
454 // $subitem->setChecked($lrsType->getProgressed());
455 // $item->addSubItem($subitem);
456 //
457 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('satisfied_label'), 'satisfied');
458 // $subitem->setInfo($DIC->language()->txt('satisfied_info'));
459 // $subitem->setChecked($lrsType->getSatisfied());
460 // $item->addSubItem($subitem);
461 //
462 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('terminated_label'), 'terminated');
463 // $subitem->setInfo($DIC->language()->txt('terminated_info'));
464 // $subitem->setChecked($lrsType->getTerminated());
465 // $item->addSubItem($subitem);
466 //
467 // $form->addItem($item);
468
469 // $item = new ilCheckboxInputGUI($DIC->language()->txt('hide_data_label'), 'hide_data');
470 // $item->setInfo($DIC->language()->txt('hide_data_info'));
471 // $item->setChecked($lrsType->getHideData());
472 //
473 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('timestamp_label'), 'timestamp');
474 // $subitem->setInfo($DIC->language()->txt('timestamp_info'));
475 // $subitem->setChecked($lrsType->getTimestamp());
476 // $item->addSubItem($subitem);
477 //
478 // $subitem = new ilCheckboxInputGUI($DIC->language()->txt('duration_label'), 'duration');
479 // $subitem->setInfo($DIC->language()->txt('duration_info'));
480 // $subitem->setChecked($lrsType->getDuration());
481 // $item->addSubItem($subitem);
482 //
483 // $form->addItem($item);
484 //
485 // $item = new ilCheckboxInputGUI($DIC->language()->txt('no_substatements_label'), 'no_substatements');
486 // $item->setInfo($DIC->language()->txt('no_substatements_info'));
487 // $item->setChecked($lrsType->getNoSubstatements());
488 // $form->addItem($item);
489
490 $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_delete_data'), 'delete_data');
491 $options = ["0","1","2","11","12"];
492 for ((int) $i = 0; $i < count($options); $i++) {
493 $op = new ilRadioOption($DIC->language()->txt('conf_delete_data_opt' . $options[$i]), $options[$i]);
494 $item->addOption($op);
495 }
496 $item->setValue((string) $lrsType->getDeleteData());
497 $item->setInfo($DIC->language()->txt('conf_delete_data_info'));
498 $form->addItem($item);
499
500 $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_setting_conf'), 'force_privacy_setting');
501 $op = new ilRadioOption($DIC->language()->txt('conf_privacy_setting_default'), "0");
502 $item->addOption($op);
503 $op = new ilRadioOption($DIC->language()->txt('conf_privacy_setting_force'), "1");
504 $item->addOption($op);
505 $item->setValue((string) ((int) $lrsType->getForcePrivacySettings()));
506 $form->addItem($item);
507
508 $sectionHeader = new ilFormSectionHeaderGUI();
509 $sectionHeader->setTitle('Hints');
510 $form->addItem($sectionHeader);
511
512 $item = new ilCheckboxInputGUI($DIC->language()->txt('conf_external_lrs'), 'external_lrs');
513 $item->setChecked($lrsType->getExternalLrs());
514 $item->setInfo($DIC->language()->txt('info_external_lrs'));
515 $form->addItem($item);
516
517 $item = new ilTextAreaInputGUI($DIC->language()->txt('conf_privacy_comment_default'), 'privacy_comment_default');
518 $item->setInfo($DIC->language()->txt('info_privacy_comment_default'));
519 $item->setValue($lrsType->getPrivacyCommentDefault());
520 $item->setRows(5);
521 $form->addItem($item);
522
523 $item = new ilTextAreaInputGUI($DIC->language()->txt('conf_remarks'), 'remarks');
524 $item->setInfo($DIC->language()->txt('info_remarks'));
525 $item->setValue($lrsType->getRemarks());
526 $item->setRows(5);
527 $form->addItem($item);
528
529 return $form;
530 }
531
532 protected function saveLrsTypeFormCmd(): void
533 {
534 global $DIC; /* @var \ILIAS\DI\Container $DIC */
535
536 $lrsType = $this->initLrsType();
537
538 $form = $this->buildLrsTypeForm($lrsType);
539
540 if (!$form->checkInput()) {
541 $this->showLrsTypeFormCmd($form);
542 return;
543 }
544
545 $lrsType->setTitle($form->getInput("title"));
546 $lrsType->setDescription($form->getInput("description"));
547 $lrsType->setAvailability((int) $form->getInput("availability"));
548
549 $lrsType->setLrsEndpoint(
550 ilFileUtils::removeTrailingPathSeparators($form->getInput("lrs_endpoint"))
551 );
552
553 $lrsType->setLrsKey($form->getInput("lrs_key"));
554 $lrsType->setLrsSecret($form->getInput("lrs_secret"));
555 $lrsType->setExternalLrs((bool) $form->getInput("external_lrs"));
556 $lrsType->setPrivacyIdent((int) $form->getInput("privacy_ident"));
557 $lrsType->setPrivacyName((int) $form->getInput("privacy_name"));
558 $lrsType->setPrivacyCommentDefault($form->getInput("privacy_comment_default"));
559 $lrsType->setRemarks($form->getInput("remarks"));
560
561 $oldBypassProxyEnabled = $lrsType->isBypassProxyEnabled();
562 $newBypassProxyEnabled = false;
563 if ((bool) $form->getInput("use_proxy") == false) {
564 $newBypassProxyEnabled = true;
565 }
566 $lrsType->setBypassProxyEnabled($newBypassProxyEnabled);
567 if ($newBypassProxyEnabled && $newBypassProxyEnabled != $oldBypassProxyEnabled) {
569 }
570
571 $lrsType->setOnlyMoveon((bool) $form->getInput("only_moveon"));
572 $lrsType->setAchieved((bool) $form->getInput("achieved"));
573 $lrsType->setAnswered((bool) $form->getInput("answered"));
574 $lrsType->setCompleted((bool) $form->getInput("completed"));
575 $lrsType->setFailed((bool) $form->getInput("failed"));
576 $lrsType->setInitialized((bool) $form->getInput("initialized"));
577 $lrsType->setPassed((bool) $form->getInput("passed"));
578 $lrsType->setProgressed((bool) $form->getInput("progressed"));
579 $lrsType->setSatisfied((bool) $form->getInput("satisfied"));
580 $lrsType->setTerminated((bool) $form->getInput("terminated"));
581 $lrsType->setHideData((bool) $form->getInput("hide_data"));
582 $lrsType->setTimestamp((bool) $form->getInput("timestamp"));
583 $lrsType->setDuration((bool) $form->getInput("duration"));
584 $lrsType->setNoSubstatements((bool) $form->getInput("no_substatements"));
585 $lrsType->setDeleteData((int) $form->getInput("delete_data"));
586
587 $lrsType->setForcePrivacySettings((bool) $form->getInput("force_privacy_setting"));
588 if ($lrsType->getForcePrivacySettings()) {
590 }
591
592 $lrsType->save();
593
594 $DIC->ctrl()->redirect($this, self::CMD_SHOW_LRS_TYPES_LIST);
595 }
596}
This class represents a checkbox property in a property form.
static getTypesData(bool $a_extended=false, ?int $a_availability=null)
Get basic data array of all types (without field definitions)
static removeTrailingPathSeparators(string $path)
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
getAdminTabs()
administration tabs show only permissions and trash folder
showLrsTypeFormCmd(?ilPropertyFormGUI $form=null)
static updatePrivacySettingsFromLrsType(ilCmiXapiLrsType $lrsType)
static updateByPassProxyFromLrsType(ilCmiXapiLrsType $lrsType)
Class ilObjectGUI Basic methods of all Output classes.
ilToolbarGUI $toolbar
prepareOutput(bool $show_sub_objects=true)
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text area property in a property form.
This class represents a text property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addComponent(\ILIAS\UI\Component\Component $a_comp)
global $DIC
Definition: shib_login.php:26