Fixed course filter bugs, moved python code to PHP for andrew servers