-
Bug
-
Resolution: Fixed
-
Minor
-
4.3.5, 4.4
-
2
-
Team Hedgehog 2024 Sprint 2.3, Team Hedgehog 2024 Review 2
Hi all,
When a teacher (permission: moodle/site:accessallgroups not allowed ) enrolled to only one course (setting: group mode: seperate groups , force group mode: yes), it's calendar wrongly shows the others overrides events even overlapped with its events , while teachers in more than one course shows a correct ovrieds groups events.
I checked the Code (find attached image), found that:
when $courseeventfrom (the number of courses which teacher enrolled) ==1 , then groups_get_all_groups bring all groups inside the course even the unrelated others groups,
here are the cenario:
Model 4.0.9 4.1 4.2 4.3
1- created 2 courses , C1 , C2 (setting: group mode: seperate groups , force group mode: yes)
2- created 2 teachers t1 , t2 (permission: moodle/site:accessallgroups not allowed )
3- created 2 students s1 , s2
4- inside C1, created 1 group G1 (t1, s1)
5- inside C2 created 2 groups G1(t1, s1) G2 (t2, s2)
6- C1 hase a quiz C1-Q1
7- C2 hase a quiz C2-Q1
8- teacher 1 (t1) added overrides groups C1-G1 event on C1-Q1
9- teacher 1 (t1) added overrides groups C2-G1 event on C2-Q1
then, when teacher 1 (t1 enrolled to C1 and C2) went to Dashboard, its calendar contains 4 Events(which is good and correct):
C1_Q1 - C1-G1 opens
C1_Q1 - C1-G1 close
C2_Q1 - C2-G1 opens
C2_Q1 - C2-G1 close
but when teacher t2 (t2 enrolled to C2 only) went to Dashboard, its Calendar shows a wrong events (the events of others group C2-G1 from course C2)
C2_Q1 - C2-G1 opens
C2_Q1 - C2-G1 close
10- if we enrolled teacher t2 to first course C1( now t2 enrolled to C1 and C2) : then t2 Dashboard Calendar shows Nothing( which is right and correct)