32 $DIC->help()->setScreenIdComponent(
"cmix");
36 self::TAB_ID_LRS_TYPES,
37 $DIC->language()->txt(self::TAB_ID_LRS_TYPES),
38 $DIC->ctrl()->getLinkTargetByClass(self::class)
44 self::TAB_ID_PERMISSIONS,
45 $DIC->language()->txt(self::TAB_ID_PERMISSIONS),
46 $DIC->ctrl()->getLinkTargetByClass(ilPermissionGUI::class,
'perm')
54 $DIC->language()->loadLanguageModule(
'cmix');
58 switch ($DIC->ctrl()->getNextClass()) {
59 case 'ilpermissiongui':
61 $DIC->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
64 $DIC->ctrl()->forwardCommand($gui);
69 $command = $DIC->ctrl()->getCmd(self::DEFAULT_CMD) .
'Cmd';
83 $DIC->tabs()->activateTab(self::TAB_ID_LRS_TYPES);
91 $DIC->ui()->mainTemplate()->setContent(
$toolbar->getHTML() . $table->getHTML());
105 $createTypeButton->setCaption(
'btn_create_lrs_type');
106 $createTypeButton->setUrl($DIC->ctrl()->getLinkTarget($this, self::CMD_SHOW_LRS_TYPE_FORM));
109 $toolbar->addButtonInstance($createTypeButton);
118 $DIC->tabs()->activateTab(self::TAB_ID_LRS_TYPES);
120 if ($form === null) {
126 $DIC->ui()->mainTemplate()->setContent($form->getHTML());
131 if (isset(
$_POST[
'lrs_type_id']) && (
int)
$_POST[
'lrs_type_id']) {
135 if (isset(
$_GET[
'lrs_type_id']) && (
int)
$_GET[
'lrs_type_id']) {
147 $form->setFormAction($DIC->ctrl()->getFormAction($this));
150 $form->setTitle($DIC->language()->txt(
'edit_lrs_type_form'));
151 $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt(
'save'));
153 $form->setTitle($DIC->language()->txt(
'create_lrs_type_form'));
154 $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt(
'create'));
157 $form->addCommandButton(self::CMD_SHOW_LRS_TYPES_LIST, $DIC->language()->txt(
'cancel'));
160 $hiddenId->setValue($lrsType->
getTypeId());
161 $form->addItem($hiddenId);
164 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_title'),
'title');
165 $item->setValue($lrsType->
getTitle());
166 $item->setInfo($DIC->language()->txt(
'info_title'));
167 $item->setRequired(
true);
168 $item->setMaxLength(255);
169 $form->addItem($item);
171 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_description'),
'description');
173 $item->setInfo($DIC->language()->txt(
'info_description'));
174 $form->addItem($item);
181 $item->addOption($optionCreate);
186 $item->addOption($optionCreate);
191 $item->addOption($optionCreate);
193 $item->setInfo($DIC->language()->txt(
'info_availability'));
194 $item->setRequired(
true);
195 $form->addItem($item);
198 $sectionHeader->setTitle($DIC->language()->txt(
'lrs_authentication'));
199 $form->addItem($sectionHeader);
201 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_lrs_endpoint'),
'lrs_endpoint');
203 $item->setInfo($DIC->language()->txt(
'info_lrs_endpoint'));
204 $item->setRequired(
true);
205 $item->setMaxLength(255);
206 $form->addItem($item);
208 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_lrs_key'),
'lrs_key');
210 $item->setInfo($DIC->language()->txt(
'info_lrs_key'));
211 $item->setRequired(
true);
212 $item->setMaxLength(128);
213 $form->addItem($item);
215 $item =
new ilTextInputGUI($DIC->language()->txt(
'conf_lrs_secret'),
'lrs_secret');
217 $item->setInfo($DIC->language()->txt(
'info_lrs_secret'));
218 $item->setRequired(
true);
219 $item->setMaxLength(128);
220 $form->addItem($item);
223 $sectionHeader->setTitle($DIC->language()->txt(
'sect_learning_progress_options'));
224 $form->addItem($sectionHeader);
226 $cronjob =
new ilCheckboxInputGUI($DIC->language()->txt(
'conf_cronjob_neccessary'),
'cronjob_neccessary');
227 $cronjob->
setInfo($DIC->language()->txt(
'conf_cronjob_neccessary_info'));
229 $form->addItem($cronjob);
232 $sectionHeader->setTitle(
'Privacy Settings');
233 $form->addItem($sectionHeader);
237 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_user_id'),
240 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_user_id_info'));
241 $item->addOption($op);
243 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_login'),
246 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_login_info'));
247 $item->addOption($op);
249 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_ext_account'),
252 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_ext_account_info'));
253 $item->addOption($op);
255 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_sha256'),
258 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_sha256_info'));
259 $item->addOption($op);
261 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_sha256url'),
264 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_sha256url_info'));
265 $item->addOption($op);
267 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_random'),
270 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_random_info'));
271 $item->addOption($op);
273 $DIC->language()->txt(
'conf_privacy_ident_real_email'),
276 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_real_email_info'));
277 $item->addOption($op);
282 $item->setRequired(
false);
283 $form->addItem($item);
287 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_none_info'));
288 $item->addOption($op);
290 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_firstname_info'));
291 $item->addOption($op);
293 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_lastname_info'));
294 $item->addOption($op);
296 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_fullname_info'));
297 $item->addOption($op);
299 $item->setInfo($DIC->language()->txt(
'conf_privacy_name_info'));
300 $item->setRequired(
false);
301 $form->addItem($item);
303 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'only_moveon_label'),
'only_moveon');
304 $item->
setInfo($DIC->language()->txt(
'only_moveon_info'));
307 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'achieved_label'),
'achieved');
308 $subitem->
setInfo($DIC->language()->txt(
'achieved_info'));
310 $item->addSubItem($subitem);
312 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'answered_label'),
'answered');
313 $subitem->
setInfo($DIC->language()->txt(
'answered_info'));
315 $item->addSubItem($subitem);
317 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'completed_label'),
'completed');
318 $subitem->
setInfo($DIC->language()->txt(
'completed_info'));
320 $item->addSubItem($subitem);
323 $subitem->
setInfo($DIC->language()->txt(
'failed_info'));
324 $subitem->setChecked($lrsType->
getFailed());
325 $item->addSubItem($subitem);
327 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'initialized_label'),
'initialized');
328 $subitem->
setInfo($DIC->language()->txt(
'initialized_info'));
330 $item->addSubItem($subitem);
333 $subitem->
setInfo($DIC->language()->txt(
'passed_info'));
334 $subitem->setChecked($lrsType->
getPassed());
335 $item->addSubItem($subitem);
337 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'progressed_label'),
'progressed');
338 $subitem->
setInfo($DIC->language()->txt(
'progressed_info'));
340 $item->addSubItem($subitem);
342 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'satisfied_label'),
'satisfied');
343 $subitem->
setInfo($DIC->language()->txt(
'satisfied_info'));
345 $item->addSubItem($subitem);
347 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'terminated_label'),
'terminated');
348 $subitem->
setInfo($DIC->language()->txt(
'terminated_info'));
350 $item->addSubItem($subitem);
352 $form->addItem($item);
354 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'hide_data_label'),
'hide_data');
355 $item->
setInfo($DIC->language()->txt(
'hide_data_info'));
358 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'timestamp_label'),
'timestamp');
359 $subitem->
setInfo($DIC->language()->txt(
'timestamp_info'));
361 $item->addSubItem($subitem);
363 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'duration_label'),
'duration');
364 $subitem->
setInfo($DIC->language()->txt(
'duration_info'));
366 $item->addSubItem($subitem);
368 $form->addItem($item);
370 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'no_substatements_label'),
'no_substatements');
371 $item->
setInfo($DIC->language()->txt(
'no_substatements_info'));
373 $form->addItem($item);
375 $item =
new ilRadioGroupInputGUI($DIC->language()->txt(
'conf_privacy_setting_conf'),
'force_privacy_setting');
376 $op =
new ilRadioOption($DIC->language()->txt(
'conf_privacy_setting_default'), 0);
377 $item->addOption($op);
378 $op =
new ilRadioOption($DIC->language()->txt(
'conf_privacy_setting_force'), 1);
379 $item->addOption($op);
381 $form->addItem($item);
384 $sectionHeader->setTitle(
'Hints');
385 $form->addItem($sectionHeader);
387 $item =
new ilCheckboxInputGUI($DIC->language()->txt(
'conf_external_lrs'),
'external_lrs');
389 $item->setInfo($DIC->language()->txt(
'info_external_lrs'));
390 $form->addItem($item);
392 $item =
new ilTextAreaInputGUI($DIC->language()->txt(
'conf_privacy_comment_default'),
'privacy_comment_default');
393 $item->
setInfo($DIC->language()->txt(
'info_privacy_comment_default'));
396 $form->addItem($item);
399 $item->
setInfo($DIC->language()->txt(
'info_remarks'));
402 $form->addItem($item);
415 if (!$form->checkInput()) {
420 $lrsType->setTitle($form->getInput(
"title"));
421 $lrsType->setDescription($form->getInput(
"description"));
422 $lrsType->setAvailability($form->getInput(
"availability"));
424 $lrsType->setLrsEndpoint(
428 $lrsType->setLrsKey($form->getInput(
"lrs_key"));
429 $lrsType->setLrsSecret($form->getInput(
"lrs_secret"));
430 $lrsType->setExternalLrs($form->getInput(
"external_lrs"));
431 $lrsType->setPrivacyIdent($form->getInput(
"privacy_ident"));
432 $lrsType->setPrivacyName($form->getInput(
"privacy_name"));
433 $lrsType->setPrivacyCommentDefault($form->getInput(
"privacy_comment_default"));
434 $lrsType->setRemarks($form->getInput(
"remarks"));
436 $oldBypassProxyEnabled = $lrsType->isBypassProxyEnabled();
437 $newBypassProxyEnabled = $form->getInput(
"cronjob_neccessary");
438 $lrsType->setBypassProxyEnabled((
bool) $newBypassProxyEnabled);
439 if ($newBypassProxyEnabled && $newBypassProxyEnabled != $oldBypassProxyEnabled) {
443 $lrsType->setOnlyMoveon((
bool) $form->getInput(
"only_moveon"));
444 $lrsType->setAchieved((
bool) $form->getInput(
"achieved"));
445 $lrsType->setAnswered((
bool) $form->getInput(
"answered"));
446 $lrsType->setCompleted((
bool) $form->getInput(
"completed"));
447 $lrsType->setFailed((
bool) $form->getInput(
"failed"));
448 $lrsType->setInitialized((
bool) $form->getInput(
"initialized"));
449 $lrsType->setPassed((
bool) $form->getInput(
"passed"));
450 $lrsType->setProgressed((
bool) $form->getInput(
"progressed"));
451 $lrsType->setSatisfied((
bool) $form->getInput(
"satisfied"));
452 $lrsType->setTerminated((
bool) $form->getInput(
"terminated"));
453 $lrsType->setHideData((
bool) $form->getInput(
"hide_data"));
454 $lrsType->setTimestamp((
bool) $form->getInput(
"timestamp"));
455 $lrsType->setDuration((
bool) $form->getInput(
"duration"));
456 $lrsType->setNoSubstatements((
bool) $form->getInput(
"no_substatements"));
458 $lrsType->setForcePrivacySettings((
bool) $form->getInput(
"force_privacy_setting"));
459 if ($lrsType->getForcePrivacySettings()) {
465 $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.
const PRIVACY_IDENT_IL_UUID_SHA256URL
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