Fixed bug that was causing upgrade code for grader report to always get stuck on version 2013052800.

Also reformatted upgrade code to follow standard Moodle coding conventions.
Merge branch 'ccle-upgrade_code_fix' into misc_LSU_patches