3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
4 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
5 include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
26 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
29 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
31 self::initErrorMessages();
38 if (is_array(self::$ERROR_MESSAGE)) {
42 $lng->loadLanguageModule(
'ps');
69 $next_class = $this->ctrl->getNextClass($this);
70 $cmd = $this->ctrl->getCmd();
74 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
75 $ilErr->raiseError($this->lng->txt(
'no_permission'), $ilErr->WARNING);
78 switch ($next_class) {
79 case 'ilpermissiongui':
80 $this->tabs_gui->setTabActive(
'perm_settings');
81 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
83 $ret =&$this->ctrl->forwardCommand($perm_gui);
87 if (!$cmd || $cmd ==
'view') {
107 if ($rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
108 $this->tabs_gui->addTarget(
110 $this->ctrl->getLinkTarget($this,
"showPrivacy"),
113 $this->tabs_gui->addTarget(
115 $this->ctrl->getLinkTarget($this,
"showSecurity"),
120 if ($rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
121 $this->tabs_gui->addTarget(
123 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
139 $this->tabs_gui->setTabActive(
'show_privacy');
141 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
143 $form->setFormAction($this->ctrl->getFormAction($this));
144 $form->setTitle($this->lng->txt(
'ps_privacy_protection'));
146 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
152 if ($privacy->enabledCourseExport()) {
153 $value[] =
"export_course";
155 if ($privacy->enabledGroupExport()) {
156 $value[] =
"export_group";
158 if ($privacy->courseConfirmationRequired()) {
159 $value[] =
"export_confirm_course";
161 if ($privacy->groupConfirmationRequired()) {
162 $value[] =
"export_confirm_group";
164 if ($privacy->enabledGroupAccessTimes()) {
165 $value[] =
"grp_access_times";
167 if ($privacy->enabledCourseAccessTimes()) {
168 $value[] =
"crs_access_times";
173 $check->setTitle($this->lng->txt(
'ps_export_course'));
174 $check->setValue(
'export_course');
175 $group->addOption($check);
177 $check->setTitle($this->lng->txt(
'ps_export_groups'));
178 $check->setValue(
'export_group');
179 $group->addOption($check);
181 $check->setTitle($this->lng->txt(
'ps_export_confirm'));
182 $check->setValue(
'export_confirm_course');
183 $group->addOption($check);
185 $check->setTitle($this->lng->txt(
'ps_export_confirm_group'));
186 $check->setValue(
'export_confirm_group');
187 $group->addOption($check);
189 $check->setTitle($this->lng->txt(
'ps_show_grp_access'));
190 $check->setValue(
'grp_access_times');
191 $group->addOption($check);
193 $check->setTitle($this->lng->txt(
'ps_show_crs_access'));
194 $check->setValue(
'crs_access_times');
195 $group->addOption($check);
196 $form->addItem($group);
198 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
206 $form->addCommandButton(
'save_privacy', $this->lng->txt(
'save'));
208 $this->tpl->setContent(
$form->getHTML());
220 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
224 $this->tabs_gui->setTabActive(
'show_security');
227 $form->setFormAction($this->ctrl->getFormAction($this));
228 $form->setTitle($this->lng->txt(
'ps_security_protection'));
230 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
238 $this->tpl->setContent(
$form->getHTML());
251 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
252 $ilErr->raiseError($this->lng->txt(
'no_permission'), $ilErr->WARNING);
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;
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()
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']));
283 $code = $privacy->validate();
294 if (!$old_settings[
'export_course'] && $privacy->enabledCourseExport()) {
297 if (!$do_reset && !$old_settings[
'export_group'] && $privacy->enabledGroupExport()) {
300 if (!$do_reset && !$old_settings[
'export_confirm_course'] && $privacy->courseConfirmationRequired()) {
303 if (!$do_reset && !$old_settings[
'export_confirm_group'] && $privacy->groupConfirmationRequired()) {
306 if (!$do_reset && !$old_settings[
'crs_access_times'] && $privacy->enabledCourseAccessTimes()) {
309 if (!$do_reset && !$old_settings[
'grp_access_times'] && $privacy->enabledGroupAccessTimes()) {
313 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
332 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
333 $ilErr->raiseError($this->lng->txt(
'no_permission'), $ilErr->WARNING);
366 self::initErrorMessages();
372 switch ($a_form_id) {
383 'ps_profile_export' =>
array(null, null, $subitems)
397 'ps_profile_export' =>
array(null, null, $subitems)
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
showSecurity()
Show Privacy settings.
static initErrorMessages()
This class represents an option in a checkbox group.
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH
static getErrorMessage($code)
return error message for error code
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH
static _reset()
Reset all.
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE
save_privacy()
Save privacy settings.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
prepareOutput($a_show_subobjects=true)
prepare output
if(isset($_POST['submit'])) $form
Class ilObjectGUI Basic methods of all Output classes.
save_security()
Save security settings.
static $SECURITY_SETTINGS_ERR_CODE_AUTO_HTTPS
static _hasAgreements()
Check if there is any user agreement.
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.
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
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
executeCommand()
Execute command.
addToExternalSettingsForm($a_form_id)
static _getInstance()
Get instance of ilSecuritySettings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static $SECURITY_SETTINGS_ERR_CODE_HTTP_NOT_AVAILABLE