From 3ca62ad556ed927fe4a9a5080f008c38c1c9d28c Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 6 Jul 2023 23:59:30 +0100 Subject: [PATCH] MDL-78302 mod_forum: fix course module grade button parameters. --- mod/forum/view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/forum/view.php b/mod/forum/view.php index 98aad9adbb2..b0af745d1e7 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -188,7 +188,7 @@ switch ($forum->get_type()) { $groupid = groups_get_activity_group($cm, true) ?: null; $gradeobj = (object) [ 'contextid' => $forum->get_context()->id, - 'cmid' => $cmid, + 'cmid' => $forum->get_course_module_record()->id, 'name' => format_string($forum->get_name()), 'courseid' => $course->id, 'coursename' => format_string($course->shortname), @@ -206,7 +206,7 @@ switch ($forum->get_type()) { $groupid = groups_get_activity_group($cm, true) ?: null; $gradeobj = (object) [ 'contextid' => $forum->get_context()->id, - 'cmid' => $cmid, + 'cmid' => $forum->get_course_module_record()->id, 'name' => format_string($forum->get_name()), 'courseid' => $course->id, 'coursename' => format_string($course->shortname),