35 self::TAB_ID_LRS_TYPES,
36 $DIC->language()->txt(self::TAB_ID_LRS_TYPES),
37 $DIC->ctrl()->getLinkTargetByClass(self::class)
43 self::TAB_ID_PERMISSIONS,
44 $DIC->language()->txt(self::TAB_ID_PERMISSIONS),
45 $DIC->ctrl()->getLinkTargetByClass(ilPermissionGUI::class,
'perm')
53 $DIC->language()->loadLanguageModule(
'cmix');
57 switch ($DIC->ctrl()->getNextClass()) {
58 case 'ilpermissiongui':
60 $DIC->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
63 $DIC->ctrl()->forwardCommand($gui);
68 $command = $DIC->ctrl()->getCmd(self::DEFAULT_CMD) .
'Cmd';
82 $DIC->tabs()->activateTab(self::TAB_ID_LRS_TYPES);
90 $DIC->ui()->mainTemplate()->setContent(
$toolbar->getHTML() . $table->getHTML());
104 $createTypeButton->setCaption(
'btn_create_lrs_type');
105 $createTypeButton->setUrl($DIC->ctrl()->getLinkTarget($this, self::CMD_SHOW_LRS_TYPE_FORM));
108 $toolbar->addButtonInstance($createTypeButton);
117 $DIC->tabs()->activateTab(self::TAB_ID_LRS_TYPES);
119 if ($form === null) {
125 $DIC->ui()->mainTemplate()->setContent($form->getHTML());
130 if (isset(
$_POST[
'lrs_type_id']) && (
int)
$_POST[
'lrs_type_id']) {
134 if (isset(
$_GET[
'lrs_type_id']) && (
int)
$_GET[
'lrs_type_id']) {
146 $form->setFormAction($DIC->ctrl()->getFormAction($this));
149 $form->setTitle($DIC->language()->txt(
'edit_lrs_type_form'));
150 $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt(
'save'));
152 $form->setTitle($DIC->language()->txt(
'create_lrs_type_form'));
153 $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt(
'create'));
156 $form->addCommandButton(self::CMD_SHOW_LRS_TYPES_LIST, $DIC->language()->txt(
'cancel'));
159 $hiddenId->setValue($lrsType->
getTypeId());
160 $form->addItem($hiddenId);
163 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_title'),
'title');
164 $item->setValue($lrsType->
getTitle());
165 $item->setInfo($DIC->language()->txt(
'info_title'));
166 $item->setRequired(
true);
167 $item->setMaxLength(255);
168 $form->addItem($item);
170 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_description'),
'description');
172 $item->setInfo($DIC->language()->txt(
'info_description'));
173 $form->addItem($item);
180 $item->addOption($optionCreate);
185 $item->addOption($optionCreate);
190 $item->addOption($optionCreate);
192 $item->setInfo($DIC->language()->txt(
'info_availability'));
193 $item->setRequired(
true);
194 $form->addItem($item);
197 $sectionHeader->setTitle($DIC->language()->txt(
'lrs_authentication'));
198 $form->addItem($sectionHeader);
200 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_lrs_endpoint'),
'lrs_endpoint');
202 $item->setInfo($DIC->language()->txt(
'info_lrs_endpoint'));
203 $item->setRequired(
true);
204 $item->setMaxLength(255);
205 $form->addItem($item);
207 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_lrs_key'),
'lrs_key');
209 $item->setInfo($DIC->language()->txt(
'info_lrs_key'));
210 $item->setRequired(
true);
211 $item->setMaxLength(128);
212 $form->addItem($item);
214 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_lrs_secret'),
'lrs_secret');
216 $item->setInfo($DIC->language()->txt(
'info_lrs_secret'));
217 $item->setRequired(
true);
218 $item->setMaxLength(128);
219 $form->addItem($item);
222 $sectionHeader->setTitle($DIC->language()->txt(
'sect_learning_progress_options'));
223 $form->addItem($sectionHeader);
225 $cronjob =
new ilCheckboxInputGUI($DIC->language()->txt(
'conf_cronjob_neccessary'),
'cronjob_neccessary');
226 $cronjob->
setInfo($DIC->language()->txt(
'conf_cronjob_neccessary_info'));
228 $form->addItem($cronjob);
231 $sectionHeader->setTitle(
'Privacy Settings');
232 $form->addItem($sectionHeader);
236 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_user_id'),
239 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_user_id_info'));
240 $item->addOption($op);
242 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_login'),
245 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_login_info'));
246 $item->addOption($op);
248 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_ext_account'),
251 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_ext_account_info'));
252 $item->addOption($op);
254 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_SHA256'),
257 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_SHA256_info'));
258 $item->addOption($op);
260 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_random'),
263 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_random_info'));
264 $item->addOption($op);
266 $DIC->language()->txt(
'conf_privacy_ident_real_email'),
269 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_real_email_info'));
270 $item->addOption($op);
275 $item->setRequired(
false);
276 $form->addItem($item);
280 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_none_info'));
281 $item->addOption($op);
283 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_firstname_info'));
284 $item->addOption($op);
286 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_lastname_info'));
287 $item->addOption($op);
289 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_fullname_info'));
290 $item->addOption($op);
292 $item->setInfo($DIC->language()->txt(
'conf_privacy_name_info'));
293 $item->setRequired(
false);
294 $form->addItem($item);
296 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'only_moveon_label'),
'only_moveon');
297 $item->
setInfo($DIC->language()->txt(
'only_moveon_info'));
300 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'achieved_label'),
'achieved');
301 $subitem->
setInfo($DIC->language()->txt(
'achieved_info'));
303 $item->addSubItem($subitem);
305 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'answered_label'),
'answered');
306 $subitem->
setInfo($DIC->language()->txt(
'answered_info'));
308 $item->addSubItem($subitem);
310 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'completed_label'),
'completed');
311 $subitem->
setInfo($DIC->language()->txt(
'completed_info'));
313 $item->addSubItem($subitem);
316 $subitem->
setInfo($DIC->language()->txt(
'failed_info'));
317 $subitem->setChecked($lrsType->
getFailed());
318 $item->addSubItem($subitem);
320 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'initialized_label'),
'initialized');
321 $subitem->
setInfo($DIC->language()->txt(
'initialized_info'));
323 $item->addSubItem($subitem);
326 $subitem->
setInfo($DIC->language()->txt(
'passed_info'));
327 $subitem->setChecked($lrsType->
getPassed());
328 $item->addSubItem($subitem);
330 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'progressed_label'),
'progressed');
331 $subitem->
setInfo($DIC->language()->txt(
'progressed_info'));
333 $item->addSubItem($subitem);
335 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'satisfied_label'),
'satisfied');
336 $subitem->
setInfo($DIC->language()->txt(
'satisfied_info'));
338 $item->addSubItem($subitem);
340 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'terminated_label'),
'terminated');
341 $subitem->
setInfo($DIC->language()->txt(
'terminated_info'));
343 $item->addSubItem($subitem);
345 $form->addItem($item);
347 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'hide_data_label'),
'hide_data');
348 $item->
setInfo($DIC->language()->txt(
'hide_data_info'));
351 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'timestamp_label'),
'timestamp');
352 $subitem->
setInfo($DIC->language()->txt(
'timestamp_info'));
354 $item->addSubItem($subitem);
356 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'duration_label'),
'duration');
357 $subitem->
setInfo($DIC->language()->txt(
'duration_info'));
359 $item->addSubItem($subitem);
361 $form->addItem($item);
363 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'no_substatements_label'),
'no_substatements');
364 $item->
setInfo($DIC->language()->txt(
'no_substatements_info'));
366 $form->addItem($item);
368 $item =
new ilRadioGroupInputGUI($DIC->language()->txt(
'conf_privacy_setting_conf'),
'force_privacy_setting');
369 $op =
new ilRadioOption($DIC->language()->txt(
'conf_privacy_setting_default'), 0);
370 $item->addOption($op);
371 $op =
new ilRadioOption($DIC->language()->txt(
'conf_privacy_setting_force'), 1);
372 $item->addOption($op);
374 $form->addItem($item);
377 $sectionHeader->setTitle(
'Hints');
378 $form->addItem($sectionHeader);
380 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'conf_external_lrs'),
'external_lrs');
382 $item->setInfo($DIC->language()->txt(
'info_external_lrs'));
383 $form->addItem($item);
385 $item =
new ilTextAreaInputGUI($DIC->language()->txt(
'conf_privacy_comment_default'),
'privacy_comment_default');
386 $item->
setInfo($DIC->language()->txt(
'info_privacy_comment_default'));
389 $form->addItem($item);
392 $item->
setInfo($DIC->language()->txt(
'info_remarks'));
395 $form->addItem($item);
408 if (!$form->checkInput()) {
413 $lrsType->setTitle($form->getInput(
"title"));
414 $lrsType->setDescription($form->getInput(
"description"));
415 $lrsType->setAvailability($form->getInput(
"availability"));
417 $lrsType->setLrsEndpoint(
421 $lrsType->setLrsKey($form->getInput(
"lrs_key"));
422 $lrsType->setLrsSecret($form->getInput(
"lrs_secret"));
423 $lrsType->setExternalLrs($form->getInput(
"external_lrs"));
424 $lrsType->setPrivacyIdent($form->getInput(
"privacy_ident"));
425 $lrsType->setPrivacyName($form->getInput(
"privacy_name"));
426 $lrsType->setPrivacyCommentDefault($form->getInput(
"privacy_comment_default"));
427 $lrsType->setRemarks($form->getInput(
"remarks"));
429 $oldBypassProxyEnabled = $lrsType->isBypassProxyEnabled();
430 $newBypassProxyEnabled = $form->getInput(
"cronjob_neccessary");
431 $lrsType->setBypassProxyEnabled((
bool) $newBypassProxyEnabled);
432 if ($newBypassProxyEnabled && $newBypassProxyEnabled != $oldBypassProxyEnabled) {
436 $lrsType->setOnlyMoveon((
bool)$form->getInput(
"only_moveon"));
437 $lrsType->setAchieved((
bool)$form->getInput(
"achieved"));
438 $lrsType->setAnswered((
bool)$form->getInput(
"answered"));
439 $lrsType->setCompleted((
bool)$form->getInput(
"completed"));
440 $lrsType->setFailed((
bool)$form->getInput(
"failed"));
441 $lrsType->setInitialized((
bool)$form->getInput(
"initialized"));
442 $lrsType->setPassed((
bool)$form->getInput(
"passed"));
443 $lrsType->setProgressed((
bool)$form->getInput(
"progressed"));
444 $lrsType->setSatisfied((
bool)$form->getInput(
"satisfied"));
445 $lrsType->setTerminated((
bool)$form->getInput(
"terminated"));
446 $lrsType->setHideData((
bool)$form->getInput(
"hide_data"));
447 $lrsType->setTimestamp((
bool)$form->getInput(
"timestamp"));
448 $lrsType->setDuration((
bool)$form->getInput(
"duration"));
449 $lrsType->setNoSubstatements((
bool)$form->getInput(
"no_substatements"));
451 $lrsType->setForcePrivacySettings((
bool) $form->getInput(
"force_privacy_setting"));
452 if ($lrsType->getForcePrivacySettings()) {
458 $DIC->ctrl()->redirect($this, self::CMD_SHOW_LRS_TYPES_LIST);
This class represents an option in a radio group.
buildLrsTypeForm(ilCmiXapiLrsType $lrsType)
const PRIVACY_IDENT_REAL_EMAIL
const PRIVACY_NAME_FULLNAME
const CMD_SHOW_LRS_TYPES_LIST
static getTypesData($a_extended=false, $a_availability=null)
Get basic data array of all types (without field definitions)
const CMD_SAVE_LRS_TYPE_FORM
const PRIVACY_NAME_LASTNAME
static updatePrivacySettingsFromLrsType(ilCmiXapiLrsType $lrsType)
buildLrsTypesToolbarGUI()
const PRIVACY_IDENT_IL_UUID_USER_ID
getForcePrivacySettings()
const AVAILABILITY_CREATE
prepareOutput($a_show_subobjects=true)
prepare output
setValue($a_value)
Set Value.
const CMD_SHOW_LRS_TYPE_FORM
const AVAILABILITY_EXISTING
Class ilObjectGUI Basic methods of all Output classes.
static removeTrailingPathSeparators($path)
getPrivacyCommentDefault()
showLrsTypeFormCmd(ilPropertyFormGUI $form=null)
This class represents a text area property in a property form.
const PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT
const PRIVACY_IDENT_IL_UUID_SHA256
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
const PRIVACY_IDENT_IL_UUID_RANDOM
static updateByPassProxyFromLrsType(ilCmiXapiLrsType $lrsType)
const PRIVACY_NAME_FIRSTNAME
const PRIVACY_IDENT_IL_UUID_LOGIN