Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | List of all members
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. More...
 
 get_assess_time_finish ()
 Get the timestamp for when the assessment period ends. More...
 
 get_assess_time_start ()
 Get the timestamp for when the assessment period begins. More...
 
 get_block_after ()
 Get block after. More...
 
 get_block_period ()
 Get the block period. More...
 
 get_completion_discussions ()
 Get the completion discussions. More...
 
 get_completion_posts ()
 Get the completion posts. More...
 
 get_completion_replies ()
 Get the completion replies. More...
 
 get_context ()
 Get the forum module context. More...
 
 get_course_id ()
 Get the id of the course that the forum belongs to. More...
 
 get_course_module_record ()
 Get the forum course module record. More...
 
 get_course_record ()
 Get the course record. More...
 
 get_cutoff_date ()
 Get the cutoff date. More...
 
 get_due_date ()
 Get the due date. More...
 
 get_effective_group_mode ()
 Get the effective group mode. More...
 
 get_grade_for_forum ()
 Get the grade for the forum when grading holistically. More...
 
 get_id ()
 Get the forum id. More...
 
 get_intro ()
 Get the forum intro text. More...
 
 get_intro_format ()
 Get the forum intro text format. More...
 
 get_lock_discussions_after ()
 Get the timestamp after which the discussion should be locked. More...
 
 get_max_attachments ()
 Get the maximum number of attachments. More...
 
 get_max_bytes ()
 Get the maximum bytes. More...
 
 get_name ()
 Get the forum name. More...
 
 get_rating_aggregate ()
 Get the rating aggregate. More...
 
 get_rss_articles ()
 Get the RSS articles. More...
 
 get_rss_type ()
 Get the RSS type. More...
 
 get_scale ()
 Get the rating scale. More...
 
 get_subscription_mode ()
 Get the subscription mode. More...
 
 get_time_modified ()
 Get the timestamp for when the forum was last modified. More...
 
 get_tracking_type ()
 Get the tracking type. More...
 
 get_type ()
 Get the forum type. More...
 
 get_warn_after ()
 Get warn after. More...
 
 has_blocking_enabled ()
 Does the forum have blocking enabled? More...
 
 has_cutoff_date ()
 Does the forum have a cutoff date? More...
 
 has_due_date ()
 Does the forum have a due date? More...
 
 has_lock_discussions_after ()
 Does the forum have a discussion locking timestamp? More...
 
 has_rating_aggregate ()
 Does the forum have a rating aggregate? More...
 
 is_cutoff_date_reached ()
 Is the cutoff date for the forum reached? More...
 
 is_discussion_locked (discussion_entity $discussion)
 Is the discussion locked? - Takes into account both discussion settings AND forum's criteria. More...
 
 is_discussion_time_locked (discussion_entity $discussion)
 Check whether the discussion is locked based on forum's time based locking criteria. More...
 
 is_due_date_reached ()
 Is the due date for the forum reached? More...
 
 is_grading_enabled ()
 Whether grading is enabled for this item. More...
 
 is_in_group_mode ()
 Check if the forum is set to group mode. More...
 
 is_subscription_automatic ()
 Is the subscription mode set to automatic. More...
 
 is_subscription_disabled ()
 Is the subscription mode set to disabled. More...
 
 is_subscription_forced ()
 Is the subscription mode set to forced. More...
 
 is_subscription_optional ()
 Is the subscription mode set to optional. More...
 
 should_display_word_count ()
 Should the word counts be shown in the posts? More...
 
 should_notify_students_default_when_grade_for_forum ()
 Get the default for whether the students should be notified when grading holistically. More...
 

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: