Search moodle.org's
Developer Documentation

External forum API

Copyright: 2012 Mark Nelson <markn@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 837 lines (43 kb)
Included or required:0 times
Referenced: 5 times
Includes or requires: 0 files

Defines 1 class


Class: mod_forum_external  - X-Ref

get_forums_by_courses_parameters()   X-Ref
Describes the parameters for get_forum.

return: external_external_function_parameters

get_forums_by_courses($courseids = array()   X-Ref
Returns a list of forums in a provided list of courses,
if no list is provided all forums that the user can view
will be returned.

param: array $courseids the course ids
return: array the forum details

get_forums_by_courses_returns()   X-Ref
Describes the get_forum return value.

return: external_single_structure

get_forum_discussions_parameters()   X-Ref
Describes the parameters for get_forum_discussions.

return: external_external_function_parameters

get_forum_discussions($forumids, $limitfrom = 0, $limitnum = 0)   X-Ref
Returns a list of forum discussions as well as a summary of the discussion
in a provided list of forums.

param: array $forumids the forum ids
param: int $limitfrom limit from SQL data
param: int $limitnum limit number SQL data
return: array the forum discussion details

get_forum_discussions_returns()   X-Ref
Describes the get_forum_discussions return value.

return: external_single_structure

get_forum_discussion_posts_parameters()   X-Ref
Describes the parameters for get_forum_discussion_posts.

return: external_external_function_parameters

get_forum_discussion_posts($discussionid, $sortby = "created", $sortdirection = "DESC")   X-Ref
Returns a list of forum posts for a discussion

param: int $discussionid the post ids
param: string $sortby sort by this element (id, created or modified)
param: string $sortdirection sort direction: ASC or DESC
return: array the forum post details

get_forum_discussion_posts_returns()   X-Ref
Describes the get_forum_discussion_posts return value.

return: external_single_structure

get_forum_discussions_paginated_parameters()   X-Ref
Describes the parameters for get_forum_discussions_paginated.

return: external_external_function_parameters

get_forum_discussions_paginated($forumid, $sortby = 'timemodified', $sortdirection = 'DESC',$page = -1, $perpage = 0)   X-Ref
Returns a list of forum discussions optionally sorted and paginated.

param: int $forumid the forum instance id
param: string $sortby sort by this element (id, timemodified, timestart or timeend)
param: string $sortdirection sort direction: ASC or DESC
param: int $page page number
param: int $perpage items per page
return: array the forum discussion details including warnings

get_forum_discussions_paginated_returns()   X-Ref
Describes the get_forum_discussions_paginated return value.

return: external_single_structure

Search This Site: