I'm getting some SQL erros. The main cause seems to be that some queries use double-quotes to enclose literals.
For example:
ERROR: column "site" does not exist<br /><br />SELECT id,courseid,userid,content,format,created,lastmodified,usermodified,publishstate FROM mdl_post WHERE userid=2 AND publishstate="site" AND module="notes" ORDER BY lastmodified DESC
in the note_list() function.
It would be interesting to fix this and to perform a quick review to detect-and-kill such quoting.
Ciao