Discussion class.
More...
|
| | __construct (int $id, int $courseid, int $forumid, string $name, int $firstpostid, int $userid, int $groupid, bool $assessed, int $timemodified, int $usermodified, int $timestart, int $timeend, bool $pinned, int $locked) |
| | Constructor.
|
| |
| | get_course_id () |
| | Get the course id.
|
| |
| | get_first_post_id () |
| | Get the id of the fist post in the discussion.
|
| |
| | get_forum_id () |
| | Get the forum id.
|
| |
| | get_group_id () |
| | Get the id of the group that this discussion belongs to.
|
| |
| | get_id () |
| | Get the discussion id.
|
| |
| | get_locked () |
| | Get the locked time of this discussion.
|
| |
| | get_name () |
| | Get the name of the discussion.
|
| |
| | get_time_end () |
| | Get the end time of this discussion.
|
| |
| | get_time_modified () |
| | Get the timestamp for when this discussion was last modified.
|
| |
| | get_time_start () |
| | Get the start time of this discussion.
|
| |
| | get_user_id () |
| | Get the id of the user that created the discussion.
|
| |
| | get_user_modified () |
| | Get the id of the user that last modified this discussion.
|
| |
| | has_ended () |
| | Check if the discussion has ended.
|
| |
| | has_group () |
| | Check if the discussion belongs to a group.
|
| |
| | has_started () |
| | Check if the discussion has started yet.
|
| |
| | is_assessed () |
| | Check if this discussion is assessed.
|
| |
| | is_first_post (post_entity $post) |
| | Check if the given post is the first post in this discussion.
|
| |
| | is_locked () |
| | Is this discussion locked based on it's locked attribute.
|
| |
| | is_pinned () |
| | Check if this discussion is pinned.
|
| |
| | is_timed_discussion () |
| | Check if the discussion is timed.
|
| |
| | is_timed_discussion_visible () |
| | Check if the timed discussion is visible.
|
| |
| | set_pinned (int $targetstate) |
| | Set the pinned value for this entity.
|
| |
| | toggle_locked_state (int $timestamp) |
| | Set the locked timestamp.
|
| |
◆ __construct()
| mod_forum\local\entities\discussion::__construct |
( |
int | $id, |
|
|
int | $courseid, |
|
|
int | $forumid, |
|
|
string | $name, |
|
|
int | $firstpostid, |
|
|
int | $userid, |
|
|
int | $groupid, |
|
|
bool | $assessed, |
|
|
int | $timemodified, |
|
|
int | $usermodified, |
|
|
int | $timestart, |
|
|
int | $timeend, |
|
|
bool | $pinned, |
|
|
int | $locked ) |
Constructor.
- Parameters
-
| int | $id | ID |
| int | $courseid | Course id |
| int | $forumid | Forum id |
| string | $name | Discussion name |
| int | $firstpostid | Id of the first post in the discussion |
| int | $userid | Id of the user that created the discussion |
| int | $groupid | Group id if it's a group dicussion |
| bool | $assessed | Is the discussion assessed? |
| int | $timemodified | Timestamp for last modification to the discussion |
| int | $usermodified | Id of user that last modified the discussion |
| int | $timestart | Start time for the discussion |
| int | $timeend | End time for the discussion |
| bool | $pinned | Is the discussion pinned? |
| int | $locked | Time this discussion was locked |
◆ get_course_id()
| mod_forum\local\entities\discussion::get_course_id |
( |
| ) |
|
Get the course id.
- Return values
-
◆ get_first_post_id()
| mod_forum\local\entities\discussion::get_first_post_id |
( |
| ) |
|
Get the id of the fist post in the discussion.
- Return values
-
◆ get_forum_id()
| mod_forum\local\entities\discussion::get_forum_id |
( |
| ) |
|
Get the forum id.
- Return values
-
◆ get_group_id()
| mod_forum\local\entities\discussion::get_group_id |
( |
| ) |
|
Get the id of the group that this discussion belongs to.
- Return values
-
◆ get_id()
| mod_forum\local\entities\discussion::get_id |
( |
| ) |
|
Get the discussion id.
- Return values
-
◆ get_locked()
| mod_forum\local\entities\discussion::get_locked |
( |
| ) |
|
Get the locked time of this discussion.
- Return values
-
◆ get_name()
| mod_forum\local\entities\discussion::get_name |
( |
| ) |
|
Get the name of the discussion.
- Return values
-
◆ get_time_end()
| mod_forum\local\entities\discussion::get_time_end |
( |
| ) |
|
Get the end time of this discussion.
Returns zero if the discussion has no designated end time.
- Return values
-
◆ get_time_modified()
| mod_forum\local\entities\discussion::get_time_modified |
( |
| ) |
|
Get the timestamp for when this discussion was last modified.
- Return values
-
◆ get_time_start()
| mod_forum\local\entities\discussion::get_time_start |
( |
| ) |
|
Get the start time of this discussion.
Returns zero if the discussion has no designated start time.
- Return values
-
◆ get_user_id()
| mod_forum\local\entities\discussion::get_user_id |
( |
| ) |
|
Get the id of the user that created the discussion.
- Return values
-
◆ get_user_modified()
| mod_forum\local\entities\discussion::get_user_modified |
( |
| ) |
|
Get the id of the user that last modified this discussion.
- Return values
-
◆ has_ended()
| mod_forum\local\entities\discussion::has_ended |
( |
| ) |
|
Check if the discussion has ended.
DEFAULTS: false if not set
- Return values
-
◆ has_group()
| mod_forum\local\entities\discussion::has_group |
( |
| ) |
|
Check if the discussion belongs to a group.
- Return values
-
◆ has_started()
| mod_forum\local\entities\discussion::has_started |
( |
| ) |
|
Check if the discussion has started yet.
DEFAULTS: true if not set
- Return values
-
◆ is_assessed()
| mod_forum\local\entities\discussion::is_assessed |
( |
| ) |
|
Check if this discussion is assessed.
- Return values
-
◆ is_first_post()
| mod_forum\local\entities\discussion::is_first_post |
( |
post_entity | $post | ) |
|
Check if the given post is the first post in this discussion.
- Parameters
-
| post_entity | $post | The post to check |
- Return values
-
◆ is_locked()
| mod_forum\local\entities\discussion::is_locked |
( |
| ) |
|
Is this discussion locked based on it's locked attribute.
- Return values
-
◆ is_pinned()
| mod_forum\local\entities\discussion::is_pinned |
( |
| ) |
|
Check if this discussion is pinned.
- Return values
-
◆ is_timed_discussion()
| mod_forum\local\entities\discussion::is_timed_discussion |
( |
| ) |
|
Check if the discussion is timed.
- Return values
-
◆ is_timed_discussion_visible()
| mod_forum\local\entities\discussion::is_timed_discussion_visible |
( |
| ) |
|
Check if the timed discussion is visible.
- Return values
-
◆ set_pinned()
| mod_forum\local\entities\discussion::set_pinned |
( |
int | $targetstate | ) |
|
Set the pinned value for this entity.
- Parameters
-
| int | $targetstate | The state to change the pin to |
- Return values
-
◆ toggle_locked_state()
| mod_forum\local\entities\discussion::toggle_locked_state |
( |
int | $timestamp | ) |
|
Set the locked timestamp.
- Parameters
-
| int | $timestamp | The value we want to store into 'locked' |
The documentation for this class was generated from the following file:
- mod/forum/classes/local/entities/discussion.php