Alerts/Messages count not updating (2.7)

Alerts/Messages count not updating (2.7)

by Frances Angulo -
Number of replies: 6

All users across my Moodle site are seeing messages/alerts that permanently remain long after the messages have been read (weeks) Anybody experience something like this? 


Average of ratings: -
In reply to Frances Angulo

Re: Alerts/Messages count not updating (2.7)

by Torsten Händler -

You use the elegance theme and this is a problem, the elegence theme show all messages read and not read.

In the php code is a mistake so that it will not show all messages.

I've had the same problem and change the code, that only new messages will be shown.

In reply to Torsten Händler

Re: Alerts/Messages count not updating (2.7)

by Frances Angulo -

Do you remember where the change has to be made and what the correct code should be?

In reply to Frances Angulo

Re: Alerts/Messages count not updating (2.7)

by Torsten Händler -

go to yourmoodle/theme/elegance/renderes/core_renderer.php

search for "protected function get_user_messages()"

there is 

$maxmessages = 5;  

change it to the value you want but its only for old messages so that only max 5 old messages will display.


for ne messages there is a line 

    foreach ($readmessages as $message) {

            $messagelist[] = $this->bootstrap_process_message($message, 'old');

        }


uncomment it


        /*foreach ($readmessages as $message) {

            $messagelist[] = $this->bootstrap_process_message($message, 'old');

        }*/

so only new messages wil be displayed.



In reply to Torsten Händler

Re: Alerts/Messages count not updating (2.7)

by Frances Angulo -

Do you remember where the change has to be made and what the correct code should be?