ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilForumProperties Class Reference
+ Collaboration diagram for ilForumProperties:

Public Member Functions

 insert ()
 update ()
 copy ($a_new_obj_id)
 setDefaultView ($a_default_view)
 getDefaultView ()
 setStatisticsStatus ($a_statistic_status)
 isStatisticEnabled ()
 setAnonymisation ($a_anonymized)
 isAnonymized ()
 setPostActivation ($a_post_activation)
 isPostActivationEnabled ()
 setObjId ($a_obj_id=0)
 getObjId ()
 setAdminForceNoti ($a_admin_force)
 isAdminForceNoti ()
 setUserToggleNoti ($a_user_toggle)
 isUserToggleNoti ()
 isThreadRatingAllowed ($a_allow_rating=null)
 setPresetSubject ($a_preset_subject)
 getPresetSubject ()
 setAddReSubject ($a_add_re_subject)
 getAddReSubject ()
 setNotificationType ($a_notification_type)
 getNotificationType ()
 getSubjectSetting ()
 setSubjectSetting ($a_subject_setting)
 setMarkModeratorPosts ($a_mod_post)
 getMarkModeratorPosts ()
 setThreadSorting ($a_thread_sorting)
 getThreadSorting ()
 getUserToggleNoti ()
 getAdminForceNoti ()

Static Public Member Functions

static getInstance ($a_obj_id=0)
static _isAnonymized ($a_obj_id)
static _isAdminForceNoti ($a_obj_id)
static _isUserToggleNoti ($a_obj_id)

Data Fields

const VIEW_TREE = 1
const VIEW_DATE = 2
const VIEW_DATE_ASC = 2
const VIEW_DATE_DESC = 3
const FORUM_OVERVIEW_WITH_NEW_POSTS = 0
const FORUM_OVERVIEW_NO_NEW_POSTS = 1

Protected Member Functions

 __construct ($a_obj_id=0)

Private Member Functions

 __clone ()
 read ()

Private Attributes

 $obj_id
 Object id of current forum private.
 $default_view = self::VIEW_TREE
 Default view ( 1 => 'order by answers', 2 => 'order by date ascending', 3 => 'order by date descending') private.
 $anonymized = 0
 Defines if a forum is anonymized or not private.
 $statistics_enabled = 0
 Defines if a forum can show ranking statistics private.
 $post_activation_enabled = 0
 Activation of new posts private.
 $notification_type = null
 Global notification-type setting (CRS/GRP) possible values: 'all_users', 'per_user', null (default)
 $admin_force_noti = false
 Activation of (CRS/GRP) forum notification by mod/admin private.
 $user_toggle_noti = false
 Activation of allowing members to deactivate (CRS/GRP)forum notification private.
 $thread_ratings_allowed = false
 $preset_subject = 1
 Preset subject on reply.
 $add_re_subject = 0
 Add 'Re: ' to subject on reply.
 $mark_mod_posts = 0
 $thread_sorting = 0
 sorting type for threads 0 = default 1 = manual
 $db = null
 DB Object private.

Static Private Attributes

static $instances = array()

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
Id:

Definition at line 10 of file class.ilForumProperties.php.

Constructor & Destructor Documentation

ilForumProperties::__construct (   $a_obj_id = 0)
protected

Definition at line 115 of file class.ilForumProperties.php.

References read().

{
global $ilDB;
$this->db = $ilDB;
$this->obj_id = $a_obj_id;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilForumProperties::__clone ( )
private

Definition at line 124 of file class.ilForumProperties.php.

{
}
static ilForumProperties::_isAdminForceNoti (   $a_obj_id)
static

Definition at line 325 of file class.ilForumProperties.php.

References $res.

Referenced by ilForumNotification\checkForumsExistsInsert().

{
global $ilDB;
$res = $ilDB->queryF("SELECT admin_force_noti FROM frm_settings WHERE obj_id = %s",
array('integer'),
array($a_obj_id));
while($record = $ilDB->fetchAssoc($res))
{
return $record['admin_force_noti'];
}
return 0;
}

+ Here is the caller graph for this function:

static ilForumProperties::_isAnonymized (   $a_obj_id)
static

Definition at line 272 of file class.ilForumProperties.php.

References $result.

Referenced by ilPDNewsTableGUI\fillRow().

{
global $ilDB;
$result = $ilDB->queryf("SELECT anonymized FROM frm_settings WHERE obj_id = %s",
array('integer'),array($a_obj_id));
while($record = $ilDB->fetchAssoc($result))
{
return $record['anonymized'];
}
return 0;
}

+ Here is the caller graph for this function:

static ilForumProperties::_isUserToggleNoti (   $a_obj_id)
static

Definition at line 340 of file class.ilForumProperties.php.

References $res.

Referenced by ilForumNotification\checkForumsExistsInsert().

{
global $ilDB;
$res = $ilDB->queryF("SELECT user_toggle_noti FROM frm_settings WHERE obj_id = %s",
array('integer'),
array($a_obj_id));
while($record = $ilDB->fetchAssoc($res))
{
return $record['user_toggle_noti'];
}
return 0;
}

+ Here is the caller graph for this function:

ilForumProperties::copy (   $a_new_obj_id)

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

{
if ($a_new_obj_id)
{
$this->db->insert('frm_settings',
array( 'obj_id' => array('integer', $a_new_obj_id),
'default_view' => array('integer', $this->default_view),
'anonymized' => array('integer', $this->anonymized),
'statistics_enabled'=> array('integer', $this->statistics_enabled),
'post_activation' => array('integer', $this->post_activation_enabled),
'admin_force_noti' => array('integer', $this->admin_force_noti),
'user_toggle_noti' => array('integer', $this->user_toggle_noti),
'preset_subject' => array('integer', $this->preset_subject),
'add_re_subject' => array('integer', $this->add_re_subject),
'notification_type' => array('text', $this->notification_type),
'mark_mod_posts' => array('integer', $this->mark_mod_posts),
'thread_sorting' => array('integer', $this->thread_sorting)
)
);
return true;
}
return false;
}
ilForumProperties::getAddReSubject ( )

Definition at line 378 of file class.ilForumProperties.php.

References $add_re_subject.

Referenced by getSubjectSetting().

{
}

+ Here is the caller graph for this function:

ilForumProperties::getAdminForceNoti ( )
Returns
mixed

Definition at line 461 of file class.ilForumProperties.php.

References $admin_force_noti.

ilForumProperties::getDefaultView ( )

Definition at line 252 of file class.ilForumProperties.php.

References $default_view.

{
}
static ilForumProperties::getInstance (   $a_obj_id = 0)
static

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

Referenced by ilForumModeratorsGUI\addModerator(), ilForumModeratorsGUI\detachModeratorRole(), and ilForumXMLParser\handlerEndTag().

{
if (!self::$instances[$a_obj_id])
{
self::$instances[$a_obj_id] = new ilForumProperties($a_obj_id);
}
return self::$instances[$a_obj_id];
}

+ Here is the caller graph for this function:

ilForumProperties::getMarkModeratorPosts ( )

Definition at line 436 of file class.ilForumProperties.php.

References $mark_mod_posts.

{
}
ilForumProperties::getNotificationType ( )

Definition at line 390 of file class.ilForumProperties.php.

References $notification_type.

ilForumProperties::getObjId ( )

Definition at line 300 of file class.ilForumProperties.php.

References $obj_id.

{
return $this->obj_id;
}
ilForumProperties::getPresetSubject ( )

Definition at line 370 of file class.ilForumProperties.php.

References $preset_subject.

Referenced by getSubjectSetting().

{
}

+ Here is the caller graph for this function:

ilForumProperties::getSubjectSetting ( )

Definition at line 395 of file class.ilForumProperties.php.

References getAddReSubject(), and getPresetSubject().

{
if($this->getPresetSubject() == 0
&& $this->getAddReSubject() == 0)
{
return "empty_subject";
}
else if($this->getPresetSubject() == 1)
{
return "preset_subject";
}
else if($this->getAddReSubject() == 1)
{
return "add_re_to_subject";
}
else return "preset_subject";
}

+ Here is the call graph for this function:

ilForumProperties::getThreadSorting ( )

Definition at line 445 of file class.ilForumProperties.php.

References $thread_sorting.

{
}
ilForumProperties::getUserToggleNoti ( )
Returns
mixed

Definition at line 453 of file class.ilForumProperties.php.

References $user_toggle_noti.

ilForumProperties::insert ( )

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

{
if ($this->obj_id)
{
$this->db->insert('frm_settings',
array( 'obj_id' => array('integer', $this->obj_id),
'default_view' => array('integer', $this->default_view),
'anonymized' => array('integer', $this->anonymized),
'statistics_enabled'=> array('integer', $this->statistics_enabled),
'post_activation' => array('integer', $this->post_activation_enabled),
'admin_force_noti' => array('integer', $this->admin_force_noti),
'user_toggle_noti' => array('integer', $this->user_toggle_noti),
'preset_subject' => array('integer', $this->preset_subject),
'add_re_subject' => array('integer', $this->add_re_subject),
'notification_type' => array('text', $this->notification_type),
'mark_mod_posts' => array('integer', $this->mark_mod_posts),
'thread_sorting' => array('integer', $this->thread_sorting)
)
);
return true;
}
return false;
}
ilForumProperties::isAdminForceNoti ( )

Definition at line 310 of file class.ilForumProperties.php.

References $admin_force_noti.

ilForumProperties::isAnonymized ( )

Definition at line 268 of file class.ilForumProperties.php.

References $anonymized.

{
}
ilForumProperties::isPostActivationEnabled ( )

Definition at line 291 of file class.ilForumProperties.php.

References $post_activation_enabled.

ilForumProperties::isStatisticEnabled ( )

Definition at line 260 of file class.ilForumProperties.php.

References $statistics_enabled.

ilForumProperties::isThreadRatingAllowed (   $a_allow_rating = null)

Definition at line 354 of file class.ilForumProperties.php.

References $thread_ratings_allowed.

{
if(null === $a_allow_rating)
{
}
$this->thread_ratings_allowed = $a_allow_rating;
return $this;
}
ilForumProperties::isUserToggleNoti ( )

Definition at line 320 of file class.ilForumProperties.php.

References $user_toggle_noti.

ilForumProperties::read ( )
private

Definition at line 138 of file class.ilForumProperties.php.

References $res, and $row.

Referenced by __construct(), and setObjId().

{
if ($this->obj_id)
{
$res = $this->db->queryf('
SELECT * FROM frm_settings
WHERE obj_id = %s',
array('integer'), array($this->obj_id));
$row = $this->db->fetchObject($res);
if (is_object($row))
{
$this->default_view = $row->default_view;
$this->anonymized = $row->anonymized ;// == 1 ? true : false;
$this->statistics_enabled = $row->statistics_enabled ;// == 1 ? true : false;
$this->post_activation_enabled = $row->post_activation ;// == 1 ? true : false;
$this->admin_force_noti = $row->admin_force_noti == 1 ? true : false;
$this->user_toggle_noti = $row->user_toggle_noti == 1 ? true : false;
$this->preset_subject = $row->preset_subject;
$this->add_re_subject = $row->add_re_subject;
$this->notification_type = $row->notification_type == null ? 'default': $row->notification_type;
$this->mark_mod_posts = $row->mark_mod_posts == 1 ? true : false;
$this->thread_sorting = $row->thread_sorting == 1? true : false;
return true;
}
return false;
}
return false;
}

+ Here is the caller graph for this function:

ilForumProperties::setAddReSubject (   $a_add_re_subject)

Definition at line 374 of file class.ilForumProperties.php.

Referenced by setSubjectSetting().

{
$this->add_re_subject = $a_add_re_subject;
}

+ Here is the caller graph for this function:

ilForumProperties::setAdminForceNoti (   $a_admin_force)

Definition at line 305 of file class.ilForumProperties.php.

{
$this->admin_force_noti = $a_admin_force;
}
ilForumProperties::setAnonymisation (   $a_anonymized)

Definition at line 264 of file class.ilForumProperties.php.

{
$this->anonymized = $a_anonymized;
}
ilForumProperties::setDefaultView (   $a_default_view)

Definition at line 248 of file class.ilForumProperties.php.

{
$this->default_view = $a_default_view;
}
ilForumProperties::setMarkModeratorPosts (   $a_mod_post)

Definition at line 431 of file class.ilForumProperties.php.

{
$this->mark_mod_posts = $a_mod_post;
}
ilForumProperties::setNotificationType (   $a_notification_type)

Definition at line 383 of file class.ilForumProperties.php.

{
if($a_notification_type == null)
$this->notification_type = 'default';
else
$this->notification_type = $a_notification_type;
}
ilForumProperties::setObjId (   $a_obj_id = 0)

Definition at line 295 of file class.ilForumProperties.php.

References read().

{
$this->obj_id = $a_obj_id;
$this->read();
}

+ Here is the call graph for this function:

ilForumProperties::setPostActivation (   $a_post_activation)

Definition at line 287 of file class.ilForumProperties.php.

{
$this->post_activation_enabled = $a_post_activation;
}
ilForumProperties::setPresetSubject (   $a_preset_subject)

Definition at line 366 of file class.ilForumProperties.php.

Referenced by setSubjectSetting().

{
$this->preset_subject = $a_preset_subject;
}

+ Here is the caller graph for this function:

ilForumProperties::setStatisticsStatus (   $a_statistic_status)

Definition at line 256 of file class.ilForumProperties.php.

{
$this->statistics_enabled = $a_statistic_status;
}
ilForumProperties::setSubjectSetting (   $a_subject_setting)

Definition at line 412 of file class.ilForumProperties.php.

References setAddReSubject(), and setPresetSubject().

{
if($a_subject_setting == 'empty_subject')
{
$this->setPresetSubject(0);
$this->setAddReSubject(0);
}
else if($a_subject_setting == 'preset_subject')
{
$this->setPresetSubject(1);
$this->setAddReSubject(0);
}
else if($a_subject_setting == 'add_re_to_subject')
{
$this->setPresetSubject(0);
$this->setAddReSubject(1);
}
}

+ Here is the call graph for this function:

ilForumProperties::setThreadSorting (   $a_thread_sorting)

Definition at line 441 of file class.ilForumProperties.php.

{
$this->thread_sorting = $a_thread_sorting;
}
ilForumProperties::setUserToggleNoti (   $a_user_toggle)

Definition at line 315 of file class.ilForumProperties.php.

{
$this->user_toggle_noti = $a_user_toggle;
}
ilForumProperties::update ( )

Definition at line 199 of file class.ilForumProperties.php.

{
if ($this->obj_id)
{
$this->db->update('frm_settings',
array( 'default_view' => array('integer', $this->default_view),
'anonymized' => array('integer', $this->anonymized),
'statistics_enabled'=> array('integer', $this->statistics_enabled),
'post_activation' => array('integer', $this->post_activation_enabled),
'admin_force_noti' => array('integer', $this->admin_force_noti),
'user_toggle_noti' => array('integer', $this->user_toggle_noti),
'preset_subject' => array('integer', $this->preset_subject),
'add_re_subject' => array('integer', $this->add_re_subject),
'notification_type' => array('text', $this->notification_type),
'mark_mod_posts' => array('integer', $this->mark_mod_posts),
'thread_sorting' => array('integer', $this->thread_sorting)
),
array( 'obj_id' => array('integer', $this->obj_id))
);
return true;
}
return false;
}

Field Documentation

ilForumProperties::$add_re_subject = 0
private

Add 'Re: ' to subject on reply.

private

Definition at line 94 of file class.ilForumProperties.php.

Referenced by getAddReSubject().

ilForumProperties::$admin_force_noti = false
private

Activation of (CRS/GRP) forum notification by mod/admin private.

Definition at line 64 of file class.ilForumProperties.php.

Referenced by getAdminForceNoti(), and isAdminForceNoti().

ilForumProperties::$anonymized = 0
private

Defines if a forum is anonymized or not private.

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

Referenced by isAnonymized().

ilForumProperties::$db = null
private

DB Object private.

Definition at line 111 of file class.ilForumProperties.php.

ilForumProperties::$default_view = self::VIEW_TREE
private

Default view ( 1 => 'order by answers', 2 => 'order by date ascending', 3 => 'order by date descending') private.

Definition at line 30 of file class.ilForumProperties.php.

Referenced by getDefaultView().

ilForumProperties::$instances = array()
staticprivate

Definition at line 113 of file class.ilForumProperties.php.

ilForumProperties::$mark_mod_posts = 0
private

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

Referenced by getMarkModeratorPosts().

ilForumProperties::$notification_type = null
private

Global notification-type setting (CRS/GRP) possible values: 'all_users', 'per_user', null (default)

private

Definition at line 58 of file class.ilForumProperties.php.

Referenced by getNotificationType().

ilForumProperties::$obj_id
private

Object id of current forum private.

Definition at line 24 of file class.ilForumProperties.php.

Referenced by getObjId().

ilForumProperties::$post_activation_enabled = 0
private

Activation of new posts private.

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

Referenced by isPostActivationEnabled().

ilForumProperties::$preset_subject = 1
private

Preset subject on reply.

If deactivated, user is forced to enter a new subject

private

Definition at line 87 of file class.ilForumProperties.php.

Referenced by getPresetSubject().

ilForumProperties::$statistics_enabled = 0
private

Defines if a forum can show ranking statistics private.

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

Referenced by isStatisticEnabled().

ilForumProperties::$thread_ratings_allowed = false
private

Definition at line 79 of file class.ilForumProperties.php.

Referenced by isThreadRatingAllowed().

ilForumProperties::$thread_sorting = 0
private

sorting type for threads 0 = default 1 = manual

private

Definition at line 105 of file class.ilForumProperties.php.

Referenced by getThreadSorting().

ilForumProperties::$user_toggle_noti = false
private

Activation of allowing members to deactivate (CRS/GRP)forum notification private.

Definition at line 69 of file class.ilForumProperties.php.

Referenced by getUserToggleNoti(), and isUserToggleNoti().

const ilForumProperties::FORUM_OVERVIEW_NO_NEW_POSTS = 1

Definition at line 18 of file class.ilForumProperties.php.

const ilForumProperties::FORUM_OVERVIEW_WITH_NEW_POSTS = 0

Definition at line 17 of file class.ilForumProperties.php.

const ilForumProperties::VIEW_DATE = 2
const ilForumProperties::VIEW_DATE_ASC = 2
const ilForumProperties::VIEW_DATE_DESC = 3
const ilForumProperties::VIEW_TREE = 1

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