Search moodle.org's
Developer Documentation


  • Bug fixes for general core bugs in 2.8.x ended 9 November 2015 (12 months).
  • Bug fixes for security issues in 2.8.x ended 9 May 2016 (18 months).
  • minimum PHP 5.4.4 (always use latest PHP 5.4.x or 5.5.x on Windows - http://windows.php.net/download/), PHP 7 is NOT supported

  • 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.

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

    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.

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

    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

    return: array the forum post details
    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

    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.

    return: array the forum discussion details including warnings
    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

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

    return: external_single_structure

    Search This Site: