Fixed a bug with mathview

Click events for the buttons were being lost after the popup was closed once. 

I also set the default for enabling mathview to be 0.  It can be re-enabled using the course conf page.