need to import global $CFG