adding blocks within module code

adding blocks within module code

by Benjamin Hirsch -
Number of replies: 1

Hi,

I am developing a custom assignment module for Moodle 2.3, and would like to have a number of custom blocks be added to the activity page automatically. 

I tried to play around with the block_manager at $PAGE->blocks, but I cannot get it to work.

Any suggestions?

 

Thanks,

Benjamin

Average of ratings: -
In reply to Benjamin Hirsch

Re: adding blocks within module code

by Benjamin Hirsch -

Hi,

can anyone help me out here? 

How can I add a block (if it is not there already) within a module?

Benjamin