learnweb / moodle-mod_moodleoverflow

:speech_balloon: Non-linear discussion module for Q&A forums
GNU General Public License v3.0
12 stars 22 forks source link

Bug - Teacher receives wrong notifications #167

Closed mdorferf closed 6 days ago

mdorferf commented 10 months ago

We have received feedback about a strange behavior regarding E-mail notifications: One of our teachers uses Moodleoverflow and E-mail notifications about new posts regularly in his course, but also received a notification from a Moodleoverflow activity in a course he was never enrolled in. The course triggering the incorrect notification is in a different course category and the teacher has no capabilities in that course. We can neither explain nor reproduce this bug. Do you have any hints or tips as to what could have caused this behavior?

mdorferf commented 10 months ago

Attached is a screenshot of the settings of the Moodleoverflow activity that caused a false notification. Settings of Moodleoverflow activity_231117

NinaHerrmann commented 10 months ago

sounds like capabilities might not be set correctly. Which moodleoverfloe version do you use?

mdorferf commented 10 months ago

Hi Nina, thank you for your quick reply! We are using the version 2023052200. Do you have any suggestions as to which capabilities we should take a closer look at?

NinaHerrmann commented 10 months ago

Hey @mdorferf - this is the version having the userstats feature right? I fear you have to update to 2023052201 and disable the feature. We did not have time to look into it, but it seems to break something.

ziegenberg commented 9 months ago

This only seems to happen to the digest mails.

NinaHerrmann commented 9 months ago

@TamaroWalter Could you check that?

TamaroWalter commented 9 months ago

Of course!

TamaroWalter commented 9 months ago

@mdorferf, @ziegenberg we checked your problem in our systems but everything seems working fine with the digest mails. Do you know how often the problem occured? My fastest advice would be to update moodleoverflow to a newer version.

mdorferf commented 8 months ago

@TamaroWalter Thank you for checking! We updated our moodloverflow activity to a newer version already but it still occurs in our system. We have three users who report to us regularly in tickets. The number of unreported cases is probably higher.

TamaroWalter commented 8 months ago

@mdorferf alright, then there must be a problem, I will try to find the error! You are using the new release v4.2-r4 right? What kind of database are you using?

NinaHerrmann commented 8 months ago

They are using 2023052200 which is v4.2-r1.

ziegenberg commented 8 months ago

As we have updated we are now running 2023082500 which is v4.2-r4 and the error still occurs.

mdorferf commented 5 months ago

@TamaroWalter Unfortunately, this error has occurred again with another person (role = teacher). May we ask if there is anything new about this issue?

NinaHerrmann commented 5 months ago

We are working on it in #176 If this is possible for you, you can include those lines to classes/task/send_daily_mail.php

if (!is_enrolled(\context_course::instance($row->courseid), $user->userid, '', true)) {
    continue;
}

(l.60 after assigning $currentcourse and before $currentforum) I am sorry for the really slow bug fix. We are currently very limited in our resources and therefore slower than usual.

mdorferf commented 5 months ago

Many thanks for the quick reply and the suggestion! I've already passed it on to our developers and we'll take a closer look at it.