Add auditing support

This adds auditing and grading support.  It contains no UI changes (those will be introduced in a later pull request)

Everything is that this introduces is tested via phpunit