MDL-83038 mod_quiz: use dummy URL in quiz grading page external call.

This commit is contained in:
Paul Holden 2024-09-06 12:24:29 +01:00
parent 13c12756b4
commit 0c3c325ca0
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

View File

@ -70,6 +70,9 @@ class get_edit_grading_page_data extends external_api {
require_capability('mod/quiz:manage', $quizobj->get_context());
self::validate_context($quizobj->get_context());
// Set dummy URL to stop debugging in the renderer (TODO: remove as part of MDL-76728).
$PAGE->set_url('/');
$structure = $quizobj->get_structure();
$editpage = new edit_grading_page($structure);
return json_encode($editpage->export_for_template($PAGE->get_renderer('core')));