/** * override the load instance to use our config tables rather than theirs; */ function _load_instance($instance, $page) { parent::_load_instance($instance, $page); global $COURSE; $config = get_timetracker_config($COURSE->id); if ($config) { $myconfig = new stdClass(); foreach ($config as $key => $value) { $key = 'block_timetracker_' . $key; $myconfig->{$key} = $value; } //print_object($myconfig); $this->config = $myconfig; } }