Allow groupdistribution if there are two groups

Shows an error instead of the modedit form if there are only two
groups in a course.