GibbonEdu/core

Notify all class participants not working

Closed this issue · 9 comments

Describe the bug
Notify all class participants checkbox does not produce any notifications. This was working a couple of versions ago. Has any notification code changed recently?

To Reproduce

  1. Go to any lesson plan
  2. Click Edit
  3. Click Notify all class participants checkbox
  4. No error is reported but no notifications show up in Notifications so it is something internal to Gibbon rather than being an external email problem.

Screenshot 2021-03-15 at 8 11 00 pm

Your System
Cutting edge Gibbon 22
Screenshot 2021-03-15 at 8 22 03 pm

Hi FV. Hmm, this is interesting. I've just tested it locally with v22 and it appears to be working. As a note, it sends a notification rather than a message wall post. These notifications would be sent directly to anyone enrolled in the class for that lesson (and not set to Left). If you have email setup, it'll send an email as well as appear in the notifications tray for that user.

Screenshot 2021-03-16 at 11 46 40 AM

I wonder, are you seeing this in a production server, a local server, or both?

Hello Sandra! I am seeing it in both my production and test systems. :(

Hmm, that's odd. I don't see any recent changes to the script that could be the culprit, and my local tests worked.

Can you check your PHP error logs to see if there's anything in there? Then, if you have a database tool like phpMyAdmin or Sequel Ace, check the tail end of the gibbonNotification table to see if the notifications are being created.

In my test server the notification table shows:

0000000001	0000001388	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000002	0000001391	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000003	0000001374	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000004	0000001399	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000005	0000002306	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000006	0000001400	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000007	0000002357	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000008	0000002444	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000009	0000002407	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000010	0000001483	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000011	0000001427	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000012	0000001845	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000013	0000001396	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000014	0000001571	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000015	0000001358	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000016	0000001471	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01
0000000017	0000001352	New	0009	1	Lesson “1” has been updated.	/index.php?q=/modules/Planner/planner_view_full.php&gibbonPlannerEntryID=00000000000006&viewBy=class&gibbonCourseClassID=00002327	2021-03-16 00:37:01

But no notifications appear in the Home > Notifications. The user is associated with the class (teacher) so it should be working.

Thanks for your help! (SequelAce is an interesting tool!)

Sorry, I forgot to say that the php log shows no errors.

Hmm, it looks like by all accounts there isn't an error, the notifications were created successfully.

You've mentioned the user associated with the class is the teacher. Is that also the person making the edits and triggering the notification? The person who made the edits doesn't receive the notification, because they're already aware of the edits since they made them.

Well, it appears I am suffering from brain overload. I am forgetting how my own code works! Sorry for the trouble!

No worries at all, we've all been there 😅