From 0a6414f91fe66caae46d93abe95d8053161d2768 Mon Sep 17 00:00:00 2001 From: James C <5689414+james-cnz@users.noreply.github.com> Date: Mon, 24 Mar 2025 15:47:52 +1300 Subject: [PATCH] MDL-84979 course: Correct course format update parameters --- course/format/classes/base.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/course/format/classes/base.php b/course/format/classes/base.php index 69eba0a0042..799bb09f1e4 100644 --- a/course/format/classes/base.php +++ b/course/format/classes/base.php @@ -966,11 +966,11 @@ abstract class base { } } - if ($targetsectionid) { - $params['sectionid'] = $targetsectionid; + if (isset($targetsectionid)) { + $params['targetsectionid'] = $targetsectionid; } - if ($targetcmid) { - $params['cmid'] = $targetcmid; + if (isset($targetcmid)) { + $params['targetcmid'] = $targetcmid; } if ($returnurl) { $params['returnurl'] = $returnurl->out_as_local_url();