Show block on page after installation

Re: Show block on page after installation

by Peter Eliyahu Kornfeld -
Number of replies: 0

Thank you very much!

Your code helped me to come up with a working solution:

$page = new moodle_page ();
$page->set_context ( context_system::instance () );
$page->set_pagetype ( 'mod-quiz-view' );
$page->set_pagelayout ( 'standard' ); // picked it from \theme\base\config.php...
$page->blocks->load_blocks ();
$page->blocks->add_block ( 'link_rashim', 'side-post', 1, false );