fix get_idnumber_cohorts (missing global $DB)