Saltar al contenido principal

Function: editPost()

function editPost(
context,
siteUrl,
postId,
changes
): Promise<{
changed: string;
post?: ForumPost;
}>;

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

Changes a post through Moodle's own post form (post.php?edit=), as its author (within the site's editing time) or a moderator: only what's given changes. Returns the post afterwards. Throws ForumError with Moodle's reason when it refuses.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
postIdnumber
changesPostChanges

Returns​

Promise<{ changed: string; post?: ForumPost; }>