replaced calls to stored procedure disciplines_for_title_restricted_by_school with regular sql queries.