Skip to main content

Function: discussion()

Call Signature​

function discussion(
context,
siteUrl,
discussionId,
options
): Promise<DiscussionPosts<ListPage<ForumPost>>>;

Defined in: areas/forums/posts.ts:89

A discussion's posts, oldest first, with their messages as text, and whether the person is subscribed to it (subscribed, undefined where they can't subscribe or it's forced). With limit, posts is a page of them (see "Long lists" in the docs' concepts): Moodle's service has no paging, so every post is read and cut, but only the page's messages are turned into text.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
discussionIdnumber
optionsWithLimit<PageOptions>

Returns​

Promise<DiscussionPosts<ListPage<ForumPost>>>

Call Signature​

function discussion(
context,
siteUrl,
discussionId,
options?
): Promise<DiscussionPosts<ForumPost[]>>;

Defined in: areas/forums/posts.ts:90

A discussion's posts, oldest first, with their messages as text, and whether the person is subscribed to it (subscribed, undefined where they can't subscribe or it's forced). With limit, posts is a page of them (see "Long lists" in the docs' concepts): Moodle's service has no paging, so every post is read and cut, but only the page's messages are turned into text.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
discussionIdnumber
options?WithoutLimit<PageOptions>

Returns​

Promise<DiscussionPosts<ForumPost[]>>

Call Signature​

function discussion(
context,
siteUrl,
discussionId,
options?
): Promise<DiscussionPosts<
| ForumPost[]
| ListPage<ForumPost>>>;

Defined in: areas/forums/posts.ts:91

A discussion's posts, oldest first, with their messages as text, and whether the person is subscribed to it (subscribed, undefined where they can't subscribe or it's forced). With limit, posts is a page of them (see "Long lists" in the docs' concepts): Moodle's service has no paging, so every post is read and cut, but only the page's messages are turned into text.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
discussionIdnumber
options?PageOptions

Returns​

Promise<DiscussionPosts< | ForumPost[] | ListPage<ForumPost>>>