Merge branch 'MDL-69521' of https://github.com/stronk7/moodle into master
authorSara Arjona <sara@moodle.com>
Wed, 9 Sep 2020 06:08:06 +0000 (08:08 +0200)
committerSara Arjona <sara@moodle.com>
Wed, 9 Sep 2020 06:08:06 +0000 (08:08 +0200)
1  2 
mod/forum/externallib.php

@@@ -226,8 -226,6 +226,8 @@@ class mod_forum_external extends extern
  
          return [
              'posts' => $postbuilder->build($USER, [$forum], [$discussion], $posts),
 +            'forumid' => $discussion->get_forum_id(),
 +            'courseid' => $discussion->get_course_id(),
              'ratinginfo' => \core_rating\external\util::get_rating_info(
                  $legacydatamapper->get_forum_data_mapper()->to_legacy_object($forum),
                  $forum->get_context(),
      public static function get_discussion_posts_returns() {
          return new external_single_structure([
              'posts' => new external_multiple_structure(\mod_forum\local\exporters\post::get_read_structure()),
 +            'forumid' => new external_value(PARAM_INT, 'The forum id'),
 +            'courseid' => new external_value(PARAM_INT, 'The forum course id'),
              'ratinginfo' => \core_rating\external\util::external_ratings_structure(),
              'warnings' => new external_warnings()
          ]);
       *
       * @return array the forum post details
       * @since Moodle 2.7
-      * @todo MDL-65252 This will be removed in Moodle 4.1
+      * @todo MDL-65252 This will be removed in Moodle 3.11
       */
      public static function get_forum_discussion_posts($discussionid, $sortby = "created", $sortdirection = "DESC") {
          global $CFG, $DB, $USER, $PAGE;