MDL-38655: mod_assign: Use correct ordering on cap checks for submission downloads

Conflicts:
	mod/assign/locallib.php