ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjPrivacySecurityGUI Class Reference
+ Inheritance diagram for ilObjPrivacySecurityGUI:
+ Collaboration diagram for ilObjPrivacySecurityGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 showPrivacy ()
 Show Privacy settings. More...
 
 showSecurity ()
 Show Privacy settings. More...
 
 save_privacy ()
 Save privacy settings. More...
 
 save_security ()
 Save security settings. More...
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static initErrorMessages ()
 
static getErrorMessage ($code)
 return error message for error code More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Static Private Attributes

static $ERROR_MESSAGE
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Definition at line 18 of file class.ilObjPrivacySecurityGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjPrivacySecurityGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Contructor.

public

Definition at line 26 of file class.ilObjPrivacySecurityGUI.php.

27  {
28  $this->type = 'ps';
29  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
30 
31  self::initErrorMessages();
32  }

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjPrivacySecurityGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 370 of file class.ilObjPrivacySecurityGUI.php.

References ilPrivacySettings\_getInstance(), array, ilAdministrationSettingsFormHandler\FORM_COURSE, ilAdministrationSettingsFormHandler\FORM_GROUP, and ilAdministrationSettingsFormHandler\VALUE_BOOL.

371  {
372  switch ($a_form_id) {
374 
375  $privacy = ilPrivacySettings::_getInstance();
376 
377  $subitems = array(
378  'ps_export_course' => array($privacy->enabledCourseExport(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
379  'ps_export_confirm' => array($privacy->courseConfirmationRequired(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
380  'ps_show_crs_access' => array($privacy->enabledCourseAccessTimes(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
381  );
382  $fields = array(
383  'ps_profile_export' => array(null, null, $subitems)
384  );
385  return array(array("showPrivacy", $fields));
386 
388 
389  $privacy = ilPrivacySettings::_getInstance();
390 
391  $subitems = array(
392  'ps_export_groups' => array($privacy->enabledGroupExport(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
393  'ps_export_confirm_group' => array($privacy->groupConfirmationRequired(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
394  'ps_show_grp_access' => array($privacy->enabledGroupAccessTimes(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
395  );
396  $fields = array(
397  'ps_profile_export' => array(null, null, $subitems)
398  );
399  return array(array("showPrivacy", $fields));
400  }
401  }
Create styles array
The data for the language used.
static _getInstance()
Get instance of ilPrivacySettings.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjPrivacySecurityGUI::executeCommand ( )

Execute command.

public

Definition at line 65 of file class.ilObjPrivacySecurityGUI.php.

References ilObjectGUI\$ilErr, ilObjectGUI\$rbacsystem, $ret, and ilObjectGUI\prepareOutput().

66  {
67  global $rbacsystem,$ilErr,$ilAccess;
68 
69  $next_class = $this->ctrl->getNextClass($this);
70  $cmd = $this->ctrl->getCmd();
71 
72  $this->prepareOutput();
73 
74  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
75  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
76  }
77 
78  switch ($next_class) {
79  case 'ilpermissiongui':
80  $this->tabs_gui->setTabActive('perm_settings');
81  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
82  $perm_gui = new ilPermissionGUI($this);
83  $ret =&$this->ctrl->forwardCommand($perm_gui);
84  break;
85 
86  default:
87  if (!$cmd || $cmd == 'view') {
88  $cmd = "showPrivacy";
89  }
90 
91  $this->$cmd();
92  break;
93  }
94  return true;
95  }
prepareOutput($a_show_subobjects=true)
prepare output
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjPrivacySecurityGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 103 of file class.ilObjPrivacySecurityGUI.php.

References ilObjectGUI\$rbacsystem, and array.

104  {
105  global $rbacsystem;
106 
107  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
108  $this->tabs_gui->addTarget(
109  "show_privacy",
110  $this->ctrl->getLinkTarget($this, "showPrivacy"),
111  'showPrivacy'
112  );
113  $this->tabs_gui->addTarget(
114  "show_security",
115  $this->ctrl->getLinkTarget($this, "showSecurity"),
116  'showSecurity'
117  );
118  }
119 
120  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
121  $this->tabs_gui->addTarget(
122  "perm_settings",
123  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
124  array(),
125  'ilpermissiongui'
126  );
127  }
128  }
Create styles array
The data for the language used.

◆ getErrorMessage()

static ilObjPrivacySecurityGUI::getErrorMessage (   $code)
static

return error message for error code

Parameters
int$code
Returns
string

Definition at line 364 of file class.ilObjPrivacySecurityGUI.php.

References $code, and $ERROR_MESSAGE.

Referenced by save_privacy(), and ilSecuritySettings\validate().

365  {
366  self::initErrorMessages();
368  }
$code
Definition: example_050.php:99
+ Here is the caller graph for this function:

◆ initErrorMessages()

static ilObjPrivacySecurityGUI::initErrorMessages ( )
static

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

References $ERROR_MESSAGE, ilObjectGUI\$lng, ilSecuritySettings\$SECURITY_SETTINGS_ERR_CODE_AUTO_HTTPS, ilSecuritySettings\$SECURITY_SETTINGS_ERR_CODE_HTTP_NOT_AVAILABLE, ilSecuritySettings\$SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE, array, ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS, ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE, ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH, ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH, ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_PASSWORD_MAX_LENGTH_LESS_MIN_LENGTH, ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1, ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2, and ilSecuritySettings\SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3.

35  {
36  global $lng;
37 
38  if (is_array(self::$ERROR_MESSAGE)) {
39  return;
40  }
41 
42  $lng->loadLanguageModule('ps');
43 
45  ilSecuritySettings::$SECURITY_SETTINGS_ERR_CODE_AUTO_HTTPS => $lng->txt("ps_error_message_https_header_missing"),
48  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH => $lng->txt('ps_error_message_invalid_password_min_length'),
49  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH => $lng->txt('ps_error_message_invalid_password_max_length'),
50  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE => $lng->txt('ps_error_message_invalid_password_max_age'),
51  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS => $lng->txt('ps_error_message_invalid_login_max_attempts'),
52  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1 => $lng->txt('ps_error_message_password_min1_because_chars'),
53  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2 => $lng->txt('ps_error_message_password_min2_because_chars_numbers'),
54  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3 => $lng->txt('ps_error_message_password_min3_because_chars_numbers_sc'),
55  ilSecuritySettings::SECURITY_SETTINGS_ERR_CODE_PASSWORD_MAX_LENGTH_LESS_MIN_LENGTH => $lng->txt('ps_error_message_password_max_less_min')
56  );
57  }
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE
Create styles array
The data for the language used.
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3
const SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MAX_LENGTH_LESS_MIN_LENGTH
static $SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE
static $SECURITY_SETTINGS_ERR_CODE_HTTP_NOT_AVAILABLE

◆ save_privacy()

ilObjPrivacySecurityGUI::save_privacy ( )

Save privacy settings.

public

Definition at line 247 of file class.ilObjPrivacySecurityGUI.php.

References $_POST, $code, ilObjectGUI\$ilErr, $ilSetting, ilPrivacySettings\_getInstance(), ilMemberAgreement\_reset(), array, getErrorMessage(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and showPrivacy().

248  {
249  global $ilErr,$ilAccess, $ilSetting;
250 
251  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
252  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
253  }
254 
255  if ((int) $_POST['rbac_log_age'] > 24) {
256  $_POST['rbac_log_age'] = 24;
257  } elseif ((int) $_POST['rbac_log_age'] < 1) {
258  $_POST['rbac_log_age'] = 1;
259  }
260 
261  $_POST['profile_protection'] = isset($_POST['profile_protection']) ? $_POST['profile_protection'] : array();
262 
263  $privacy = ilPrivacySettings::_getInstance();
264 
265  // to determine if agreements need to be reset - see below
266  $old_settings = array(
267  'export_course' => $privacy->enabledCourseExport(),
268  'export_group' => $privacy->enabledGroupExport(),
269  'export_confirm_course' => $privacy->courseConfirmationRequired(),
270  'export_confirm_group' => $privacy->groupConfirmationRequired(),
271  'crs_access_times' => $privacy->enabledCourseAccessTimes(),
272  'grp_access_times' => $privacy->enabledGroupAccessTimes()
273  );
274 
275  $privacy->enableCourseExport((int) in_array('export_course', $_POST['profile_protection']));
276  $privacy->enableGroupExport((int) in_array('export_group', $_POST['profile_protection']));
277  $privacy->setCourseConfirmationRequired((int) in_array('export_confirm_course', $_POST['profile_protection']));
278  $privacy->setGroupConfirmationRequired((int) in_array('export_confirm_group', $_POST['profile_protection']));
279  $privacy->showGroupAccessTimes((int) in_array('grp_access_times', $_POST['profile_protection']));
280  $privacy->showCourseAccessTimes((int) in_array('crs_access_times', $_POST['profile_protection']));
281 
282  // validate settings
283  $code = $privacy->validate();
284 
285  // if error code != 0, display error and do not save
286  if ($code != 0) {
287  $msg = $this->getErrorMessage($code);
288  ilUtil::sendFailure($msg);
289  } else {
290  $privacy->save();
291 
292  // reset agreements?
293  $do_reset = false;
294  if (!$old_settings['export_course'] && $privacy->enabledCourseExport()) {
295  $do_reset = true;
296  }
297  if (!$do_reset && !$old_settings['export_group'] && $privacy->enabledGroupExport()) {
298  $do_reset = true;
299  }
300  if (!$do_reset && !$old_settings['export_confirm_course'] && $privacy->courseConfirmationRequired()) {
301  $do_reset = true;
302  }
303  if (!$do_reset && !$old_settings['export_confirm_group'] && $privacy->groupConfirmationRequired()) {
304  $do_reset = true;
305  }
306  if (!$do_reset && !$old_settings['crs_access_times'] && $privacy->enabledCourseAccessTimes()) {
307  $do_reset = true;
308  }
309  if (!$do_reset && !$old_settings['grp_access_times'] && $privacy->enabledGroupAccessTimes()) {
310  $do_reset = true;
311  }
312  if ($do_reset) {
313  include_once('Services/Membership/classes/class.ilMemberAgreement.php');
315  }
316  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
317  }
318 
319  $this->showPrivacy();
320  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getErrorMessage($code)
return error message for error code
$code
Definition: example_050.php:99
static _reset()
Reset all.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
showPrivacy()
Show Privacy settings.
global $ilSetting
Definition: privfeed.php:17
static _getInstance()
Get instance of ilPrivacySettings.
$_POST["username"]
+ Here is the call graph for this function:

◆ save_security()

ilObjPrivacySecurityGUI::save_security ( )

Save security settings.

public

Definition at line 328 of file class.ilObjPrivacySecurityGUI.php.

References ilObjectGUI\$ilErr, $ilSetting, $ilUser, ilObjectGUI\$rbacreview, and showSecurity().

329  {
330  global $ilErr,$ilAccess, $ilSetting, $rbacreview, $ilUser;
331 
332  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
333  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
334  }
335 
336  /*
337  $security = ilSecuritySettings::_getInstance();
338 
339  $code = $security->validate();
340 
341  // if error code != 0, display error and do not save
342  if ($code != 0)
343  {
344  $msg = $this->getErrorMessage ($code);
345  ilUtil::sendFailure($msg);
346  } else
347  {
348  $security->save();
349  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
350  }
351  */
352 
353  $this->showSecurity();
354  }
showSecurity()
Show Privacy settings.
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ showPrivacy()

ilObjPrivacySecurityGUI::showPrivacy ( )

Show Privacy settings.

public

Definition at line 135 of file class.ilObjPrivacySecurityGUI.php.

References $form, ilPrivacySettings\_getInstance(), ilMemberAgreement\_hasAgreements(), ilAdministrationSettingsFormHandler\addFieldsToForm(), array, ilObjectGUI\checkPermissionBool(), ilAdministrationSettingsFormHandler\FORM_PRIVACY, ilUtil\sendInfo(), and ilCheckboxGroupInputGUI\setValue().

Referenced by save_privacy().

136  {
137  $privacy = ilPrivacySettings::_getInstance();
138 
139  $this->tabs_gui->setTabActive('show_privacy');
140 
141  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
142  $form = new ilPropertyFormGUI();
143  $form->setFormAction($this->ctrl->getFormAction($this));
144  $form->setTitle($this->lng->txt('ps_privacy_protection'));
145 
146  include_once('Services/Membership/classes/class.ilMemberAgreement.php');
148  ilUtil::sendInfo($this->lng->txt('ps_warning_modify'));
149  }
150 
151  $value = array();
152  if ($privacy->enabledCourseExport()) {
153  $value[] = "export_course";
154  }
155  if ($privacy->enabledGroupExport()) {
156  $value[] = "export_group";
157  }
158  if ($privacy->courseConfirmationRequired()) {
159  $value[] = "export_confirm_course";
160  }
161  if ($privacy->groupConfirmationRequired()) {
162  $value[] = "export_confirm_group";
163  }
164  if ($privacy->enabledGroupAccessTimes()) {
165  $value[] = "grp_access_times";
166  }
167  if ($privacy->enabledCourseAccessTimes()) {
168  $value[] = "crs_access_times";
169  }
170  $group = new ilCheckboxGroupInputGUI($this->lng->txt('ps_profile_export'), 'profile_protection');
171  $group->setValue($value);
172  $check = new ilCheckboxOption();
173  $check->setTitle($this->lng->txt('ps_export_course'));
174  $check->setValue('export_course');
175  $group->addOption($check);
176  $check = new ilCheckboxOption();
177  $check->setTitle($this->lng->txt('ps_export_groups'));
178  $check->setValue('export_group');
179  $group->addOption($check);
180  $check = new ilCheckboxOption();
181  $check->setTitle($this->lng->txt('ps_export_confirm'));
182  $check->setValue('export_confirm_course');
183  $group->addOption($check);
184  $check = new ilCheckboxOption();
185  $check->setTitle($this->lng->txt('ps_export_confirm_group'));
186  $check->setValue('export_confirm_group');
187  $group->addOption($check);
188  $check = new ilCheckboxOption();
189  $check->setTitle($this->lng->txt('ps_show_grp_access'));
190  $check->setValue('grp_access_times');
191  $group->addOption($check);
192  $check = new ilCheckboxOption();
193  $check->setTitle($this->lng->txt('ps_show_crs_access'));
194  $check->setValue('crs_access_times');
195  $group->addOption($check);
196  $form->addItem($group);
197 
198  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
201  $form,
202  $this
203  );
204 
205  if ($this->checkPermissionBool("write")) {
206  $form->addCommandButton('save_privacy', $this->lng->txt('save'));
207  }
208  $this->tpl->setContent($form->getHTML());
209  }
This class represents an option in a checkbox group.
This class represents a property form user interface.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_POST['submit'])) $form
This class represents a property in a property form.
static _hasAgreements()
Check if there is any user agreement.
Create styles array
The data for the language used.
static _getInstance()
Get instance of ilPrivacySettings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSecurity()

ilObjPrivacySecurityGUI::showSecurity ( )

Show Privacy settings.

public

Definition at line 216 of file class.ilObjPrivacySecurityGUI.php.

References $form, $ilSetting, $ilUser, ilObjectGUI\$rbacreview, ilSecuritySettings\_getInstance(), ilAdministrationSettingsFormHandler\addFieldsToForm(), and ilAdministrationSettingsFormHandler\FORM_SECURITY.

Referenced by save_security().

217  {
218  global $ilSetting, $ilUser, $rbacreview;
219 
220  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
221 
222  $security = ilSecuritySettings::_getInstance();
223 
224  $this->tabs_gui->setTabActive('show_security');
225 
226  $form = new ilPropertyFormGUI();
227  $form->setFormAction($this->ctrl->getFormAction($this));
228  $form->setTitle($this->lng->txt('ps_security_protection'));
229 
230  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
233  $form,
234  $this
235  );
236 
237  // $form->addCommandButton('save_security',$this->lng->txt('save'));
238  $this->tpl->setContent($form->getHTML());
239  }
This class represents a property form user interface.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
if(isset($_POST['submit'])) $form
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ERROR_MESSAGE

ilObjPrivacySecurityGUI::$ERROR_MESSAGE
staticprivate

Definition at line 20 of file class.ilObjPrivacySecurityGUI.php.

Referenced by getErrorMessage(), and initErrorMessages().


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