Skip to content

Commit

Permalink
Allow wider access to the bulktestall.php script, i.e. qtype/stack:us…
Browse files Browse the repository at this point in the history
…ediagnostictools capability is enough.
  • Loading branch information
sangwinc committed Aug 27, 2024
1 parent 1db4092 commit 3187562
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions adminui/bulktestall.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@
}

// Login and check permissions.
$context = context_system::instance();
require_login();
require_capability('moodle/site:config', $context);
$context = context_system::instance();
require_capability('qtype/stack:usediagnostictools', $context);

$PAGE->set_url('/question/type/stack/bulktestall.php', $urlparams);
$PAGE->set_context($context);
$title = stack_string('bulktesttitle', $context->get_context_name());
$PAGE->set_title($title);

require_login();

// Create the helper class.
$bulktester = new stack_bulk_tester();
$allpassed = true;
Expand Down

0 comments on commit 3187562

Please sign in to comment.