Undo changes since commit 348bb4c2a86572774
Basically, this commit undoes the merge from branch sita

Also, merged changes to the create-database.sql script and made
some further modifications.  These modifications have not
been implemented in the database itself.

Retained changes to teacher dashboard (log analysis).
Retained fixes to problem xml's
Removed obosolete script www/postvar.php