changing teacher view to use new selector

Stopped using $_SESSION variables strictly for storing SID. Now using
POST data on the teacher view.