Fix for assignment form group bug

Also added a check for the min/max group members values (ensures that min <= max).

This deals with the bug discovered yesterday from issue https://github.com/MarkUsProject/Markus/issues/1571.

This does not reintroduce the bug fixed in PR https://github.com/MarkUsProject/Markus/pull/1523.