Can't this just be included in peer_grading_problem.js as a function and conditionally called?  This does not really tie in with our javascript workflow.

You could also just bundle it into a file and have the peer grading xmodule load it.