Modified filtering for multiple quarter classes

Had to add conditionals to handle filtering of courses that belong to
more than one quarter. Likely could be done more efficiently, but this
seems to work at least