ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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('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 }
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, ilCmiXapiLrsType\AVAILABILITY_CREATE, ilCmiXapiLrsType\AVAILABILITY_EXISTING, ilCmiXapiLrsType\AVAILABILITY_NONE, ilCmiXapiLrsType\getAchieved(), ilCmiXapiLrsType\getAnswered(), ilCmiXapiLrsType\getAvailability(), ilCmiXapiLrsType\getCompleted(), ilCmiXapiLrsType\getDeleteData(), ilCmiXapiLrsType\getDescription(), ilCmiXapiLrsType\getDuration(), 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 532 of file class.ilObjCmiXapiAdministrationGUI.php.

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