Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
mod_forum\local\entities\forum Class Reference

Forum class. More...

Public Member Functions

 __construct (context $context, stdClass $coursemodule, stdClass $course, int $effectivegroupmode, int $id, int $courseid, string $type, string $name, string $intro, int $introformat, int $assessed, int $assesstimestart, int $assesstimefinish, int $scale, int $gradeforum, bool $gradeforumnotify, int $maxbytes, int $maxattachments, int $forcesubscribe, int $trackingtype, int $rsstype, int $rssarticles, int $timemodified, int $warnafter, int $blockafter, int $blockperiod, int $completiondiscussions, int $completionreplies, int $completionposts, bool $displaywordcount, int $lockdiscussionafter, int $duedate, int $cutoffdate)
 Constructor.
 
 get_assess_time_finish ()
 Get the timestamp for when the assessment period ends.
 
 get_assess_time_start ()
 Get the timestamp for when the assessment period begins.
 
 get_block_after ()
 Get block after.
 
 get_block_period ()
 Get the block period.
 
 get_completion_discussions ()
 Get the completion discussions.
 
 get_completion_posts ()
 Get the completion posts.
 
 get_completion_replies ()
 Get the completion replies.
 
 get_context ()
 Get the forum module context.
 
 get_course_id ()
 Get the id of the course that the forum belongs to.
 
 get_course_module_record ()
 Get the forum course module record.
 
 get_course_record ()
 Get the course record.
 
 get_cutoff_date ()
 Get the cutoff date.
 
 get_due_date ()
 Get the due date.
 
 get_effective_group_mode ()
 Get the effective group mode.
 
 get_grade_for_forum ()
 Get the grade for the forum when grading holistically.
 
 get_id ()
 Get the forum id.
 
 get_intro ()
 Get the forum intro text.
 
 get_intro_format ()
 Get the forum intro text format.
 
 get_lock_discussions_after ()
 Get the timestamp after which the discussion should be locked.
 
 get_max_attachments ()
 Get the maximum number of attachments.
 
 get_max_bytes ()
 Get the maximum bytes.
 
 get_name ()
 Get the forum name.
 
 get_rating_aggregate ()
 Get the rating aggregate.
 
 get_rss_articles ()
 Get the RSS articles.
 
 get_rss_type ()
 Get the RSS type.
 
 get_scale ()
 Get the rating scale.
 
 get_subscription_mode ()
 Get the subscription mode.
 
 get_time_modified ()
 Get the timestamp for when the forum was last modified.
 
 get_tracking_type ()
 Get the tracking type.
 
 get_type ()
 Get the forum type.
 
 get_warn_after ()
 Get warn after.
 
 has_blocking_enabled ()
 Does the forum have blocking enabled?
 
 has_cutoff_date ()
 Does the forum have a cutoff date?
 
 has_due_date ()
 Does the forum have a due date?
 
 has_lock_discussions_after ()
 Does the forum have a discussion locking timestamp?
 
 has_rating_aggregate ()
 Does the forum have a rating aggregate?
 
 is_cutoff_date_reached ()
 Is the cutoff date for the forum reached?
 
 is_discussion_locked (discussion_entity $discussion)
 Is the discussion locked? - Takes into account both discussion settings AND forum's criteria.
 
 is_discussion_time_locked (discussion_entity $discussion)
 Check whether the discussion is locked based on forum's time based locking criteria.
 
 is_due_date_reached ()
 Is the due date for the forum reached?
 
 is_grading_enabled ()
 Whether grading is enabled for this item.
 
 is_in_group_mode ()
 Check if the forum is set to group mode.
 
 is_subscription_automatic ()
 Is the subscription mode set to automatic.
 
 is_subscription_disabled ()
 Is the subscription mode set to disabled.
 
 is_subscription_forced ()
 Is the subscription mode set to forced.
 
 is_subscription_optional ()
 Is the subscription mode set to optional.
 
 should_display_word_count ()
 Should the word counts be shown in the posts?
 
 should_notify_students_default_when_grade_for_forum ()
 Get the default for whether the students should be notified when grading holistically.
 

Detailed Description

Forum class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

mod_forum\local\entities\forum::__construct ( context $context,
stdClass $coursemodule,
stdClass $course,
int $effectivegroupmode,
int $id,
int $courseid,
string $type,
string $name,
string $intro,
int $introformat,
int $assessed,
int $assesstimestart,
int $assesstimefinish,
int $scale,
int $gradeforum,
bool $gradeforumnotify,
int $maxbytes,
int $maxattachments,
int $forcesubscribe,
int $trackingtype,
int $rsstype,
int $rssarticles,
int $timemodified,
int $warnafter,
int $blockafter,
int $blockperiod,
int $completiondiscussions,
int $completionreplies,
int $completionposts,
bool $displaywordcount,
int $lockdiscussionafter,
int $duedate,
int $cutoffdate )

Constructor.

Parameters
context$contextThe forum module context
stdClass$coursemoduleThe forum course module record
stdClass$courseThe forum course record
int$effectivegroupmodeThe effective group mode
int$idID
int$courseidId of the course this forum is in
string$typeThe forum type, e.g. single, qanda, etc
string$nameName of the forum
string$introIntro text
int$introformatFormat of the intro text
int$assessedThe forum rating aggregate
int$assesstimestartTimestamp to begin assessment
int$assesstimefinishTimestamp to end assessment
int$scaleThe rating scale
int$gradeforumThe holistic grade
bool$gradeforumnotifyDefault for whether to notify students when grade holistically
int$maxbytesMaximum attachment size
int$maxattachmentsMaximum number of attachments
int$forcesubscribeDoes the forum force users to subscribe?
int$trackingtypeTracking type
int$rsstypeRSS type
int$rssarticlesRSS articles
int$timemodifiedTimestamp when the forum was last modified
int$warnafterWarn after
int$blockafterBlock after
int$blockperiodBlock period
int$completiondiscussionsCompletion discussions
int$completionrepliesCompletion replies
int$completionpostsCompletion posts
bool$displaywordcountShould display word counts in posts
int$lockdiscussionafterTimestamp after which discussions should be locked
int$duedateTimestamp that represents the due date for forum posts
int$cutoffdateTimestamp after which forum posts will no longer be accepted

Member Function Documentation

◆ get_assess_time_finish()

mod_forum\local\entities\forum::get_assess_time_finish ( )

Get the timestamp for when the assessment period ends.

Return values
int

◆ get_assess_time_start()

mod_forum\local\entities\forum::get_assess_time_start ( )

Get the timestamp for when the assessment period begins.

Return values
int

◆ get_block_after()

mod_forum\local\entities\forum::get_block_after ( )

Get block after.

Return values
int

◆ get_block_period()

mod_forum\local\entities\forum::get_block_period ( )

Get the block period.

Return values
int

◆ get_completion_discussions()

mod_forum\local\entities\forum::get_completion_discussions ( )

Get the completion discussions.

Return values
int

◆ get_completion_posts()

mod_forum\local\entities\forum::get_completion_posts ( )

Get the completion posts.

Return values
int

◆ get_completion_replies()

mod_forum\local\entities\forum::get_completion_replies ( )

Get the completion replies.

Return values
int

◆ get_context()

mod_forum\local\entities\forum::get_context ( )

Get the forum module context.

Return values
context

◆ get_course_id()

mod_forum\local\entities\forum::get_course_id ( )

Get the id of the course that the forum belongs to.

Return values
int

◆ get_course_module_record()

mod_forum\local\entities\forum::get_course_module_record ( )

Get the forum course module record.

Return values
stdClass

◆ get_course_record()

mod_forum\local\entities\forum::get_course_record ( )

Get the course record.

Return values
stdClass

◆ get_cutoff_date()

mod_forum\local\entities\forum::get_cutoff_date ( )

Get the cutoff date.

Return values
int

◆ get_due_date()

mod_forum\local\entities\forum::get_due_date ( )

Get the due date.

Return values
int

◆ get_effective_group_mode()

mod_forum\local\entities\forum::get_effective_group_mode ( )

Get the effective group mode.

Return values
int

◆ get_grade_for_forum()

mod_forum\local\entities\forum::get_grade_for_forum ( )

Get the grade for the forum when grading holistically.

Return values
int

◆ get_id()

mod_forum\local\entities\forum::get_id ( )

Get the forum id.

Return values
int

◆ get_intro()

mod_forum\local\entities\forum::get_intro ( )

Get the forum intro text.

Return values
string

◆ get_intro_format()

mod_forum\local\entities\forum::get_intro_format ( )

Get the forum intro text format.

Return values
int

◆ get_lock_discussions_after()

mod_forum\local\entities\forum::get_lock_discussions_after ( )

Get the timestamp after which the discussion should be locked.

Return values
int

◆ get_max_attachments()

mod_forum\local\entities\forum::get_max_attachments ( )

Get the maximum number of attachments.

Return values
int

◆ get_max_bytes()

mod_forum\local\entities\forum::get_max_bytes ( )

Get the maximum bytes.

Return values
int

◆ get_name()

mod_forum\local\entities\forum::get_name ( )

Get the forum name.

Return values
string

◆ get_rating_aggregate()

mod_forum\local\entities\forum::get_rating_aggregate ( )

Get the rating aggregate.

Return values
int

◆ get_rss_articles()

mod_forum\local\entities\forum::get_rss_articles ( )

Get the RSS articles.

Return values
int

◆ get_rss_type()

mod_forum\local\entities\forum::get_rss_type ( )

Get the RSS type.

Return values
int

◆ get_scale()

mod_forum\local\entities\forum::get_scale ( )

Get the rating scale.

Return values
int

◆ get_subscription_mode()

mod_forum\local\entities\forum::get_subscription_mode ( )

Get the subscription mode.

Return values
int

◆ get_time_modified()

mod_forum\local\entities\forum::get_time_modified ( )

Get the timestamp for when the forum was last modified.

Return values
int

◆ get_tracking_type()

mod_forum\local\entities\forum::get_tracking_type ( )

Get the tracking type.

Return values
int

◆ get_type()

mod_forum\local\entities\forum::get_type ( )

Get the forum type.

Return values
string

◆ get_warn_after()

mod_forum\local\entities\forum::get_warn_after ( )

Get warn after.

Return values
int

◆ has_blocking_enabled()

mod_forum\local\entities\forum::has_blocking_enabled ( )

Does the forum have blocking enabled?

Return values
bool

◆ has_cutoff_date()

mod_forum\local\entities\forum::has_cutoff_date ( )

Does the forum have a cutoff date?

Return values
bool

◆ has_due_date()

mod_forum\local\entities\forum::has_due_date ( )

Does the forum have a due date?

Return values
bool

◆ has_lock_discussions_after()

mod_forum\local\entities\forum::has_lock_discussions_after ( )

Does the forum have a discussion locking timestamp?

Return values
bool

◆ has_rating_aggregate()

mod_forum\local\entities\forum::has_rating_aggregate ( )

Does the forum have a rating aggregate?

Return values
bool

◆ is_cutoff_date_reached()

mod_forum\local\entities\forum::is_cutoff_date_reached ( )

Is the cutoff date for the forum reached?

Return values
bool

◆ is_discussion_locked()

mod_forum\local\entities\forum::is_discussion_locked ( discussion_entity $discussion)

Is the discussion locked? - Takes into account both discussion settings AND forum's criteria.

Parameters
discussion_entity$discussionThe discussion to check
Return values
bool

◆ is_discussion_time_locked()

mod_forum\local\entities\forum::is_discussion_time_locked ( discussion_entity $discussion)

Check whether the discussion is locked based on forum's time based locking criteria.

Parameters
discussion_entity$discussion
Return values
bool

◆ is_due_date_reached()

mod_forum\local\entities\forum::is_due_date_reached ( )

Is the due date for the forum reached?

Return values
bool

◆ is_grading_enabled()

mod_forum\local\entities\forum::is_grading_enabled ( )

Whether grading is enabled for this item.

Return values
bool

◆ is_in_group_mode()

mod_forum\local\entities\forum::is_in_group_mode ( )

Check if the forum is set to group mode.

Return values
bool

◆ is_subscription_automatic()

mod_forum\local\entities\forum::is_subscription_automatic ( )

Is the subscription mode set to automatic.

Return values
bool

◆ is_subscription_disabled()

mod_forum\local\entities\forum::is_subscription_disabled ( )

Is the subscription mode set to disabled.

Return values
bool

◆ is_subscription_forced()

mod_forum\local\entities\forum::is_subscription_forced ( )

Is the subscription mode set to forced.

Return values
bool

◆ is_subscription_optional()

mod_forum\local\entities\forum::is_subscription_optional ( )

Is the subscription mode set to optional.

Return values
bool

◆ should_display_word_count()

mod_forum\local\entities\forum::should_display_word_count ( )

Should the word counts be shown in the posts?

Return values
bool

◆ should_notify_students_default_when_grade_for_forum()

mod_forum\local\entities\forum::should_notify_students_default_when_grade_for_forum ( )

Get the default for whether the students should be notified when grading holistically.

Return values
bool

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