bug fixes for mixeval

I have fixed some bugs introduced by the new mixeval question types.
Also I have condensed the permissions checking code for survey.
Lastly, I have added the new mixeval question type to the various
sql files.