Bugfix on assignment preview funtion, added to editAssignment