mod/hotpot fix undefined $DB hen restoring HotPot in Moodle 2.x