From 9988ed1a3d73332d7608a0f5d7e948c5aaacbe7d Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Fri, 1 Nov 2024 12:43:44 +0100 Subject: [PATCH] Cleanup --- classes/form/studyplan_editform.php | 2 +- classes/local/randomimage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/form/studyplan_editform.php b/classes/form/studyplan_editform.php index c18ec16..24a55a0 100644 --- a/classes/form/studyplan_editform.php +++ b/classes/form/studyplan_editform.php @@ -186,7 +186,7 @@ class studyplan_editform extends formbase { $contextlist = []; // Add system if the user has permissions. - if (has_all_capabilities([courseservice::CAP_EDIT,'moodle/category:viewcourselist'], \context_system::instance())) { + if (has_all_capabilities([courseservice::CAP_EDIT, 'moodle/category:viewcourselist'], \context_system::instance())) { $contextlist[1] = get_string("coresystem"); } // Add any other contexts the user has access to. diff --git a/classes/local/randomimage.php b/classes/local/randomimage.php index 9098ca9..fd375c2 100644 --- a/classes/local/randomimage.php +++ b/classes/local/randomimage.php @@ -80,7 +80,7 @@ class randomimage { $color = imagecolorallocatealpha($im, ...$this->random_color_alpha()); $numpoints = \random_int(3, $maxpts); $pts = $this->random_pts($numpoints); - imagefilledpolygon($im, $pts, $color); + imagefilledpolygon($im, $pts, $numpoints, $color); } /**