Considerations regarding the registration of optional subjects:
The enrollment is always individual by subject.
The regulations do not allow enrolling electives of a course, if at least it has not passed or enrolled a subject in that course
As a corollary, you can not eliminate a compulsory subject from a course, if it is the last of that course and there are electives enrolled in the same course.
In the electives, the subgroup change is always enabled.It will only be prevented by the fact that there are no other subgroups with available places.