Local hook would be needed (in lib/web.php) to allow for custom plugins to add custom sideblocks to certain parts/pages within Mahara without the need for changing core code.
Below is an example (in local/lib.php) of using such a hook to add custom sideblock to all pages relatd to groups (i.e. Gropus menu and all it's submenu items):
function local_sideblocks_update(&$SIDEBLOCKS) {
if (defined('MENUITEM') && MENUITEM != '') {
list($mainmenu, $submenu) = explode('/', MENUITEM);
if($mainmenu == 'groups') {
safe_require('artefact', 'myplugin');
$SIDEBLOCKS[] = array(
'name' => 'mysideblock',
'id' => 'sb-mysideblock',
'weight' => -10,
'data' => PluginArtefactMyplugin::mysideblock_sideblock()
);
}
}
}
Patch for "master" branch: https:/ /reviews. mahara. org/3303