ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjAwarenessAdministrationGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjAwarenessAdministrationGUI:
+ Collaboration diagram for ilObjAwarenessAdministrationGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 
 setSubTabs (string $a_id)
 
 editSettings (?ilPropertyFormGUI $a_form=null)
 Edit settings. More...
 
 saveSettings ()
 Save settings. More...
 
 cancel ()
 Save settings. More...
 
- 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)
 

Protected Member Functions

 initFormSettings ()
 
- 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...
 

Protected Attributes

ILIAS Awareness AdminManager $admin_manager
 
- 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 = ""
 

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)
 
- 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
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Awareness tool administration

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de ilObjAwarenessAdministrationGUI: ilPermissionGUI, ilUserActionAdminGUI ilObjAwarenessAdministrationGUI: ilAdministrationGUI

Definition at line 25 of file class.ilObjAwarenessAdministrationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjAwarenessAdministrationGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)
Parameters
mixed$a_data

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

37  {
38  global $DIC;
39 
40  $this->rbacsystem = $DIC->rbac()->system();
41  $this->ctrl = $DIC->ctrl();
42  $this->lng = $DIC->language();
43  $this->type = "awra";
44  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
45 
46  $this->lng->loadLanguageModule("awrn");
47  $this->lng->loadLanguageModule("pd");
48  $this->lng->loadLanguageModule("usr");
49  $this->admin_manager = $DIC->awareness()
50  ->internal()
51  ->domain()
52  ->admin($this->requested_ref_id);
53  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancel()

ilObjAwarenessAdministrationGUI::cancel ( )

Save settings.

Definition at line 186 of file class.ilObjAwarenessAdministrationGUI.php.

References ilObjectGUI\$ctrl, and ilCtrl\redirect().

186  : void
187  {
188  $ilCtrl = $this->ctrl;
189 
190  $ilCtrl->redirect($this, "view");
191  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ editSettings()

ilObjAwarenessAdministrationGUI::editSettings ( ?ilPropertyFormGUI  $a_form = null)

Edit settings.

Definition at line 129 of file class.ilObjAwarenessAdministrationGUI.php.

References initFormSettings(), and setSubTabs().

Referenced by saveSettings().

129  : bool
130  {
131  $this->tabs_gui->setTabActive('settings');
132  $this->setSubTabs("settings");
133 
134  if (!$a_form) {
135  $a_form = $this->initFormSettings();
136  }
137  $this->tpl->setContent($a_form->getHTML());
138  return true;
139  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjAwarenessAdministrationGUI::executeCommand ( )

Definition at line 55 of file class.ilObjAwarenessAdministrationGUI.php.

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

55  : void
56  {
57  $next_class = $this->ctrl->getNextClass($this);
58  $cmd = $this->ctrl->getCmd();
59 
60  $this->prepareOutput();
61 
62  switch ($next_class) {
63  case 'iluseractionadmingui':
64  $gui = new ilUserActionAdminGUI($this->requested_ref_id);
65  $gui->setActionContext(new ilAwarenessUserActionContext());
66  $this->tabs_gui->setTabActive('settings');
67  $this->setSubTabs("actions");
68  $this->ctrl->forwardCommand($gui);
69  break;
70 
71  case 'ilpermissiongui':
72  $this->tabs_gui->setTabActive('perm_settings');
73  $perm_gui = new ilPermissionGUI($this);
74  $this->ctrl->forwardCommand($perm_gui);
75  break;
76 
77  default:
78  if (!$cmd || $cmd == 'view') {
79  $cmd = "editSettings";
80  }
81 
82  $this->$cmd();
83  break;
84  }
85  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjAwarenessAdministrationGUI::getAdminTabs ( )

Definition at line 87 of file class.ilObjAwarenessAdministrationGUI.php.

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

87  : void
88  {
89  $rbacsystem = $this->rbacsystem;
90 
91  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
92  $this->tabs_gui->addTab(
93  "settings",
94  $this->lng->txt("settings"),
95  $this->ctrl->getLinkTarget($this, "editSettings")
96  );
97  }
98 
99  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
100  $this->tabs_gui->addTab(
101  "perm_settings",
102  $this->lng->txt("perm_settings"),
103  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
104  );
105  }
106  }
+ Here is the call graph for this function:

◆ initFormSettings()

ilObjAwarenessAdministrationGUI::initFormSettings ( )
protected

Definition at line 193 of file class.ilObjAwarenessAdministrationGUI.php.

References ilObjectGUI\$lng, ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setSuffix(), and ilLanguage\txt().

Referenced by editSettings(), and saveSettings().

194  {
195  $lng = $this->lng;
196 
197  $form = new ilPropertyFormGUI();
198  $form->setFormAction($this->ctrl->getFormAction($this));
199  $form->setTitle($this->lng->txt('awareness_settings'));
200 
201  if ($this->checkPermissionBool("write")) {
202  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
203  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
204  }
205 
206  $en = new ilCheckboxInputGUI($lng->txt("awrn_enable"), "enable_awareness");
207  $form->addItem($en);
208 
209  $awrn_set = new ilSetting("awrn");
210  $en->setChecked($awrn_set->get("awrn_enabled", false));
211 
212  // caching period
213  $ti = new ilNumberInputGUI($this->lng->txt("awrn_caching_period"), "caching_period");
214  $ti->setInfo($this->lng->txt("awrn_caching_period_info"));
215  $ti->setSuffix($this->lng->txt("awrn_seconds"));
216  $ti->setSize(6);
217  $ti->setMaxLength(6);
218  $ti->setValue($awrn_set->get("caching_period"));
219  $en->addSubItem($ti);
220 
221  // limit number of entries
222  $ti = new ilNumberInputGUI($this->lng->txt("awrn_max_nr_entries"), "max_nr_entries");
223  $ti->setInfo($this->lng->txt("awrn_max_nr_entries_info"));
224  $ti->setSize(3);
225  $ti->setMaxLength(3);
226  $ti->setMinValue(5);
227  $ti->setMaxValue(200);
228  $ti->setValue($awrn_set->get("max_nr_entries"));
229  $en->addSubItem($ti);
230 
231  // maximum inactivity time
232  $pd_set = new ilSetting("pd"); // under pd settings due to historical reasons
233  $ti_prop = new ilNumberInputGUI(
234  $lng->txt("awrn_max_inactivity"),
235  "time_removal"
236  );
237  $ti_prop->setSuffix($this->lng->txt("awrn_minutes"));
238  if ($pd_set->get("user_activity_time") > 0) {
239  $ti_prop->setValue($pd_set->get("user_activity_time"));
240  }
241  $ti_prop->setInfo($lng->txt("awrn_max_inactivity_info"));
242  $ti_prop->setMaxLength(3);
243  $ti_prop->setSize(3);
244  $en->addSubItem($ti_prop);
245 
246  // activate osd
247  $osd = new ilCheckboxInputGUI($this->lng->txt("awrn_use_osd"), "use_osd");
248  $osd->setInfo($this->lng->txt("awrn_use_osd_info"));
249  $osd->setChecked($awrn_set->get("use_osd", true));
250  $en->addSubItem($osd);
251 
252 
253  $prov = $this->admin_manager->getAllUserProviders();
254  foreach ($prov as $p) {
255  // activation mode
256  $options = $this->admin_manager->getModeOptions();
257  $si = new ilSelectInputGUI($p->getTitle(), "up_act_mode_" . $p->getProviderId());
258  $si->setOptions($options);
259  $si->setInfo($p->getInfo());
260  $si->setValue($this->admin_manager->getActivationMode($p->getProviderId()));
261  $en->addSubItem($si);
262  }
263 
264  return $form;
265  }
setSuffix(string $a_value)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a checkbox property in a property form.
ilLanguage $lng
This class represents a number property in a property form.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjAwarenessAdministrationGUI::saveSettings ( )

Save settings.

Definition at line 144 of file class.ilObjAwarenessAdministrationGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\checkPermission(), editSettings(), initFormSettings(), ILIAS\Repository\int(), and ILIAS\Repository\lng().

144  : void
145  {
146  $ilCtrl = $this->ctrl;
147 
148  $this->checkPermission("write");
149 
150  $form = $this->initFormSettings();
151  if ($form->checkInput()) {
152  $awrn_set = new ilSetting("awrn");
153  $awrn_set->set("awrn_enabled", (bool) $form->getInput("enable_awareness"));
154 
155  $p = (int) $form->getInput("caching_period");
156  if ($p < 0) {
157  $p = 0;
158  }
159  $awrn_set->set("caching_period", $p);
160 
161  $awrn_set->set("max_nr_entries", (int) $form->getInput("max_nr_entries"));
162  $awrn_set->set("use_osd", (int) $form->getInput("use_osd"));
163 
164  $pd_set = new ilSetting("pd");
165  $pd_set->set("user_activity_time", (int) $form->getInput("time_removal"));
166 
167  $prov = $this->admin_manager->getAllUserProviders();
168  foreach ($prov as $p) {
169  $this->admin_manager->setActivationMode(
170  $p->getProviderId(),
171  (int) $form->getInput("up_act_mode_" . $p->getProviderId())
172  );
173  }
174 
175  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
176  $ilCtrl->redirect($this, "editSettings");
177  }
178 
179  $form->setValuesByPost();
180  $this->editSettings($form);
181  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
editSettings(?ilPropertyFormGUI $a_form=null)
Edit settings.
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjAwarenessAdministrationGUI::setSubTabs ( string  $a_id)

Definition at line 108 of file class.ilObjAwarenessAdministrationGUI.php.

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

Referenced by editSettings(), and executeCommand().

108  : void
109  {
110  $this->tabs_gui->addSubTab(
111  "settings",
112  $this->lng->txt("settings"),
113  $this->ctrl->getLinkTarget($this, "editSettings")
114  );
115 
116  $this->tabs_gui->addSubTab(
117  "actions",
118  $this->lng->txt("user_actions"),
119  $this->ctrl->getLinkTargetByClass("iluseractionadmingui")
120  );
121 
122  $this->tabs_gui->activateSubTab($a_id);
123  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_manager

ILIAS Awareness AdminManager ilObjAwarenessAdministrationGUI::$admin_manager
protected

Definition at line 27 of file class.ilObjAwarenessAdministrationGUI.php.


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