How to set the blocks default "display on page types"

How to set the blocks default "display on page types"

by Susana L. -
Number of replies: 0

When creating a new course format one can configure the default blocks by overriding the function get_default_blocks() on course/format/format_name/lib.php. It is possible to set which ones on left and right columns (BLOCK_POS_LEFT, BLOCK_POS_RIGHT).

My question is: Is it possible to set by default in which page types are the blocks displayed? I want the blocks to appear on "Any page"... Do I have somehow to add the blocks to the page? (with add_blocks()) Or is there a better solution?

Thank you for your attention.
Best,
susana

Average of ratings: -