Affects Version/s: 3.4.4, 3.5.1, 3.6
Fix Version/s: None
- Create courses A and B.
- Enrol user T as teacher into courses A and B.
- In course A set group mode to "Separate groups".
- In course A create groups 1 and 2.
- Add user T to group 1.
As user T:
As admin: Create courses A and B. Enrol user T as teacher into courses A and B. In course A set group mode to "Separate groups". In course A create groups 1 and 2. Add user T to group 1. As user T: Go to the calendar. Select "All courses". Create a group event E for course A group 1. => You see event E. Create a group event F for course A group 2. => You don't see event F. => This is confusing. Select course A in the course dropdown. => You see both events E and F.
- Go to the calendar.
- Select "All courses".
- Create a group event E for course A group 1.
=> You see event E.
- Create a group event F for course A group 2.
=> You don't see event F.
=> This is confusing.
- Select course A in the course dropdown.
=> You see both events E and F.
The workaround is viewing a single course in the calendar. Then you always see all group events of it given you have one of the necessary capabilities.
Affected Branches:MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
Pull from Repository:
Pull 3.5 Branch:MDL-63291_35
Pull Master Branch:MDL-63291_master
Pull Master Diff URL:
I've asked about this in the calendar forum, but haven't received any answer there for over three weeks. Therefore I created an issue for it hoping I can get some feedback this way.
The problem is this: If you have permission to view all groups in a course you should see all group events for that course in your calendar. However, you only see all group events if displaying a single course in your calendar, i.e. you either select one of your courses from the dropdown menu or you're only enrolled in a single course. Otherwise if you're viewing your calendar with "All courses" selected in the course dropdown, you only see group events of groups that you're a member of.
This can be really confusing if you're a teacher and want to create group events: If you have the calendar with "All courses" open and create a group event (without being in that group yourself) you don't see the newly created event. So you have to know that you have to select the respective course from the course dropdown to see the newly created group event.
This is where the problem lies in the code: https://github.com/moodle/moodle/blob/175b3708c92f3f19529ccab62dcc196c46ba6423/calendar/lib.php#L2082
This is the commit that introduced it: https://github.com/moodle/moodle/commit/7fd5786e6f24db2a6c702062705e33bef514bbac#diff-3762eee05a549dc356ad7f041fdf86f2
And this is the Tracker Issue for it: https://tracker.moodle.org/browse/MDL-28557
It's not clear to me why exactly it should work like this as it can be very confusing. My suggestion would be to show all group events for all of your courses if you are a teacher viewing your calendar and have "All courses" selected.