ILIAS  Release_4_4_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

 getPrivacySettingsRefId ()
 enabledCourseExport ()
 enabledGroupExport ()
 checkExportAccess ($a_ref_id, $a_user_id=0)
 Check if a user has the permission to access approved user profile fields, course related user data and custom user data.
 enableCourseExport ($a_status)
 enableGroupExport ($a_status)
 enableForaStatistics ($a_status)
 write access to property fora statitics
 enabledForaStatistics ()
 read access to property enable fora statistics
 enableAnonymousFora ($a_status)
 write access to property anonymous fora
 enabledAnonymousFora ()
 read access to property enable anonymous fora
 enableRbacLog ($a_status)
 write access to property rbac_log
 enabledRbacLog ()
 read access to property enable rbac log
 setRbacLogAge ($a_age)
 write access to property rbac log age
 getRbacLogAge ()
 read access to property rbac log age
 confirmationRequired ($a_type)
 courseConfirmationRequired ()
 groupConfirmationRequired ()
 setCourseConfirmationRequired ($a_status)
 setGroupConfirmationRequired ($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
 enabledSahsProtocolData ()
 enableSahsProtocolData ($status)

Static Public Member Functions

static _getInstance ()
 Get instance of ilPrivacySettings.

Private Member Functions

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

Private Attributes

 $db
 $settings
 $export_course
 $export_group
 $export_confirm_course
 $export_confirm_group
 $fora_statistics
 $anonymous_fora
 $rbac_log
 $rbac_log_age
 $show_grp_access_times
 $show_crs_access_times
 $ref_id
 $sahs_protocol_data

Static Private Attributes

static $instance = null

Detailed Description

Singleton class that stores all privacy settings.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
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 60 of file class.ilPrivacySettings.php.

References $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

static ilPrivacySettings::_getInstance ( )
static

Get instance of ilPrivacySettings.

Returns
object ilPrivacySettings public

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

References $instance.

Referenced by ilGroupParticipantsTableGUI\__construct(), ilMemberAgreementGUI\__construct(), ilGroupEditParticipantsTableGUI\__construct(), ilMemberAgreement\__construct(), ilCourseEditParticipantsTableGUI\__construct(), ilRegistrationGUI\__construct(), ilCourseParticipantsTableGUI\__construct(), ilMemberExport\__construct(), ilObjLearningResourcesSettingsGUI\addToExternalSettingsForm(), ilObjPrivacySecurityGUI\addToExternalSettingsForm(), ilObjRoleFolderGUI\addToExternalSettingsForm(), ilObjGroupGUI\checkAgreement(), ilObjCourseGUI\checkAgreement(), ilObjLearningResourcesSettingsGUI\editSettings(), ilMemberExportGUI\executeCommand(), ilObjCourseGUI\fetchPrintMemberData(), ilRbacLog\garbageCollection(), ilTrObjectUsersPropsTableGUI\getItems(), ilTrMatrixTableGUI\getItems(), ilMemberExport\getOrderedExportableFields(), ilLPTableBaseGUI\getSelectableUserColumns(), ilObjSAHSLearningModuleGUI\getTabs(), ilSoapUserAdministration\getUserForRole(), ilObjCourseGUI\infoScreen(), ilObjGroupGUI\infoScreen(), ilGroupParticipantsTableGUI\initAcceptedAgreements(), ilCourseParticipantsTableGUI\initAcceptedAgreements(), ilObjGroupGUI\initAttendanceList(), ilObjCourseGUI\initAttendanceList(), ilObjRoleFolderGUI\initSettingsForm(), ilRbacLog\isActive(), ilObjGroupGUI\readMemberData(), ilObjCourseGUI\readMemberData(), ilObjPrivacySecurityGUI\save_privacy(), ilObjUserFolderGUI\saveGlobalUserSettingsObject(), ilObjLearningResourcesSettingsGUI\saveSettings(), ilObjRoleFolderGUI\saveSettingsObject(), ilObjCourseGUI\setSubTabs(), ilObjGroupGUI\setSubTabs(), ilObjPrivacySecurityGUI\showPrivacy(), ilObjAICCLearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItems(), and ilObjSCORM2004LearningModuleGUI\showTrackingItems().

{
if(is_object(self::$instance))
{
}
return self::$instance = new ilPrivacySettings();
}

+ Here is the caller graph for this function:

ilPrivacySettings::checkExportAccess (   $a_ref_id,
  $a_user_id = 0 
)

Check if a user has the permission to access approved user profile fields, course related user data and custom user data.

Todo:
rename
Parameters
object$a_ref_id
Returns

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

References $ilUser, ilObject\_lookupType(), enabledCourseExport(), enabledGroupExport(), and getPrivacySettingsRefId().

{
global $ilUser,$ilAccess,$rbacsystem;
$user_id = $a_user_id ? $a_user_id : $ilUser->getId();
if(ilObject::_lookupType($a_ref_id, true) == 'crs')
{
return $this->enabledCourseExport() and $ilAccess->checkAccessOfUser($user_id,'write','',$a_ref_id) and $rbacsystem->checkAccessOfUser($user_id,'export_member_data',$this->getPrivacySettingsRefId());
}
else
{
return $this->enabledGroupExport() and $ilAccess->checkAccessOfUser($user_id,'write','',$a_ref_id) and $rbacsystem->checkAccessOfUser($user_id,'export_member_data',$this->getPrivacySettingsRefId());
}
}

+ Here is the call graph for this function:

ilPrivacySettings::confirmationRequired (   $a_type)

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

References courseConfirmationRequired(), and groupConfirmationRequired().

{
switch($a_type)
{
case 'crs':
return $this->courseConfirmationRequired();
case 'grp':
return $this->groupConfirmationRequired();
}
return false;
}

+ Here is the call graph for this function:

ilPrivacySettings::courseConfirmationRequired ( )

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

References $export_confirm_course.

Referenced by confirmationRequired(), and save().

+ Here is the caller graph for this function:

ilPrivacySettings::enableAnonymousFora (   $a_status)

write access to property anonymous fora

Parameters
bool$a_statusvalue to set property

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

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

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

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

read access to property enable anonymous fora

Returns
bool true if enabled, false otherwise

Definition at line 164 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 279 of file class.ilPrivacySettings.php.

References $show_crs_access_times.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enabledCourseExport ( )

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

References $export_course.

Referenced by checkExportAccess(), and 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 146 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 256 of file class.ilPrivacySettings.php.

References $show_grp_access_times.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enabledGroupExport ( )

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

References $export_group.

Referenced by checkExportAccess(), and save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enabledRbacLog ( )

read access to property enable rbac log

Returns
bool true if enabled, false otherwise

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

References $rbac_log.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enabledSahsProtocolData ( )

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

References $sahs_protocol_data.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::enableForaStatistics (   $a_status)

write access to property fora statitics

Parameters
bool$a_statusvalue to set property

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

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

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

{
$this->export_group = (bool) $a_status;
}
ilPrivacySettings::enableRbacLog (   $a_status)

write access to property rbac_log

Parameters
bool$a_statusvalue to set property

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

{
$this->rbac_log = (bool) $a_status;
}
ilPrivacySettings::enableSahsProtocolData (   $status)

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

{
$this->sahs_protocol_data = (int) $status;
}
ilPrivacySettings::getPrivacySettingsRefId ( )

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

References $ref_id.

Referenced by checkExportAccess().

{
return $this->ref_id;
}

+ Here is the caller graph for this function:

ilPrivacySettings::getRbacLogAge ( )

read access to property rbac log age

Returns
int

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

References $rbac_log_age.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilPrivacySettings::groupConfirmationRequired ( )

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

References $export_confirm_group.

Referenced by confirmationRequired(), and save().

+ Here is the caller graph for this function:

ilPrivacySettings::read ( )
private

read settings

private

Parameters

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

References $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_group = (bool) $this->settings->get('ps_export_group',false);
$this->export_confirm_course = (bool) $this->settings->get('ps_export_confirm',false);
$this->export_confirm_group = (bool) $this->settings->get('ps_export_confirm_group',false);
$this->fora_statistics = (bool) $this->settings->get('enable_fora_statistics',false);
$this->anonymous_fora = (bool) $this->settings->get('enable_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);
$this->rbac_log = (bool) $this->settings->get('rbac_log',false);
$this->rbac_log_age = (int) $this->settings->get('rbac_log_age',6);
$this->sahs_protocol_data = (int) $this->settings->get('enable_sahs_pd', 0);
}

+ Here is the caller graph for this function:

ilPrivacySettings::save ( )

Save settings.

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

References courseConfirmationRequired(), enabledAnonymousFora(), enabledCourseAccessTimes(), enabledCourseExport(), enabledForaStatistics(), enabledGroupAccessTimes(), enabledGroupExport(), enabledRbacLog(), enabledSahsProtocolData(), getRbacLogAge(), and groupConfirmationRequired().

{
$this->settings->set('ps_export_confirm',(bool) $this->courseConfirmationRequired());
$this->settings->set('ps_export_confirm_group',(bool) $this->groupConfirmationRequired());
$this->settings->set('ps_export_course',(bool) $this->enabledCourseExport());
$this->settings->set('ps_export_group',(bool) $this->enabledGroupExport());
$this->settings->set('enable_fora_statistics',(bool) $this->enabledForaStatistics());
$this->settings->set('enable_anonymous_fora',(bool) $this->enabledAnonymousFora());
$this->settings->set('ps_access_times',(bool) $this->enabledGroupAccessTimes());
$this->settings->set('ps_crs_access_times',(bool) $this->enabledCourseAccessTimes());
$this->settings->set('rbac_log',(bool) $this->enabledRbacLog());
$this->settings->set('rbac_log_age',(int) $this->getRbacLogAge());
$this->settings->set('enable_sahs_pd',(int) $this->enabledSahsProtocolData());
}

+ Here is the call graph for this function:

ilPrivacySettings::setCourseConfirmationRequired (   $a_status)

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

{
$this->export_confirm_course = (bool) $a_status;
}
ilPrivacySettings::setGroupConfirmationRequired (   $a_status)

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

{
$this->export_confirm_group = (bool) $a_status;
}
ilPrivacySettings::setRbacLogAge (   $a_age)

write access to property rbac log age

Parameters
int$a_agevalue to set property

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

{
$this->rbac_log_age = (int) $a_age;
}
ilPrivacySettings::showCourseAccessTimes (   $a_status)

show course access times

public

Parameters
boolstatus
Returns

Definition at line 268 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 245 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 342 of file class.ilPrivacySettings.php.

{
return 0;
}

Field Documentation

ilPrivacySettings::$anonymous_fora
private

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

Referenced by enabledAnonymousFora().

ilPrivacySettings::$db
private

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

ilPrivacySettings::$export_confirm_course
private

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

Referenced by courseConfirmationRequired().

ilPrivacySettings::$export_confirm_group
private

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

Referenced by groupConfirmationRequired().

ilPrivacySettings::$export_course
private

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

Referenced by enabledCourseExport().

ilPrivacySettings::$export_group
private

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

Referenced by enabledGroupExport().

ilPrivacySettings::$fora_statistics
private

Definition at line 44 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::$rbac_log
private

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

Referenced by enabledRbacLog().

ilPrivacySettings::$rbac_log_age
private

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

Referenced by getRbacLogAge().

ilPrivacySettings::$ref_id
private

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

Referenced by getPrivacySettingsRefId().

ilPrivacySettings::$sahs_protocol_data
private

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

Referenced by enabledSahsProtocolData().

ilPrivacySettings::$settings
private

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

ilPrivacySettings::$show_crs_access_times
private

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

Referenced by enabledCourseAccessTimes().

ilPrivacySettings::$show_grp_access_times
private

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

Referenced by enabledGroupAccessTimes().


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