ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPrivacySettings Class Reference

Singleton class that stores all privacy settings. More...

+ Collaboration diagram for ilPrivacySettings:

Public Member Functions

 _getInstance ()
 Get instance of ilPrivacySettings.
 getPrivacySettingsRefId ()
 enabledExport ()
 enableExport ($a_status)
 enableForaStatistics ($a_status)
 write access to property fora statitics
 enabledForaStatistics ()
 read access to property enable fora statistics
 disableAnonymousFora ($a_status)
 write access to property anonymous fora
 disabledAnonymousFora ()
 read access to property enable anonymous fora
 confirmationRequired ()
 setConfirmationRequired ($a_status)
 showGroupAccessTimes ($a_status)
 Show group last access times.
 enabledGroupAccessTimes ()
 check if group access time are visible
 showCourseAccessTimes ($a_status)
 show course access times
 enabledCourseAccessTimes ()
 check if access time are enabled in courses
 save ()
 Save settings.
 validate ()
 validate settings

Private Member Functions

 __construct ()
 Private constructor: use _getInstance()
 read ()
 read settings

Private Attributes

 $db
 $settings
 $export_course
 $export_confirm
 $fora_statistics
 $anonymous_fora
 $show_grp_access_times
 $show_crs_access_times
 $ref_id

Static Private Attributes

static $instance = null

Detailed Description

Singleton class that stores all privacy settings.

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
$Id$

/

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

Constructor & Destructor Documentation

ilPrivacySettings::__construct ( )
private

Private constructor: use _getInstance()

private

Parameters

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

References $ilDB, $ilSetting, and read().

{
global $ilSetting,$ilDB;
$this->db = $ilDB;
$this->settings = $ilSetting;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilPrivacySettings::confirmationRequired ( )

Definition at line 131 of file class.ilPrivacySettings.php.

References $export_confirm.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::disableAnonymousFora (   $a_status)

write access to property anonymous fora

Parameters
bool$a_statusvalue to set property

Definition at line 117 of file class.ilPrivacySettings.php.

{
$this->anonymous_fora = (bool) $a_status;
}
ilPrivacySettings::disabledAnonymousFora ( )

read access to property enable anonymous fora

Returns
bool true if enabled, false otherwise

Definition at line 126 of file class.ilPrivacySettings.php.

References $anonymous_fora.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enabledCourseAccessTimes ( )

check if access time are enabled in courses

public

Returns

Definition at line 182 of file class.ilPrivacySettings.php.

References $show_crs_access_times.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enabledExport ( )

Definition at line 85 of file class.ilPrivacySettings.php.

References $export_course.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enabledForaStatistics ( )

read access to property enable fora statistics

Returns
bool true if enabled, false otherwise

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

References $fora_statistics.

Referenced by save().

+ Here is the caller graph for this function:

ilPrivacySettings::enabledGroupAccessTimes ( )

check if group access time are visible

public

Definition at line 159 of file class.ilPrivacySettings.php.

References $show_grp_access_times.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enableExport (   $a_status)

Definition at line 89 of file class.ilPrivacySettings.php.

{
$this->export_course = (bool) $a_status;
}
ilPrivacySettings::enableForaStatistics (   $a_status)

write access to property fora statitics

Parameters
bool$a_statusvalue to set property

Definition at line 99 of file class.ilPrivacySettings.php.

{
$this->fora_statistics = (bool) $a_status;
}
ilPrivacySettings::getPrivacySettingsRefId ( )

Definition at line 80 of file class.ilPrivacySettings.php.

References $ref_id.

{
return $this->ref_id;
}
ilPrivacySettings::read ( )
private

read settings

private

Parameters

Definition at line 208 of file class.ilPrivacySettings.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_ASSOC.

Referenced by __construct().

{
global $ilDB;
$query = "SELECT object_reference.ref_id FROM object_reference,tree,object_data ".
"WHERE tree.parent = ".$ilDB->quote(SYSTEM_FOLDER_ID,'integer')." ".
"AND object_data.type = 'ps' ".
"AND object_reference.ref_id = tree.child ".
"AND object_reference.obj_id = object_data.obj_id";
$res = $this->db->query($query);
$this->ref_id = $row["ref_id"];
$this->export_course = (bool) $this->settings->get('ps_export_course',false);
$this->export_confirm = (bool) $this->settings->get('ps_export_confirm',false);
$this->fora_statistics = (bool) $this->settings->get('enable_fora_statistics',false);
$this->anonymous_fora = (bool) $this->settings->get('disable_anonymous_fora',false);
$this->show_grp_access_times = (bool) $this->settings->get('ps_access_times',false);
$this->show_crs_access_times = (bool) $this->settings->get('ps_crs_access_times',false);
}

+ Here is the caller graph for this function:

ilPrivacySettings::save ( )

Save settings.

Definition at line 192 of file class.ilPrivacySettings.php.

References confirmationRequired(), disabledAnonymousFora(), enabledCourseAccessTimes(), enabledExport(), enabledForaStatistics(), and enabledGroupAccessTimes().

{
$this->settings->set('ps_export_confirm',(bool) $this->confirmationRequired());
$this->settings->set('ps_export_course',(bool) $this->enabledExport());
$this->settings->set('enable_fora_statistics',(bool) $this->enabledForaStatistics());
$this->settings->set('disable_anonymous_fora',(bool) $this->disabledAnonymousFora());
$this->settings->set('ps_access_times',(bool) $this->enabledGroupAccessTimes());
$this->settings->set('ps_crs_access_times',(bool) $this->enabledCourseAccessTimes());
}

+ Here is the call graph for this function:

ilPrivacySettings::setConfirmationRequired (   $a_status)

Definition at line 136 of file class.ilPrivacySettings.php.

{
$this->export_confirm = (bool) $a_status;
}
ilPrivacySettings::showCourseAccessTimes (   $a_status)

show course access times

public

Parameters
boolstatus
Returns

Definition at line 171 of file class.ilPrivacySettings.php.

{
$this->show_crs_access_times = $a_status;
}
ilPrivacySettings::showGroupAccessTimes (   $a_status)

Show group last access times.

public

Parameters

Definition at line 148 of file class.ilPrivacySettings.php.

{
$this->show_grp_access_times = $a_status;
}
ilPrivacySettings::validate ( )

validate settings

Returns
0, if everything is ok, an error code otherwise

Definition at line 235 of file class.ilPrivacySettings.php.

{
return 0;
}

Field Documentation

ilPrivacySettings::$anonymous_fora
private

Definition at line 43 of file class.ilPrivacySettings.php.

Referenced by disabledAnonymousFora().

ilPrivacySettings::$db
private

Definition at line 37 of file class.ilPrivacySettings.php.

ilPrivacySettings::$export_confirm
private

Definition at line 41 of file class.ilPrivacySettings.php.

Referenced by confirmationRequired().

ilPrivacySettings::$export_course
private

Definition at line 40 of file class.ilPrivacySettings.php.

Referenced by enabledExport().

ilPrivacySettings::$fora_statistics
private

Definition at line 42 of file class.ilPrivacySettings.php.

Referenced by enabledForaStatistics().

ilPrivacySettings::$instance = null
staticprivate

Definition at line 36 of file class.ilPrivacySettings.php.

Referenced by _getInstance().

ilPrivacySettings::$ref_id
private

Definition at line 46 of file class.ilPrivacySettings.php.

Referenced by getPrivacySettingsRefId().

ilPrivacySettings::$settings
private

Definition at line 38 of file class.ilPrivacySettings.php.

ilPrivacySettings::$show_crs_access_times
private

Definition at line 45 of file class.ilPrivacySettings.php.

Referenced by enabledCourseAccessTimes().

ilPrivacySettings::$show_grp_access_times
private

Definition at line 44 of file class.ilPrivacySettings.php.

Referenced by enabledGroupAccessTimes().


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