3include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
    4include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
    5include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
   26    public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   40        if (is_array(self::$ERROR_MESSAGE)) {
 
   44        $lng->loadLanguageModule(
'ps');
 
   71        $next_class = $this->ctrl->getNextClass($this);
 
   72        $cmd = $this->ctrl->getCmd();
 
   76        if (!$DIC->rbac()->system()->checkAccess(
'visible,read', $this->object->getRefId())) {
 
   77            $DIC[
'ilErr']->raiseError($this->lng->txt(
'no_permission'), 
$DIC[
'ilErr']->WARNING);
 
   80        switch ($next_class) {
 
   81            case 'ilpermissiongui':
 
   82                $this->tabs_gui->setTabActive(
'perm_settings');
 
   83                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   85                $ret = &$this->ctrl->forwardCommand($perm_gui);
 
   89                if (!$cmd || $cmd == 
'view') {
 
  111        if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
 
  112            $this->tabs_gui->addTarget(
 
  114                $this->ctrl->getLinkTarget($this, 
"showPrivacy"),
 
  117            $this->tabs_gui->addTarget(
 
  119                $this->ctrl->getLinkTarget($this, 
"showSecurity"),
 
  124        if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
 
  125            $this->tabs_gui->addTarget(
 
  127                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui', 
"perm"),
 
  143        $this->tabs_gui->setTabActive(
'show_privacy');
 
  145        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  147        $form->setFormAction($this->ctrl->getFormAction($this));
 
  148        $form->setTitle($this->lng->txt(
'ps_privacy_protection'));
 
  150        include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
  156        if ($privacy->enabledCourseExport()) {
 
  157            $value[] = 
"export_course";
 
  159        if ($privacy->enabledGroupExport()) {
 
  160            $value[] = 
"export_group";
 
  162        if ($privacy->courseConfirmationRequired()) {
 
  163            $value[] = 
"export_confirm_course";
 
  165        if ($privacy->groupConfirmationRequired()) {
 
  166            $value[] = 
"export_confirm_group";
 
  168        if ($privacy->enabledGroupAccessTimes()) {
 
  169            $value[] = 
"grp_access_times";
 
  171        if ($privacy->enabledCourseAccessTimes()) {
 
  172            $value[] = 
"crs_access_times";
 
  174        if ($privacy->participantsListInCoursesEnabled()) {
 
  175            $value[] = 
'participants_list_courses';
 
  178        $group->setValue($value);
 
  180        $check->setTitle($this->lng->txt(
'ps_export_course'));
 
  181        $check->setValue(
'export_course');
 
  182        $group->addOption($check);
 
  184        $check->setTitle($this->lng->txt(
'ps_export_groups'));
 
  185        $check->setValue(
'export_group');
 
  186        $group->addOption($check);
 
  188        $check->setTitle($this->lng->txt(
'ps_export_confirm'));
 
  189        $check->setValue(
'export_confirm_course');
 
  190        $group->addOption($check);
 
  192        $check->setTitle($this->lng->txt(
'ps_export_confirm_group'));
 
  193        $check->setValue(
'export_confirm_group');
 
  194        $group->addOption($check);
 
  196        $check->setTitle($this->lng->txt(
'ps_show_grp_access'));
 
  197        $check->setValue(
'grp_access_times');
 
  198        $group->addOption($check);
 
  200        $check->setTitle($this->lng->txt(
'ps_show_crs_access'));
 
  201        $check->setValue(
'crs_access_times');
 
  202        $group->addOption($check);
 
  203        $form->addItem($group);
 
  204        $check = new \ilCheckboxOption();
 
  205        $check->setTitle($this->lng->txt(
'ps_participants_list_courses'));
 
  206        $check->setValue(
'participants_list_courses');
 
  207        $group->addOption($check);
 
  209        include_once 
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
 
  217            $form->addCommandButton(
'save_privacy', $this->lng->txt(
'save'));
 
  219        $this->tpl->setContent($form->getHTML());
 
  235        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  239        $this->tabs_gui->setTabActive(
'show_security');
 
  242        $form->setFormAction($this->ctrl->getFormAction($this));
 
  243        $form->setTitle($this->lng->txt(
'ps_security_protection'));
 
  245        include_once 
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
 
  253        $this->tpl->setContent($form->getHTML());
 
  267        $ilAccess = 
$DIC[
'ilAccess'];
 
  270        if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  271            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
  274        if ((
int) 
$_POST[
'rbac_log_age'] > 24) {
 
  275            $_POST[
'rbac_log_age'] = 24;
 
  276        } elseif ((
int) 
$_POST[
'rbac_log_age'] < 1) {
 
  277            $_POST[
'rbac_log_age'] = 1;
 
  280        $_POST[
'profile_protection'] = isset(
$_POST[
'profile_protection']) ? 
$_POST[
'profile_protection'] : array();
 
  285        $old_settings = array(
 
  286            'export_course' => $privacy->enabledCourseExport(),
 
  287            'export_group' => $privacy->enabledGroupExport(),
 
  288            'export_confirm_course' => $privacy->courseConfirmationRequired(),
 
  289            'export_confirm_group' => $privacy->groupConfirmationRequired(),
 
  290            'crs_access_times' => $privacy->enabledCourseAccessTimes(),
 
  291            'grp_access_times' => $privacy->enabledGroupAccessTimes(),
 
  292            'participants_list_courses' => $privacy->participantsListInCoursesEnabled()
 
  295        $privacy->enableCourseExport((
int) in_array(
'export_course', 
$_POST[
'profile_protection']));
 
  296        $privacy->enableGroupExport((
int) in_array(
'export_group', 
$_POST[
'profile_protection']));
 
  297        $privacy->setCourseConfirmationRequired((
int) in_array(
'export_confirm_course', 
$_POST[
'profile_protection']));
 
  298        $privacy->setGroupConfirmationRequired((
int) in_array(
'export_confirm_group', 
$_POST[
'profile_protection']));
 
  299        $privacy->showGroupAccessTimes((
int) in_array(
'grp_access_times', 
$_POST[
'profile_protection']));
 
  300        $privacy->showCourseAccessTimes((
int) in_array(
'crs_access_times', 
$_POST[
'profile_protection']));
 
  301        $privacy->enableParticipantsListInCourses((
bool) in_array(
'participants_list_courses', 
$_POST[
'profile_protection']));
 
  304        $code = $privacy->validate();
 
  315            if (!$old_settings[
'export_course'] && $privacy->enabledCourseExport()) {
 
  318            if (!$do_reset && !$old_settings[
'export_group'] && $privacy->enabledGroupExport()) {
 
  321            if (!$do_reset && !$old_settings[
'export_confirm_course'] && $privacy->courseConfirmationRequired()) {
 
  324            if (!$do_reset && !$old_settings[
'export_confirm_group'] && $privacy->groupConfirmationRequired()) {
 
  327            if (!$do_reset && !$old_settings[
'crs_access_times'] && $privacy->enabledCourseAccessTimes()) {
 
  330            if (!$do_reset && !$old_settings[
'grp_access_times'] && $privacy->enabledGroupAccessTimes()) {
 
  334                include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
  337            ilUtil::sendSuccess($this->lng->txt(
'settings_saved'));
 
  354        $ilAccess = 
$DIC[
'ilAccess'];
 
  359        if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  360            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
  399        switch ($a_form_id) {
 
  411                    'ps_profile_export' => array(
null, 
null, $subitems)
 
  413                return array(array(
"showPrivacy", $fields));
 
  425                    'ps_profile_export' => array(
null, 
null, $subitems)
 
  427                return array(array(
"showPrivacy", $fields));
 
An exception for terminatinating execution or to throw for unit testing.
This class represents an option in a checkbox group.
static _hasAgreements()
Check if there is any user agreement.
static _reset()
Reset all.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
save_security()
Save security settings.
addToExternalSettingsForm($a_form_id)
static initErrorMessages()
executeCommand()
Execute command.
showSecurity()
Show Privacy settings.
save_privacy()
Save privacy settings.
showPrivacy()
Show Privacy settings.
static getErrorMessage($code)
return error message for error code
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN2
const SECURITY_SETTINGS_ERR_CODE_INVALID_LOGIN_MAX_ATTEMPTS
static $SECURITY_SETTINGS_ERR_CODE_AUTO_HTTPS
static $SECURITY_SETTINGS_ERR_CODE_HTTP_NOT_AVAILABLE
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_LENGTH
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN3
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MAX_AGE
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MAX_LENGTH_LESS_MIN_LENGTH
const SECURITY_SETTINGS_ERR_CODE_PASSWORD_MIN_LENGTH_MIN1
const SECURITY_SETTINGS_ERR_CODE_INVALID_PASSWORD_MIN_LENGTH
static $SECURITY_SETTINGS_ERR_CODE_HTTPS_NOT_AVAILABLE
static _getInstance()
Get instance of ilSecuritySettings.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc