diff --git a/blocks/html/lib.php b/blocks/html/lib.php
index 89f5ec1894b..34433d113ac 100644
--- a/blocks/html/lib.php
+++ b/blocks/html/lib.php
@@ -133,3 +133,8 @@ function block_html_get_path_from_pluginfile(string $filearea, array $args) : ar
'filepath' => $filepath,
];
}
+
+function block_html_override_webservice_execution($function, array $params) {
+ // Don't actually override anything.
+ return false;
+}
diff --git a/mod/forum/lib.php b/mod/forum/lib.php
index 79cc80fc5fb..21e7ff71679 100644
--- a/mod/forum/lib.php
+++ b/mod/forum/lib.php
@@ -6959,3 +6959,11 @@ function forum_grading_areas_list() {
'forum' => get_string('grade_forum_header', 'forum'),
];
}
+
+function mod_forum_override_webservice_execution($function, array $params) {
+ // Check if it's the function we want to override.
+ if ($function->name !== 'core_course_get_course_content_items') {
+ return false;
+ }
+ return ['content_items' => []];
+}