Unread messages are not displayed in front page and the messages page is empty

Issue #562 resolved
Info 3bits created an issue

Several users from the moodle forum reported issues with unread messages.

The bubble is not displayed near the top messages menu and the messages page is empty. Moodle en Español  Adaptable  nuevo tema para moodle.png

Comments (11)

  1. comete-upn

    We have the same problem with students and teachers. Changing the theme fix it.

    I have a temporary fix FOR THE EMPTY PAGE, but I don't understand what's going on. In the file www/message/index.php I just add some text right before the box_start, but it has to be something visible, not an anchor. So I add a non-breakable space…

    echo ' '; // added
    echo $OUTPUT->box_start('message');
    

    Hope this helps.

  2. Info 3bits reporter

    We are reviewing the code and can't find the origin of the problem. <What we know is that is working well for admin but not for other roles: manager, teacher or student. The code has no restrictions by roles.

    This issue was reported from latest version after PR #19 adding an option to remove the message menu from header.

    But the code has been verified and not direct relationship at first sight.

  3. Jeremy Hopkins

    Look at code on line 569 of renderes.php where sql is built for getting messages, there is a condition in that sql to exclude messages from admin:

    AND useridfrom > 2

    That was added to stop junk system messages going to users but also means that anyone testing or using an admin account will find their messages do not display.

    I never noticed this as we do not use the default admin account on user id 2.

    If for now you just want to delete that line that is ok, but I will need to add a setting as for us we do actually want that rule in there.

  4. Jeremy Hopkins

    Fix #562

    Add setting to filter admin messages. Previously this was hard coded meaning messages sent by the admin account were not visible to other users.

    This has been left as a setting for the time being due to automated messages being sent from admin which users do not always want to see in the message bubble.

    A better solution would have been to use Moodles own methods for getting messages as opposed to a direct database query, however with messages and notifications alerts becoming core features of Moodle 3.2 it would be better to concentrate on bringing those featuers into Adaptable at which point all internal messaging code should be removed.

    → <<cset 84aa2a8d0f7b>>

  5. Jeremy Hopkins
    • changed status to open

    Re opening for review after making commit to resolve issue with bubble not displaying messages sent from admin account.

    This commit did not address issue with messages page not rendering which I was not able to replicate.

  6. Former user Account Deleted

    Hi this message says that this issue is fixed, but I still have the problem on my Moodle site. I have the latest version of the plugin, checked all flags, and still my students cannot see the messages. Thank you. Michele

  7. Log in to comment