ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilObjCmiXapiAdministrationGUI Class Reference
+ Inheritance diagram for ilObjCmiXapiAdministrationGUI:
+ Collaboration diagram for ilObjCmiXapiAdministrationGUI:

Public Member Functions

 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 executeCommand ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

const TAB_ID_LRS_TYPES = 'tab_lrs_types'
 
const TAB_ID_PERMISSIONS = 'perm_settings'
 
const CMD_SHOW_LRS_TYPES_LIST = 'showLrsTypesList'
 
const CMD_SHOW_LRS_TYPE_FORM = 'showLrsTypeForm'
 
const CMD_SAVE_LRS_TYPE_FORM = 'saveLrsTypeForm'
 
const DEFAULT_CMD = self::CMD_SHOW_LRS_TYPES_LIST
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 viewCmd ()
 
 showLrsTypesListCmd ()
 
 buildLrsTypesTableGUI ()
 
 buildLrsTypesToolbarGUI ()
 
 showLrsTypeFormCmd (?ilPropertyFormGUI $form=null)
 
 initLrsType ()
 
 buildLrsTypeForm (ilCmiXapiLrsType $lrsType)
 
 saveLrsTypeFormCmd ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Definition at line 32 of file class.ilObjCmiXapiAdministrationGUI.php.

Member Function Documentation

◆ buildLrsTypeForm()

ilObjCmiXapiAdministrationGUI::buildLrsTypeForm ( ilCmiXapiLrsType  $lrsType)
protected

Definition at line 153 of file class.ilObjCmiXapiAdministrationGUI.php.

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('conf_enrich_data'), 'enrich_data');
419 $item->setChecked($lrsType->getEnrichData());
420 $item->setInfo($DIC->language()->txt('conf_enrich_data_info'));
421 $form->addItem($item);
422
423 $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_delete_data'), 'delete_data');
424 $options = ["0","1","2","11","12"];
425 for ((int) $i = 0; $i < count($options); $i++) {
426 $op = new ilRadioOption($DIC->language()->txt('conf_delete_data_opt' . $options[$i]), $options[$i]);
427 $item->addOption($op);
428 }
429 $item->setValue((string) $lrsType->getDeleteData());
430 $item->setInfo($DIC->language()->txt('conf_delete_data_info'));
431 $form->addItem($item);
432
433 $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_setting_conf'), 'force_privacy_setting');
434 $op = new ilRadioOption($DIC->language()->txt('conf_privacy_setting_default'), "0");
435 $item->addOption($op);
436 $op = new ilRadioOption($DIC->language()->txt('conf_privacy_setting_force'), "1");
437 $item->addOption($op);
438 $item->setValue((string) ((int) $lrsType->getForcePrivacySettings()));
439 $form->addItem($item);
440
441 $sectionHeader = new ilFormSectionHeaderGUI();
442 $sectionHeader->setTitle('Hints');
443 $form->addItem($sectionHeader);
444
445 $item = new ilCheckboxInputGUI($DIC->language()->txt('conf_external_lrs'), 'external_lrs');
446 $item->setChecked($lrsType->getExternalLrs());
447 $item->setInfo($DIC->language()->txt('info_external_lrs'));
448 $form->addItem($item);
449
450 $item = new ilTextAreaInputGUI($DIC->language()->txt('conf_privacy_comment_default'), 'privacy_comment_default');
451 $item->setInfo($DIC->language()->txt('info_privacy_comment_default'));
452 $item->setValue($lrsType->getPrivacyCommentDefault());
453 $item->setRows(5);
454 $form->addItem($item);
455
456 $item = new ilTextAreaInputGUI($DIC->language()->txt('conf_remarks'), 'remarks');
457 $item->setInfo($DIC->language()->txt('info_remarks'));
458 $item->setValue($lrsType->getRemarks());
459 $item->setRows(5);
460 $form->addItem($item);
461
462 return $form;
463 }
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
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.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\UI\Implementation\Component\Input\Field\$options, ilCmiXapiLrsType\AVAILABILITY_CREATE, ilCmiXapiLrsType\AVAILABILITY_EXISTING, ilCmiXapiLrsType\AVAILABILITY_NONE, ilCmiXapiLrsType\getAchieved(), ilCmiXapiLrsType\getAnswered(), ilCmiXapiLrsType\getAvailability(), ilCmiXapiLrsType\getCompleted(), ilCmiXapiLrsType\getDeleteData(), ilCmiXapiLrsType\getDescription(), ilCmiXapiLrsType\getDuration(), ilCmiXapiLrsType\getEnrichData(), ilCmiXapiLrsType\getExternalLrs(), ilCmiXapiLrsType\getFailed(), ilCmiXapiLrsType\getForcePrivacySettings(), ilCmiXapiLrsType\getHideData(), ilCmiXapiUser\getIliasUuid(), ilCmiXapiLrsType\getInitialized(), ilCmiXapiLrsType\getLrsEndpoint(), ilCmiXapiLrsType\getLrsKey(), ilCmiXapiLrsType\getLrsSecret(), ilCmiXapiLrsType\getNoSubstatements(), ilCmiXapiLrsType\getOnlyMoveon(), ilCmiXapiLrsType\getPassed(), ilCmiXapiLrsType\getPrivacyCommentDefault(), ilCmiXapiLrsType\getPrivacyIdent(), ilCmiXapiLrsType\getPrivacyName(), ilCmiXapiLrsType\getProgressed(), ilCmiXapiLrsType\getRemarks(), ilCmiXapiLrsType\getSatisfied(), ilCmiXapiLrsType\getTerminated(), ilCmiXapiLrsType\getTimestamp(), ilCmiXapiLrsType\getTitle(), ilCmiXapiLrsType\getTypeId(), ilCmiXapiLrsType\isBypassProxyEnabled(), ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT, ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_LOGIN, ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_RANDOM, ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_SHA256, ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_SHA256URL, ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_USER_ID, ilCmiXapiLrsType\PRIVACY_IDENT_REAL_EMAIL, ilCmiXapiLrsType\PRIVACY_NAME_FIRSTNAME, ilCmiXapiLrsType\PRIVACY_NAME_FULLNAME, ilCmiXapiLrsType\PRIVACY_NAME_LASTNAME, and ilCmiXapiLrsType\PRIVACY_NAME_NONE.

Referenced by saveLrsTypeFormCmd(), and showLrsTypeFormCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildLrsTypesTableGUI()

ilObjCmiXapiAdministrationGUI::buildLrsTypesTableGUI ( )
protected

Definition at line 104 of file class.ilObjCmiXapiAdministrationGUI.php.

105 {
106 return new ilCmiXapiLrsTypesTableGUI($this, self::CMD_SHOW_LRS_TYPES_LIST);
107 }

Referenced by showLrsTypesListCmd().

+ Here is the caller graph for this function:

◆ buildLrsTypesToolbarGUI()

ilObjCmiXapiAdministrationGUI::buildLrsTypesToolbarGUI ( )
protected

Definition at line 109 of file class.ilObjCmiXapiAdministrationGUI.php.

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 }
ilToolbarGUI $toolbar
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)

References $DIC, ilObjectGUI\$toolbar, ilToolbarGUI\addComponent(), and ILIAS\Repository\lng().

Referenced by showLrsTypesListCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjCmiXapiAdministrationGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 63 of file class.ilObjCmiXapiAdministrationGUI.php.

63 : 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 }
prepareOutput(bool $show_sub_objects=true)

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjCmiXapiAdministrationGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 43 of file class.ilObjCmiXapiAdministrationGUI.php.

43 : 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 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initLrsType()

ilObjCmiXapiAdministrationGUI::initLrsType ( )
protected

Definition at line 136 of file class.ilObjCmiXapiAdministrationGUI.php.

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 }

Referenced by saveLrsTypeFormCmd(), and showLrsTypeFormCmd().

+ Here is the caller graph for this function:

◆ saveLrsTypeFormCmd()

ilObjCmiXapiAdministrationGUI::saveLrsTypeFormCmd ( )
protected

Definition at line 465 of file class.ilObjCmiXapiAdministrationGUI.php.

465 : void
466 {
467 global $DIC; /* @var \ILIAS\DI\Container $DIC */
468
469 $lrsType = $this->initLrsType();
470
471 $form = $this->buildLrsTypeForm($lrsType);
472
473 if (!$form->checkInput()) {
474 $this->showLrsTypeFormCmd($form);
475 return;
476 }
477
478 $lrsType->setTitle($form->getInput("title"));
479 $lrsType->setDescription($form->getInput("description"));
480 $lrsType->setAvailability((int) $form->getInput("availability"));
481
482 $lrsType->setLrsEndpoint(
483 ilFileUtils::removeTrailingPathSeparators($form->getInput("lrs_endpoint"))
484 );
485
486 $lrsType->setLrsKey($form->getInput("lrs_key"));
487 $lrsType->setLrsSecret($form->getInput("lrs_secret"));
488 $lrsType->setExternalLrs((bool) $form->getInput("external_lrs"));
489 $lrsType->setPrivacyIdent((int) $form->getInput("privacy_ident"));
490 $lrsType->setPrivacyName((int) $form->getInput("privacy_name"));
491 $lrsType->setPrivacyCommentDefault($form->getInput("privacy_comment_default"));
492 $lrsType->setRemarks($form->getInput("remarks"));
493
494 $oldBypassProxyEnabled = $lrsType->isBypassProxyEnabled();
495 $newBypassProxyEnabled = false;
496 if ((bool) $form->getInput("use_proxy") == false) {
497 $newBypassProxyEnabled = true;
498 }
499 $lrsType->setBypassProxyEnabled($newBypassProxyEnabled);
500 if ($newBypassProxyEnabled && $newBypassProxyEnabled != $oldBypassProxyEnabled) {
502 }
503
504 $lrsType->setOnlyMoveon((bool) $form->getInput("only_moveon"));
505 $lrsType->setAchieved((bool) $form->getInput("achieved"));
506 $lrsType->setAnswered((bool) $form->getInput("answered"));
507 $lrsType->setCompleted((bool) $form->getInput("completed"));
508 $lrsType->setFailed((bool) $form->getInput("failed"));
509 $lrsType->setInitialized((bool) $form->getInput("initialized"));
510 $lrsType->setPassed((bool) $form->getInput("passed"));
511 $lrsType->setProgressed((bool) $form->getInput("progressed"));
512 $lrsType->setSatisfied((bool) $form->getInput("satisfied"));
513 $lrsType->setTerminated((bool) $form->getInput("terminated"));
514 $lrsType->setHideData((bool) $form->getInput("hide_data"));
515 $lrsType->setTimestamp((bool) $form->getInput("timestamp"));
516 $lrsType->setDuration((bool) $form->getInput("duration"));
517 $lrsType->setNoSubstatements((bool) $form->getInput("no_substatements"));
518 $lrsType->setDeleteData((int) $form->getInput("delete_data"));
519 $lrsType->setEnrichData((bool) $form->getInput("enrich_data"));
520
521 $lrsType->setForcePrivacySettings((bool) $form->getInput("force_privacy_setting"));
522 if ($lrsType->getForcePrivacySettings()) {
524 }
525
526 $lrsType->save();
527
528 $DIC->ctrl()->redirect($this, self::CMD_SHOW_LRS_TYPES_LIST);
529 }
static removeTrailingPathSeparators(string $path)
showLrsTypeFormCmd(?ilPropertyFormGUI $form=null)
static updatePrivacySettingsFromLrsType(ilCmiXapiLrsType $lrsType)
static updateByPassProxyFromLrsType(ilCmiXapiLrsType $lrsType)

References $DIC, buildLrsTypeForm(), initLrsType(), ilFileUtils\removeTrailingPathSeparators(), showLrsTypeFormCmd(), ilObjCmiXapi\updateByPassProxyFromLrsType(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

+ Here is the call graph for this function:

◆ showLrsTypeFormCmd()

ilObjCmiXapiAdministrationGUI::showLrsTypeFormCmd ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 123 of file class.ilObjCmiXapiAdministrationGUI.php.

123 : 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 }

References buildLrsTypeForm(), and initLrsType().

Referenced by saveLrsTypeFormCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLrsTypesListCmd()

ilObjCmiXapiAdministrationGUI::showLrsTypesListCmd ( )
protected

Definition at line 89 of file class.ilObjCmiXapiAdministrationGUI.php.

89 : 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 }
static getTypesData(bool $a_extended=false, ?int $a_availability=null)
Get basic data array of all types (without field definitions)

References buildLrsTypesTableGUI(), buildLrsTypesToolbarGUI(), and ilCmiXapiLrsTypeList\getTypesData().

Referenced by viewCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ viewCmd()

ilObjCmiXapiAdministrationGUI::viewCmd ( )
protected

Definition at line 84 of file class.ilObjCmiXapiAdministrationGUI.php.

References showLrsTypesListCmd().

+ Here is the call graph for this function:

Field Documentation

◆ CMD_SAVE_LRS_TYPE_FORM

const ilObjCmiXapiAdministrationGUI::CMD_SAVE_LRS_TYPE_FORM = 'saveLrsTypeForm'

Definition at line 39 of file class.ilObjCmiXapiAdministrationGUI.php.

◆ CMD_SHOW_LRS_TYPE_FORM

const ilObjCmiXapiAdministrationGUI::CMD_SHOW_LRS_TYPE_FORM = 'showLrsTypeForm'

◆ CMD_SHOW_LRS_TYPES_LIST

const ilObjCmiXapiAdministrationGUI::CMD_SHOW_LRS_TYPES_LIST = 'showLrsTypesList'

Definition at line 37 of file class.ilObjCmiXapiAdministrationGUI.php.

◆ DEFAULT_CMD

const ilObjCmiXapiAdministrationGUI::DEFAULT_CMD = self::CMD_SHOW_LRS_TYPES_LIST

Definition at line 41 of file class.ilObjCmiXapiAdministrationGUI.php.

◆ TAB_ID_LRS_TYPES

const ilObjCmiXapiAdministrationGUI::TAB_ID_LRS_TYPES = 'tab_lrs_types'

Definition at line 34 of file class.ilObjCmiXapiAdministrationGUI.php.

◆ TAB_ID_PERMISSIONS

const ilObjCmiXapiAdministrationGUI::TAB_ID_PERMISSIONS = 'perm_settings'

Definition at line 35 of file class.ilObjCmiXapiAdministrationGUI.php.


The documentation for this class was generated from the following file: