Added SQL for when the id is not defined.
Update branch from master.
Moodle chrome added to targets