Test on clean and boost themes.
Log in as admin.
Make sure you have at least 2 courses, with two groups on each course:
Course 1 (Group A, Group B)
Course 2 (Group C, Group D)
Go to calendar and click New event button.
Make sure you do not see two course select elements.
Select Group on Type of event field.
Make sure you see just one course select and one group select .
Select Course 1 on Course field
Make sure you see the correct groups for Course 1 : Group A, Group B
Select Course 2 on Course field
Make sure you see the correct groups for Course 2 : Group C, Group D
See attached screenshot.
If I am enrolled in a course with a group
When I click on New Event
I currently see two Course select boxes.
Potential solution is to use the new hideIf syntax that was recently introduced to formslib.