Skip to content

Commit

Permalink
Exchange $_REQUEST for a Moodle native function dealing with the supe…
Browse files Browse the repository at this point in the history
…r globals
  • Loading branch information
srobotta committed Sep 13, 2024
1 parent e167a48 commit 045a1fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions export.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@

$questionlist = [];

// There is not request class to actually get the posted params. The checked checboxed
// have a name like q<ID> where <ID> is the question id.
if (is_array($_REQUEST)) {
foreach (array_keys($_REQUEST) as $key) {
// The checked checkboxes have a name like q<ID> where <ID> 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)) {
Expand Down

0 comments on commit 045a1fa

Please sign in to comment.