In the grading interface (/mod/assign/view.php?id=2&action=grader) there was a rogue </span> with no opening <span>. Also changed <span><form> to <div><form> in included template fixing CiBoT HTML Validation error.