MDL-43089 remove irrelevant ismoving code.
MDL-43089 remove unneeded capabiltiy checks.

mod/quiz/edit.php requires this capability.
MDL-43089 remove an unused method.
Remove many unneeded globals.
MDL-43089 Fix editing max mark when quiz has been attempted.