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)
 
   29        parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   40        if (is_array(self::$ERROR_MESSAGE)) {
 
   44        $lng->loadLanguageModule(
'ps');
 
   71        $rbacsystem = 
$DIC[
'rbacsystem'];
 
   73        $ilAccess = 
$DIC[
'ilAccess'];
 
   75        $next_class = $this->ctrl->getNextClass($this);
 
   76        $cmd = $this->ctrl->getCmd();
 
   80        if (!$ilAccess->checkAccess(
'read', 
'', $this->object->getRefId())) {
 
   81            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
   84        switch ($next_class) {
 
   85            case 'ilpermissiongui':
 
   86                $this->tabs_gui->setTabActive(
'perm_settings');
 
   87                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   89                $ret = &$this->ctrl->forwardCommand($perm_gui);
 
   93                if (!$cmd || $cmd == 
'view') {
 
  113        $rbacsystem = 
$DIC[
'rbacsystem'];
 
  115        if ($rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
 
  116            $this->tabs_gui->addTarget(
 
  118                $this->ctrl->getLinkTarget($this, 
"showPrivacy"),
 
  121            $this->tabs_gui->addTarget(
 
  123                $this->ctrl->getLinkTarget($this, 
"showSecurity"),
 
  128        if ($rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
 
  129            $this->tabs_gui->addTarget(
 
  131                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui', 
"perm"),
 
  147        $this->tabs_gui->setTabActive(
'show_privacy');
 
  149        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  151        $form->setFormAction($this->ctrl->getFormAction($this));
 
  152        $form->setTitle($this->lng->txt(
'ps_privacy_protection'));
 
  154        include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
  160        if ($privacy->enabledCourseExport()) {
 
  161            $value[] = 
"export_course";
 
  163        if ($privacy->enabledGroupExport()) {
 
  164            $value[] = 
"export_group";
 
  166        if ($privacy->courseConfirmationRequired()) {
 
  167            $value[] = 
"export_confirm_course";
 
  169        if ($privacy->groupConfirmationRequired()) {
 
  170            $value[] = 
"export_confirm_group";
 
  172        if ($privacy->enabledGroupAccessTimes()) {
 
  173            $value[] = 
"grp_access_times";
 
  175        if ($privacy->enabledCourseAccessTimes()) {
 
  176            $value[] = 
"crs_access_times";
 
  178        if ($privacy->participantsListInCoursesEnabled()) {
 
  179            $value[] = 
'participants_list_courses';
 
  182        $group->setValue($value);
 
  184        $check->setTitle($this->lng->txt(
'ps_export_course'));
 
  185        $check->setValue(
'export_course');
 
  186        $group->addOption($check);
 
  188        $check->setTitle($this->lng->txt(
'ps_export_groups'));
 
  189        $check->setValue(
'export_group');
 
  190        $group->addOption($check);
 
  192        $check->setTitle($this->lng->txt(
'ps_export_confirm'));
 
  193        $check->setValue(
'export_confirm_course');
 
  194        $group->addOption($check);
 
  196        $check->setTitle($this->lng->txt(
'ps_export_confirm_group'));
 
  197        $check->setValue(
'export_confirm_group');
 
  198        $group->addOption($check);
 
  200        $check->setTitle($this->lng->txt(
'ps_show_grp_access'));
 
  201        $check->setValue(
'grp_access_times');
 
  202        $group->addOption($check);
 
  204        $check->setTitle($this->lng->txt(
'ps_show_crs_access'));
 
  205        $check->setValue(
'crs_access_times');
 
  206        $group->addOption($check);
 
  207        $form->addItem($group);
 
  208        $check = new \ilCheckboxOption();
 
  209        $check->setTitle($this->lng->txt(
'ps_participants_list_courses'));
 
  210        $check->setValue(
'participants_list_courses');
 
  211        $group->addOption($check);
 
  213        include_once 
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
 
  221            $form->addCommandButton(
'save_privacy', $this->lng->txt(
'save'));
 
  223        $this->tpl->setContent(
$form->getHTML());
 
  239        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  243        $this->tabs_gui->setTabActive(
'show_security');
 
  246        $form->setFormAction($this->ctrl->getFormAction($this));
 
  247        $form->setTitle($this->lng->txt(
'ps_security_protection'));
 
  249        include_once 
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
 
  257        $this->tpl->setContent(
$form->getHTML());
 
  271        $ilAccess = 
$DIC[
'ilAccess'];
 
  274        if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  275            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
  278        if ((
int) 
$_POST[
'rbac_log_age'] > 24) {
 
  279            $_POST[
'rbac_log_age'] = 24;
 
  280        } elseif ((
int) 
$_POST[
'rbac_log_age'] < 1) {
 
  281            $_POST[
'rbac_log_age'] = 1;
 
  284        $_POST[
'profile_protection'] = isset(
$_POST[
'profile_protection']) ? 
$_POST[
'profile_protection'] : array();
 
  289        $old_settings = array(
 
  290            'export_course' => $privacy->enabledCourseExport(),
 
  291            'export_group' => $privacy->enabledGroupExport(),
 
  292            'export_confirm_course' => $privacy->courseConfirmationRequired(),
 
  293            'export_confirm_group' => $privacy->groupConfirmationRequired(),
 
  294            'crs_access_times' => $privacy->enabledCourseAccessTimes(),
 
  295            'grp_access_times' => $privacy->enabledGroupAccessTimes(),
 
  296            'participants_list_courses' => $privacy->participantsListInCoursesEnabled()
 
  299        $privacy->enableCourseExport((
int) in_array(
'export_course', 
$_POST[
'profile_protection']));
 
  300        $privacy->enableGroupExport((
int) in_array(
'export_group', 
$_POST[
'profile_protection']));
 
  301        $privacy->setCourseConfirmationRequired((
int) in_array(
'export_confirm_course', 
$_POST[
'profile_protection']));
 
  302        $privacy->setGroupConfirmationRequired((
int) in_array(
'export_confirm_group', 
$_POST[
'profile_protection']));
 
  303        $privacy->showGroupAccessTimes((
int) in_array(
'grp_access_times', 
$_POST[
'profile_protection']));
 
  304        $privacy->showCourseAccessTimes((
int) in_array(
'crs_access_times', 
$_POST[
'profile_protection']));
 
  305        $privacy->enableParticipantsListInCourses((
bool) in_array(
'participants_list_courses', 
$_POST[
'profile_protection']));
 
  308        $code = $privacy->validate();
 
  319            if (!$old_settings[
'export_course'] && $privacy->enabledCourseExport()) {
 
  322            if (!$do_reset && !$old_settings[
'export_group'] && $privacy->enabledGroupExport()) {
 
  325            if (!$do_reset && !$old_settings[
'export_confirm_course'] && $privacy->courseConfirmationRequired()) {
 
  328            if (!$do_reset && !$old_settings[
'export_confirm_group'] && $privacy->groupConfirmationRequired()) {
 
  331            if (!$do_reset && !$old_settings[
'crs_access_times'] && $privacy->enabledCourseAccessTimes()) {
 
  334            if (!$do_reset && !$old_settings[
'grp_access_times'] && $privacy->enabledGroupAccessTimes()) {
 
  338                include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
  341            ilUtil::sendSuccess($this->lng->txt(
'settings_saved'));
 
  358        $ilAccess = 
$DIC[
'ilAccess'];
 
  363        if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  364            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
  403        switch ($a_form_id) {
 
  415                    'ps_profile_export' => array(
null, 
null, $subitems)
 
  417                return array(array(
"showPrivacy", $fields));
 
  429                    'ps_profile_export' => array(
null, 
null, $subitems)
 
  431                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.
if(isset($_POST['submit'])) $form