1. Putting Moodle code in the YAHOO namespace seems evil to me.
2. Almost all the code should be in external JS files not in the HTML, there seems to be a lot of JS in grade/report/grader/index.php
3. Related to that, the JS should be includable from the page footer, but becuase of the inline script, it isn't. See the todo on lnie 119 of grade/report/grader/index.php.
I was hoping you could fix these problems more easily than me, so assigning to you Nico, I hope that is OK.