MDL-44583 Assign: performance fixes

Conflicts:
	mod/assign/feedback/editpdf/locallib.php
	mod/assign/gradingtable.php