replaced stored procedure "disciplines_for_title_restricted_by_school" with simple sql queries.

refs #291.