MDL-56019 ws: Use itemid null when getting modules intro
authorDani Palou <dani@moodle.com>
Mon, 19 Sep 2016 09:33:55 +0000 (11:33 +0200)
committerDani Palou <dani@moodle.com>
Mon, 19 Sep 2016 09:33:55 +0000 (11:33 +0200)
mod/forum/externallib.php
mod/lti/classes/external.php
mod/scorm/classes/external.php
mod/wiki/classes/external.php

index c0db8fe..632deae 100644 (file)
@@ -91,7 +91,7 @@ class mod_forum_external extends external_api {
                 $forum->name = external_format_string($forum->name, $context->id);
                 // Format the intro before being returning using the format setting.
                 list($forum->intro, $forum->introformat) = external_format_text($forum->intro, $forum->introformat,
-                                                                                $context->id, 'mod_forum', 'intro', 0);
+                                                                                $context->id, 'mod_forum', 'intro', null);
                 $forum->introfiles = external_util::get_area_files($context->id, 'mod_forum', 'intro', false, false);
                 // Discussions count. This function does static request cache.
                 $forum->numdiscussions = forum_count_discussions($forum, $cm, $course);
index 460340d..e9ca83e 100644 (file)
@@ -307,7 +307,7 @@ class mod_lti_external extends external_api {
                 $viewablefields = [];
                 if (has_capability('mod/lti:view', $context)) {
                     list($module['intro'], $module['introformat']) =
-                        external_format_text($lti->intro, $lti->introformat, $context->id, 'mod_lti', 'intro', $lti->id);
+                        external_format_text($lti->intro, $lti->introformat, $context->id, 'mod_lti', 'intro', null);
 
                     $module['introfiles'] = external_util::get_area_files($context->id, 'mod_lti', 'intro', false, false);
                     $viewablefields = array('launchcontainer', 'showtitlelaunch', 'showdescriptionlaunch', 'icon', 'secureicon');
index 72a00c2..a3907f4 100644 (file)
@@ -692,7 +692,7 @@ class mod_scorm_external extends external_api {
                 $module['course'] = $scorm->course;
                 $module['name']  = external_format_string($scorm->name, $context->id);
                 list($module['intro'], $module['introformat']) =
-                    external_format_text($scorm->intro, $scorm->introformat, $context->id, 'mod_scorm', 'intro', $scorm->id);
+                    external_format_text($scorm->intro, $scorm->introformat, $context->id, 'mod_scorm', 'intro', null);
                 $module['introfiles'] = external_util::get_area_files($context->id, 'mod_scorm', 'intro', false, false);
 
                 // Check if the SCORM open and return warnings if so.
index 20f617c..2cfd0c3 100644 (file)
@@ -103,7 +103,7 @@ class mod_wiki_external extends external_api {
                 $viewablefields = [];
                 if (has_capability('mod/wiki:viewpage', $context)) {
                     list($module['intro'], $module['introformat']) =
-                        external_format_text($wiki->intro, $wiki->introformat, $context->id, 'mod_wiki', 'intro', $wiki->id);
+                        external_format_text($wiki->intro, $wiki->introformat, $context->id, 'mod_wiki', 'intro', null);
                     $module['introfiles'] = external_util::get_area_files($context->id, 'mod_wiki', 'intro', false, false);
 
                     $viewablefields = array('firstpagetitle', 'wikimode', 'defaultformat', 'forceformat', 'editbegin', 'editend',