You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the get_content() function of a block is always called twice on a page load - for that reason we populate $this->content on the first call and then check it at the top and return the content if it isn't null - for an example see: https://github.com/moodle/moodle/blob/master/blocks/html/block_html.php#L56
Please adjust your get_content function so that it performs a similar check and doesn't run the same set of functions/queries twice on the page load.