mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Merge branch 'MDL-70141-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
84a8a2270f
@ -92,6 +92,9 @@ class core_block_external extends external_api {
|
||||
private static function get_all_current_page_blocks($includeinvisible = false, $returncontents = false) {
|
||||
global $PAGE, $OUTPUT;
|
||||
|
||||
// Set page URL to a fake URL to avoid errors.
|
||||
$PAGE->set_url(new \moodle_url('/webservice/core_block_external/'));
|
||||
|
||||
// Load the block instances for all the regions.
|
||||
$PAGE->blocks->load_blocks($includeinvisible);
|
||||
$PAGE->blocks->create_all_block_instances();
|
||||
|
Loading…
x
Reference in New Issue
Block a user