From df337ee4fde37fc1443a1b6483e4047beb0f25db Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 2 Oct 2025 12:01:21 +0100 Subject: [PATCH] MDL-86822 mod_h5pactivity: fix block page type list method parameters. Similar was done before in 7a77493b. --- public/lib/blocklib.php | 4 ++-- public/mod/h5pactivity/lib.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/lib/blocklib.php b/public/lib/blocklib.php index c1229b7bbe1..c19c7086e6e 100644 --- a/public/lib/blocklib.php +++ b/public/lib/blocklib.php @@ -2283,8 +2283,8 @@ function matching_page_type_patterns_from_pattern($pattern) { * that might be used by this block. * * @param string $pagetype for example 'course-view-weeks' or 'mod-quiz-view'. - * @param stdClass $parentcontext Block's parent context - * @param stdClass $currentcontext Current context of block + * @param context|null $parentcontext Block's parent context + * @param context|null $currentcontext Current context of block * @return array an array of all the page type patterns that might match this page type. */ function generate_page_type_patterns($pagetype, $parentcontext = null, $currentcontext = null) { diff --git a/public/mod/h5pactivity/lib.php b/public/mod/h5pactivity/lib.php index 1a71c9f00a6..fa8479c9915 100644 --- a/public/mod/h5pactivity/lib.php +++ b/public/mod/h5pactivity/lib.php @@ -324,11 +324,11 @@ function h5pactivity_reset_gradebook(int $courseid, string $type=''): void { * Return a list of page types * * @param string $pagetype current page type - * @param stdClass|null $parentcontext Block's parent context - * @param stdClass $currentcontext Current context of block + * @param context|null $parentcontext Block's parent context + * @param context|null $currentcontext Current context of block * @return array array of page types and it's names */ -function h5pactivity_page_type_list(string $pagetype, ?stdClass $parentcontext, stdClass $currentcontext): array { +function h5pactivity_page_type_list(string $pagetype, ?context $parentcontext, ?context $currentcontext): array { $modulepagetype = [ 'mod-h5pactivity-*' => get_string('page-mod-h5pactivity-x', 'h5pactivity'), ];