From 045a1fa00307f319a4c0c36e8f386609960996f6 Mon Sep 17 00:00:00 2001 From: Stephan Robotta Date: Fri, 13 Sep 2024 14:47:59 +0200 Subject: [PATCH] Exchange $_REQUEST for a Moodle native function dealing with the super globals --- export.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/export.php b/export.php index 33527f1..b3622e8 100644 --- a/export.php +++ b/export.php @@ -53,10 +53,10 @@ $questionlist = []; -// There is not request class to actually get the posted params. The checked checboxed -// have a name like q where is the question id. -if (is_array($_REQUEST)) { - foreach (array_keys($_REQUEST) as $key) { +// The checked checkboxes have a name like q where is the question id. +$request = data_submitted(); +if ($request) { + foreach (array_keys(get_object_vars($request)) as $key) { if (strpos($key, 'q') === 0) { $questionid = substr($key, 1); if (is_number($questionid)) {