ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjCmiXapiAdministrationGUI Class Reference
+ Inheritance diagram for ilObjCmiXapiAdministrationGUI:
+ Collaboration diagram for ilObjCmiXapiAdministrationGUI:

Public Member Functions

 getAdminTabs ()
 
 executeCommand ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
 

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 ()
 
 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 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...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 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 ()
 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...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

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
 
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
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
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 148 of file class.ilObjCmiXapiAdministrationGUI.php.

References $DIC, ilCmiXapiLrsType\AVAILABILITY_CREATE, ilCmiXapiLrsType\AVAILABILITY_EXISTING, ilCmiXapiLrsType\AVAILABILITY_NONE, ilCmiXapiLrsType\getAchieved(), ilCmiXapiLrsType\getAnswered(), ilCmiXapiLrsType\getAvailability(), ilCmiXapiLrsType\getCompleted(), 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, ilCmiXapiLrsType\PRIVACY_NAME_NONE, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), and ilRadioOption\setValue().

Referenced by saveLrsTypeFormCmd(), and showLrsTypeFormCmd().

149  {
150  global $DIC; /* @var \ILIAS\DI\Container $DIC */
151 
152  $form = new ilPropertyFormGUI();
153  $form->setFormAction($DIC->ctrl()->getFormAction($this));
154 
155  if ($lrsType->getTypeId()) {
156  $form->setTitle($DIC->language()->txt('edit_lrs_type_form'));
157  $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt('save'));
158  } else {
159  $form->setTitle($DIC->language()->txt('create_lrs_type_form'));
160  $form->addCommandButton(self::CMD_SAVE_LRS_TYPE_FORM, $DIC->language()->txt('create'));
161  }
162 
163  $form->addCommandButton(self::CMD_SHOW_LRS_TYPES_LIST, $DIC->language()->txt('cancel'));
164 
165  $hiddenId = new ilHiddenInputGUI('lrs_type_id');
166  $hiddenId->setValue((string) $lrsType->getTypeId());
167  $form->addItem($hiddenId);
168 
169 
170  $item = new ilTextInputGUI($DIC->language()->txt('conf_title'), 'title');
171  $item->setValue($lrsType->getTitle());
172  $item->setInfo($DIC->language()->txt('info_title'));
173  $item->setRequired(true);
174  $item->setMaxLength(255);
175  $form->addItem($item);
176 
177  $item = new ilTextInputGUI($DIC->language()->txt('conf_description'), 'description');
178  $item->setValue($lrsType->getDescription());
179  $item->setInfo($DIC->language()->txt('info_description'));
180  $form->addItem($item);
181 
182  $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_availability'), 'availability');
183  $optionCreate = new ilRadioOption(
184  $DIC->language()->txt('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_CREATE),
186  );
187  $item->addOption($optionCreate);
188  $optionCreate = new ilRadioOption(
189  $DIC->language()->txt('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_EXISTING),
191  );
192  $item->addOption($optionCreate);
193  $optionCreate = new ilRadioOption(
194  $DIC->language()->txt('conf_availability_' . ilCmiXapiLrsType::AVAILABILITY_NONE),
196  );
197  $item->addOption($optionCreate);
198  $item->setValue((string) $lrsType->getAvailability());
199  $item->setInfo($DIC->language()->txt('info_availability'));
200  $item->setRequired(true);
201  $form->addItem($item);
202 
203  $sectionHeader = new ilFormSectionHeaderGUI();
204  $sectionHeader->setTitle($DIC->language()->txt('lrs_authentication'));
205  $form->addItem($sectionHeader);
206 
207  $item = new ilTextInputGUI($DIC->language()->txt('conf_lrs_endpoint'), 'lrs_endpoint');
208  $item->setValue($lrsType->getLrsEndpoint());
209  $item->setInfo($DIC->language()->txt('info_lrs_endpoint'));
210  $item->setRequired(true);
211  $item->setMaxLength(255);
212  $form->addItem($item);
213 
214  $item = new ilTextInputGUI($DIC->language()->txt('conf_lrs_key'), 'lrs_key');
215  $item->setValue($lrsType->getLrsKey());
216  $item->setInfo($DIC->language()->txt('info_lrs_key'));
217  $item->setRequired(true);
218  $item->setMaxLength(128);
219  $form->addItem($item);
220 
221  $item = new ilTextInputGUI($DIC->language()->txt('conf_lrs_secret'), 'lrs_secret');
222  $item->setValue($lrsType->getLrsSecret());
223  $item->setInfo($DIC->language()->txt('info_lrs_secret'));
224  $item->setRequired(true);
225  $item->setMaxLength(128);
226  $form->addItem($item);
227 
228  $sectionHeader = new ilFormSectionHeaderGUI();
229  $sectionHeader->setTitle($DIC->language()->txt('sect_learning_progress_options'));
230  $form->addItem($sectionHeader);
231 
232  $cronjob = new ilCheckboxInputGUI($DIC->language()->txt('conf_cronjob_neccessary'), 'cronjob_neccessary');
233  $cronjob->setInfo($DIC->language()->txt('conf_cronjob_neccessary_info'));
234  $cronjob->setChecked($lrsType->isBypassProxyEnabled());
235  $form->addItem($cronjob);
236 
237  $sectionHeader = new ilFormSectionHeaderGUI();
238  $sectionHeader->setTitle('Privacy Settings');
239  $form->addItem($sectionHeader);
240 
241  $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_ident'), 'privacy_ident');
242  $op = new ilRadioOption(
243  $DIC->language()->txt('conf_privacy_ident_il_uuid_user_id'),
245  );
246  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_user_id_info'));
247  $item->addOption($op);
248  $op = new ilRadioOption(
249  $DIC->language()->txt('conf_privacy_ident_il_uuid_login'),
251  );
252  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_login_info'));
253  $item->addOption($op);
254  $op = new ilRadioOption(
255  $DIC->language()->txt('conf_privacy_ident_il_uuid_ext_account'),
257  );
258  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_ext_account_info'));
259  $item->addOption($op);
260  $op = new ilRadioOption(
261  $DIC->language()->txt('conf_privacy_ident_il_uuid_sha256'),
263  );
264  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_sha256_info'));
265  $item->addOption($op);
266  $op = new ilRadioOption(
267  $DIC->language()->txt('conf_privacy_ident_il_uuid_sha256url'),
269  );
270  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_sha256url_info'));
271  $item->addOption($op);
272 
273  $op = new ilRadioOption(
274  $DIC->language()->txt('conf_privacy_ident_il_uuid_random'),
276  );
277  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_random_info'));
278  $item->addOption($op);
279  $op = new ilRadioOption(
280  $DIC->language()->txt('conf_privacy_ident_real_email'),
282  );
283  $op->setInfo($DIC->language()->txt('conf_privacy_ident_real_email_info'));
284  $item->addOption($op);
285  $item->setValue((string) $lrsType->getPrivacyIdent());
286  $item->setInfo(
287  $DIC->language()->txt('conf_privacy_ident_info') . ' ' . ilCmiXapiUser::getIliasUuid()
288  );
289  $item->setRequired(false);
290  $form->addItem($item);
291 
292  $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_name'), 'privacy_name');
293  $op = new ilRadioOption(
294  $DIC->language()->txt('conf_privacy_name_none'),
296  );
297  $op->setInfo($DIC->language()->txt('conf_privacy_name_none_info'));
298  $item->addOption($op);
299  $op = new ilRadioOption(
300  $DIC->language()->txt('conf_privacy_name_firstname'),
302  );
303  $op->setInfo($DIC->language()->txt('conf_privacy_name_firstname_info'));
304  $item->addOption($op);
305  $op = new ilRadioOption(
306  $DIC->language()->txt('conf_privacy_name_lastname'),
308  );
309  $op->setInfo($DIC->language()->txt('conf_privacy_name_lastname_info'));
310  $item->addOption($op);
311  $op = new ilRadioOption(
312  $DIC->language()->txt('conf_privacy_name_fullname'),
314  );
315  $op->setInfo($DIC->language()->txt('conf_privacy_name_fullname_info'));
316  $item->addOption($op);
317  $item->setValue((string) $lrsType->getPrivacyName());
318  $item->setInfo($DIC->language()->txt('conf_privacy_name_info'));
319  $item->setRequired(false);
320  $form->addItem($item);
321 
322  $item = new ilCheckboxInputGUI($DIC->language()->txt('only_moveon_label'), 'only_moveon');
323  $item->setInfo($DIC->language()->txt('only_moveon_info'));
324  $item->setChecked($lrsType->getOnlyMoveon());
325 
326  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('achieved_label'), 'achieved');
327  $subitem->setInfo($DIC->language()->txt('achieved_info'));
328  $subitem->setChecked($lrsType->getAchieved());
329  $item->addSubItem($subitem);
330 
331  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('answered_label'), 'answered');
332  $subitem->setInfo($DIC->language()->txt('answered_info'));
333  $subitem->setChecked($lrsType->getAnswered());
334  $item->addSubItem($subitem);
335 
336  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('completed_label'), 'completed');
337  $subitem->setInfo($DIC->language()->txt('completed_info'));
338  $subitem->setChecked($lrsType->getCompleted());
339  $item->addSubItem($subitem);
340 
341  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('failed_label'), 'failed');
342  $subitem->setInfo($DIC->language()->txt('failed_info'));
343  $subitem->setChecked($lrsType->getFailed());
344  $item->addSubItem($subitem);
345 
346  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('initialized_label'), 'initialized');
347  $subitem->setInfo($DIC->language()->txt('initialized_info'));
348  $subitem->setChecked($lrsType->getInitialized());
349  $item->addSubItem($subitem);
350 
351  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('passed_label'), 'passed');
352  $subitem->setInfo($DIC->language()->txt('passed_info'));
353  $subitem->setChecked($lrsType->getPassed());
354  $item->addSubItem($subitem);
355 
356  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('progressed_label'), 'progressed');
357  $subitem->setInfo($DIC->language()->txt('progressed_info'));
358  $subitem->setChecked($lrsType->getProgressed());
359  $item->addSubItem($subitem);
360 
361  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('satisfied_label'), 'satisfied');
362  $subitem->setInfo($DIC->language()->txt('satisfied_info'));
363  $subitem->setChecked($lrsType->getSatisfied());
364  $item->addSubItem($subitem);
365 
366  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('terminated_label'), 'terminated');
367  $subitem->setInfo($DIC->language()->txt('terminated_info'));
368  $subitem->setChecked($lrsType->getTerminated());
369  $item->addSubItem($subitem);
370 
371  $form->addItem($item);
372 
373  $item = new ilCheckboxInputGUI($DIC->language()->txt('hide_data_label'), 'hide_data');
374  $item->setInfo($DIC->language()->txt('hide_data_info'));
375  $item->setChecked($lrsType->getHideData());
376 
377  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('timestamp_label'), 'timestamp');
378  $subitem->setInfo($DIC->language()->txt('timestamp_info'));
379  $subitem->setChecked($lrsType->getTimestamp());
380  $item->addSubItem($subitem);
381 
382  $subitem = new ilCheckboxInputGUI($DIC->language()->txt('duration_label'), 'duration');
383  $subitem->setInfo($DIC->language()->txt('duration_info'));
384  $subitem->setChecked($lrsType->getDuration());
385  $item->addSubItem($subitem);
386 
387  $form->addItem($item);
388 
389  $item = new ilCheckboxInputGUI($DIC->language()->txt('no_substatements_label'), 'no_substatements');
390  $item->setInfo($DIC->language()->txt('no_substatements_info'));
391  $item->setChecked($lrsType->getNoSubstatements());
392  $form->addItem($item);
393 
394  $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_setting_conf'), 'force_privacy_setting');
395  $op = new ilRadioOption($DIC->language()->txt('conf_privacy_setting_default'), "0");
396  $item->addOption($op);
397  $op = new ilRadioOption($DIC->language()->txt('conf_privacy_setting_force'), "1");
398  $item->addOption($op);
399  $item->setValue((string) ((int) $lrsType->getForcePrivacySettings()));
400  $form->addItem($item);
401 
402  $sectionHeader = new ilFormSectionHeaderGUI();
403  $sectionHeader->setTitle('Hints');
404  $form->addItem($sectionHeader);
405 
406  $item = new ilCheckboxInputGUI($DIC->language()->txt('conf_external_lrs'), 'external_lrs');
407  $item->setChecked($lrsType->getExternalLrs());
408  $item->setInfo($DIC->language()->txt('info_external_lrs'));
409  $form->addItem($item);
410 
411  $item = new ilTextAreaInputGUI($DIC->language()->txt('conf_privacy_comment_default'), 'privacy_comment_default');
412  $item->setInfo($DIC->language()->txt('info_privacy_comment_default'));
413  $item->setValue($lrsType->getPrivacyCommentDefault());
414  $item->setRows(5);
415  $form->addItem($item);
416 
417  $item = new ilTextAreaInputGUI($DIC->language()->txt('conf_remarks'), 'remarks');
418  $item->setInfo($DIC->language()->txt('info_remarks'));
419  $item->setValue($lrsType->getRemarks());
420  $item->setRows(5);
421  $form->addItem($item);
422 
423  return $form;
424  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property form user interface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a checkbox property in a property form.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
setValue(string $a_value)
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildLrsTypesTableGUI()

ilObjCmiXapiAdministrationGUI::buildLrsTypesTableGUI ( )
protected

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

Referenced by showLrsTypesListCmd().

101  {
102  return new ilCmiXapiLrsTypesTableGUI($this, self::CMD_SHOW_LRS_TYPES_LIST);
103  }
+ Here is the caller graph for this function:

◆ buildLrsTypesToolbarGUI()

ilObjCmiXapiAdministrationGUI::buildLrsTypesToolbarGUI ( )
protected

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

References ilObjectGUI\$toolbar, ilToolbarGUI\addButtonInstance(), ILIAS\Repository\ctrl(), and ilLinkButton\getInstance().

Referenced by showLrsTypesListCmd().

105  : \ilToolbarGUI
106  {
107  //todo
108  $createTypeButton = ilLinkButton::getInstance();
109  $createTypeButton->setCaption('btn_create_lrs_type');
110  $createTypeButton->setUrl($this->ctrl->getLinkTarget($this, self::CMD_SHOW_LRS_TYPE_FORM));
111 
112  $toolbar = new ilToolbarGUI();
113  $toolbar->addButtonInstance($createTypeButton);
114 
115  return $toolbar;
116  }
addButtonInstance(ilButtonBase $a_button)
Add button instance.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilToolbarGUI $toolbar
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjCmiXapiAdministrationGUI::executeCommand ( )

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

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

62  : void
63  {
64  $this->lng->loadLanguageModule('cmix');
65 
66  $this->prepareOutput();
67 
68  switch ($this->ctrl->getNextClass()) {
69  case 'ilpermissiongui':
70 
71  $this->tabs_gui->activateTab(self::TAB_ID_PERMISSIONS);
72  $gui = new ilPermissionGUI($this);
73  $this->ctrl->forwardCommand($gui);
74  break;
75 
76  default:
77 
78  $command = $this->ctrl->getCmd(self::DEFAULT_CMD) . 'Cmd';
79  $this->{$command}();
80  }
81  }
prepareOutput(bool $show_sub_objects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjCmiXapiAdministrationGUI::getAdminTabs ( )

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

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

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 
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  }
+ Here is the call graph for this function:

◆ initLrsType()

ilObjCmiXapiAdministrationGUI::initLrsType ( )
protected

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

Referenced by saveLrsTypeFormCmd(), and showLrsTypeFormCmd().

132  {
133  if ($this->post_wrapper->has('lrs_type_id')) {
134  if (is_int($this->post_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()))) {
135  return new ilCmiXapiLrsType($this->post_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()));
136  }
137  }
138 
139  if ($this->request_wrapper->has('lrs_type_id')) {
140  if (is_int($this->request_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()))) {
141  return new ilCmiXapiLrsType($this->request_wrapper->retrieve('lrs_type_id', $this->refinery->kindlyTo()->int()));
142  }
143  }
144 
145  return new ilCmiXapiLrsType();
146  }
+ Here is the caller graph for this function:

◆ saveLrsTypeFormCmd()

ilObjCmiXapiAdministrationGUI::saveLrsTypeFormCmd ( )
protected

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

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

426  : void
427  {
428  global $DIC; /* @var \ILIAS\DI\Container $DIC */
429 
430  $lrsType = $this->initLrsType();
431 
432  $form = $this->buildLrsTypeForm($lrsType);
433 
434  if (!$form->checkInput()) {
435  $this->showLrsTypeFormCmd($form);
436  return;
437  }
438 
439  $lrsType->setTitle($form->getInput("title"));
440  $lrsType->setDescription($form->getInput("description"));
441  $lrsType->setAvailability((int) $form->getInput("availability"));
442 
443  $lrsType->setLrsEndpoint(
444  ilFileUtils::removeTrailingPathSeparators($form->getInput("lrs_endpoint"))
445  );
446 
447  $lrsType->setLrsKey($form->getInput("lrs_key"));
448  $lrsType->setLrsSecret($form->getInput("lrs_secret"));
449  $lrsType->setExternalLrs((bool) $form->getInput("external_lrs"));
450  $lrsType->setPrivacyIdent((int) $form->getInput("privacy_ident"));
451  $lrsType->setPrivacyName((int) $form->getInput("privacy_name"));
452  $lrsType->setPrivacyCommentDefault($form->getInput("privacy_comment_default"));
453  $lrsType->setRemarks($form->getInput("remarks"));
454 
455  $oldBypassProxyEnabled = $lrsType->isBypassProxyEnabled();
456  $newBypassProxyEnabled = (bool) $form->getInput("cronjob_neccessary");
457  $lrsType->setBypassProxyEnabled($newBypassProxyEnabled);
458  if ($newBypassProxyEnabled && $newBypassProxyEnabled != $oldBypassProxyEnabled) {
460  }
461 
462  $lrsType->setOnlyMoveon((bool) $form->getInput("only_moveon"));
463  $lrsType->setAchieved((bool) $form->getInput("achieved"));
464  $lrsType->setAnswered((bool) $form->getInput("answered"));
465  $lrsType->setCompleted((bool) $form->getInput("completed"));
466  $lrsType->setFailed((bool) $form->getInput("failed"));
467  $lrsType->setInitialized((bool) $form->getInput("initialized"));
468  $lrsType->setPassed((bool) $form->getInput("passed"));
469  $lrsType->setProgressed((bool) $form->getInput("progressed"));
470  $lrsType->setSatisfied((bool) $form->getInput("satisfied"));
471  $lrsType->setTerminated((bool) $form->getInput("terminated"));
472  $lrsType->setHideData((bool) $form->getInput("hide_data"));
473  $lrsType->setTimestamp((bool) $form->getInput("timestamp"));
474  $lrsType->setDuration((bool) $form->getInput("duration"));
475  $lrsType->setNoSubstatements((bool) $form->getInput("no_substatements"));
476 
477  $lrsType->setForcePrivacySettings((bool) $form->getInput("force_privacy_setting"));
478  if ($lrsType->getForcePrivacySettings()) {
480  }
481 
482  $lrsType->save();
483 
484  $DIC->ctrl()->redirect($this, self::CMD_SHOW_LRS_TYPES_LIST);
485  }
static updatePrivacySettingsFromLrsType(ilCmiXapiLrsType $lrsType)
static removeTrailingPathSeparators(string $path)
global $DIC
Definition: feed.php:28
static updateByPassProxyFromLrsType(ilCmiXapiLrsType $lrsType)
+ Here is the call graph for this function:

◆ showLrsTypeFormCmd()

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

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

References buildLrsTypeForm(), and initLrsType().

Referenced by saveLrsTypeFormCmd().

118  : void
119  {
120  $this->tabs_gui->activateTab(self::TAB_ID_LRS_TYPES);
121 
122  if ($form === null) {
123  $lrsType = $this->initLrsType();
124 
125  $form = $this->buildLrsTypeForm($lrsType);
126  }
127 
128  $this->tpl->setContent($form->getHTML());
129  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLrsTypesListCmd()

ilObjCmiXapiAdministrationGUI::showLrsTypesListCmd ( )
protected

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

References ilObjectGUI\$toolbar, buildLrsTypesTableGUI(), buildLrsTypesToolbarGUI(), and ilCmiXapiLrsTypeList\getTypesData().

Referenced by viewCmd().

88  : void
89  {
90  $this->tabs_gui->activateTab(self::TAB_ID_LRS_TYPES);
91 
93 
94  $table = $this->buildLrsTypesTableGUI();
95 
96  $table->setData(ilCmiXapiLrsTypeList::getTypesData(true));
97  $this->tpl->setContent($toolbar->getHTML() . $table->getHTML());
98  }
ilToolbarGUI $toolbar
static getTypesData(bool $a_extended=false, ?int $a_availability=null)
Get basic data array of all types (without field definitions)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ viewCmd()

ilObjCmiXapiAdministrationGUI::viewCmd ( )
protected

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

References showLrsTypesListCmd().

83  : void
84  {
85  $this->showLrsTypesListCmd();
86  }
+ 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: