Message Module Improvement

Message Module Improvement

by Martin Smaxwil -
Number of replies: 46

Hi all.
We (TFH Bochum, Germany) have developed a little message module modification. On the condition not to change any core code, we tried to use existing features only changing the users interface. Feedback is welcome wink
Download the module here!

Click on a screenshot to enlarge.

Classic Version Modification Description
Contacts Tab
contacts_s.jpg Classic Version
  • Only online and offline contacts are displayed.
  • To write a message you have to use the 'message context' log.gif.
  • Blocked users (after click on the go.gif) are not shown. It’s virtually impossible (ultimately by means of fiddly workarounds) to ‘unblock’ a blocked user in the classic message component. mixed

Mod Version
  • Besides on-/offline buddies the blocked users are displayed and can be 'unblocked' with the stop.gif.
  • A click on the letter icon (message.gif) opens the 'new message' tab with the right recipient already filled in.
Search Interface
search_s.jpg Classic Version
  • For searching a written message you have to type in a keyword. If you do not remember a contained word you won't find any sent message. angry

Mod Version
  • Ths message search is nearly superfluous because of the inbox/outbox: see 'message view' below. But for a pointed search it's still convenient.
  • The person search was expanded to include now an auto-complete feature.
Message Search Results / Message View
msg-view_s.jpg Classic Version
  • After using the message search (see 'search interface' above), the search results are listed with sent / received messages shuffled.
  • The displayed results are not sortable.
  • To see a message you have to open the 'message context' log.gif.

Mod Version
  • Two new tabs for inbox and outbox
  • Messages are sortable by date (in ascending and descending order)
  • The message teaser is clickable

new-msg_s.jpg Mod Version
  • A 'new message' tab is available with auto-completion of adressees and the well known html-editor to compose a message.
  • Feature only for admins and trainers: Adress a message to all participants of your course! (in the classic version its a seven-click workaround: course -> participants -> show all -> mark all -> send message -> html-preview -> send)
  • The auto-completion feature is implemented as well.
Contact Search Results
contact-results_s.jpg Classic Version
  • To write a message you have to use the 'message context' log.gif.

Mod Version
  • A click on the letter icon (message.gif) opens the 'new message' tab with the right recipient already filled in.


Regards,
ML
Average of ratings: Useful (2)
In reply to Martin Smaxwil

Re: Message Module Improvement

by Ralf Brauckhoff -
Hallo,
it looks great!

But what means: "Apply the patches in 'patches' to your moodle installation"???

MfG
Ralf
In reply to Martin Smaxwil

Re: Message Module Improvement

by Will Cunningham -
I had the same question. I was wanting to know how to apply the patches. I believe you must have server access to accomplish this. Is there a way to include the modified files instead of having to apply the patches?
In reply to Will Cunningham

Re: Message Module Improvement

by Deleted user -
Why not have a moodle tree locally installed and apply patches locally, then transfer files back to teh server using tools like rsync?

Ries
In reply to Deleted user

Re: Message Module Improvement

by Will Cunningham -
There are a lot of people, including me that do not have the technical background to do as you suggest. Having the modded files would just be a simple approach to solve the problem.
In reply to Will Cunningham

Re: Message Module Improvement

by Will Cunningham -
I am trying to apply the patches by hand and because of my lack of knowledge I believe I am doing something wrong. I am trying to apply the changes to moodlelib.php and in the patch file it has this

@@ -1,4 +1,8 @@
+<<<<<<< moodlelib.php
+<?php // $Id: moodlelib.php,v 1.960.2.129 2009/05/01 08:06:08 dongsheng Exp $
+=======
<?php // $Id: moodlelib.php,v 1.960.2.132 2009-05-15 07:22:23 skodak Exp $
+>>>>>>> 1.960.2.132

From what I have read the information contained within the @@ tells where the changes are taking place and the + symbol means add. If there is no + or - then no change takes place. If I am reading that correctly then the changes to moodlelib.php are not making sense to me.

If I add everything just the it says then Moodle breaks.

Tips? Suggestions? The files already patched smile
In reply to Will Cunningham

Re: Message Module Improvement

by Deleted user -
Honestly I would suggest not to apply even files within Moodle, patches or not.

There are some great tools for OSX, Windows and Linux that can automate this process with a click on a button.

Ries
In reply to Deleted user

Re: Message Module Improvement

by Will Cunningham -
My problem is I am not the server admin for my Moodle install. I however have access to ftp and I am the admin on the Moodle.

I have been reading through the suggestions so far. I installed NetBeans and was trying to patch the files using its interface. The patch worked on view.php but not on moodlelib.php.

I am pretty new to server side applications, so I am a little lost.
In reply to Martin Smaxwil

Re: Message Module Improvement

by Stuart Mealor -
Hi Martin

These certainly appear to be useful enhancements !

If the code is compatible with core code then maybe we should be considering putting this into Moodle 2?

I think people expect a lot from Messaging apps/modules these days, so anything that can help give the Messaging module a 'face-lift', and increased functionality + enhanced usability is good news ! smile

Stu
In reply to Stuart Mealor

Re: Message Module Improvement

by Martin Smaxwil -
hi all.

if the ready-patched php-files are not helpful, pls contact our developer (martin hermsen) for support.

@stu and dear (core) developers - pls feel free to use this message mod for moodle 2.0 - that's the idea of open source, isn't? wink

we'll leave a post in the developer forum...

regards, ml
In reply to Martin Smaxwil

Re: Message Module Improvement

by Martin Hermsen -
Hello,

i have applied the Patches to the latest checkout (1.9.5). Please check out the Readme.txt for the folders.

There is also a newer version with cleaned Patches.


regards martin
In reply to Martin Hermsen

Re: Message Module Improvement

by Will Cunningham -
I got everything up and working. I just had to stop being so dense. One I slowed down and read through the patches and learned a little I was able to make the modifications.

I have a couple of questions though....

The changes made to fix the size of the window seems to have no effect on my install. I have tried editing the size in the line: tab=newmsg but it is still staying the same size. Could there be another parameter somewhere that is overriding it?

Second, the new interface is wonderful and my students love it. They have asked me if there is a way to reply to a message that was sent to them. I didn't understand so I looked into it.

When a user clicks on the teaser/message it takes them to message history, and they can not reply there. Is this an error on my part or is something missing?
In reply to Martin Hermsen

Re: Message Module Improvement

by Heidi Peter -

Hi Martin,

i downloaded the message module improvement from Martin Lukas at the beginning of this thread. I installed the files on my localhost with moodle 1.9.5+ and replaced them with the existing files. The thing i did not do, because i did not understand it: "Apply the patches in 'patches' to your moodle installation" Can you or Martin Lukas explain this a little bit more extensive how to do that?

Then i found your cleaned patches, downloaded them and installed them to the required folders. After that, i got this error message:

Fatal error: Cannot redeclare get_fast_modinfo() (previously declared in C:\xampp\htdocs\moodle\course\lib.php:1058) in C:\xampp\htdocs\moodle\lib\moodlelib.php on line 2840

What is missing? The patches? How can i do that?

Regards, Heidi


In reply to Heidi Peter

Re: Message Module Improvement

by Heidi Peter -

it seems to be a great improvement, but when i put it on my moodle 1.9.5+ it looks really strange. Any suggestions how i can "repair" that?

Regards, Heidi

Attachment strange.JPG
In reply to Martin Hermsen

Re: Message Module Improvement

by ces moce -
Hello

After applying the module message Module Improvement and the file include in Martin Hermsen post i have the following error..

Fatal error: Cannot redeclare get_fast_modinfo() (previously declared in C:\wamp\www\moodletest\course\lib.php:1058) in C:\wamp\www\moodletest\lib\moodlelib.php on line 2840

Do some body has a easy and good installation process for this message module?
In reply to ces moce

Re: Message Module Improvement

by Martin Hermsen -
Hello,

i will check the files, but i think you use a file which is not compatible with your installation.

have you got jabber or something similar ?


regards mh
In reply to Martin Hermsen

Re: Message Module Improvement

by Heidi Peter -

Hi Martin,

thanks for your answer, but i don`t have jabber or something similar,

regards, heidi

In reply to Heidi Peter

Re: Message Module Improvement

by Martin Hermsen -
hello,

i'm actually making some improvements. I think i will change the code, so that you can use the module without any patches (or only one).
So everybody can install it easiely.

I will release it in some days.


regards martin
In reply to Martin Hermsen

Re: Message Module Improvement

by Will Cunningham -
I have been going through the code, (not a programmer) and trying to make it so a student could reply to a message sent to them. I do not know if I did something wrong with the patching or if it is a feature that is not available. I was trying to make it so the link to the message wouldn't take them to message history or add a reply button in the message history window.

Well needless to say I was unsuccessful.

So just a suggestion, make it so students can reply to specific messages rather than having to go to the write tab to reply.
In reply to Will Cunningham

Re: Message Module Improvement

by Martin Hermsen -
hello,

ok, a reply button is no bad idea, i will add it too ;)

regards martin
In reply to Martin Hermsen

Re: Message Module Improvement

by Heidi Peter -

Hi Martin, i like this improvement, the pictures at the beginning of this thread promise a lot and it would be gorgeous if this would work. Good luck for further code change lächelnd.

Regards, Heidi

In reply to Will Cunningham

Re: Message Module Improvement

by Martin Hermsen -
hello,

there is a new Version, which has only one Patch, an some other Fixes. Please read the README for further informations.

regards martin
In reply to Martin Hermsen

Re: Message Module Improvement

by Ralf Brauckhoff -
Hallo,

the Download-Link says:

"Entry is not approved yet"

MfG
Ralf Brauckhoff
In reply to Martin Hermsen

Re: Message Module Improvement

by ces moce -
how do we apply the patches, it is unclear to me as i never had to do so

(Apply the patches in 'patches' to your moodle installation)
In reply to ces moce

Re: Message Module Improvement

by Martin Hermsen -
Hello,

there is an explanation at the moodle wiki for the patches.

But i think i will need no patches in the next version, it will take some weeks, because i have not much time.


regard martin
In reply to Martin Hermsen

Re: Message Module Improvement

by Heidi Peter -
Hi Martin,

first of all, thanks for this great improvement, really fine stuff.
Using it in Moodle 1.9.5+ i have a problem with the messages. They are not shown in the popupwindow sadalthough i can see them in Firebug (can be seen in the posted picture). May be some modifications have to be done in moodle/message/history.php? May be you can help?
Regards, Heidi
Attachment no_messages_seen.jpg
In reply to Heidi Peter

Re: Message Module Improvement

by Martin Hermsen -
ok i will check it.
In reply to Martin Hermsen

Re: Message Module Improvement

by Heidi Peter -

Hi Martin,

after installing the message module improvement, i got some more problems, may be you can fix them, too?

  • the improvement collides with the Contacts-Block in IE7. Users in the contacts-block are shown, but also a red cross. In Mozilla it is o.k.
  • clicking on "select user" or "select group", it ist not possible to select a user or group. Inserting a user- or groupname in the field/box opens a list of the group/users of the moodle platform and it is possible to select the needed group. But:
  • Isn`t it a little bit precarious if a user can send messages to any group and is not a member of this special group? should`t the group asked before getting messages from any user? Or isn`t it better to ask the user "Do you want to become a member of this group?", before allowing him to send messages?

Regards, Heidi

In reply to Heidi Peter

Re: Message Module Improvement

by Martin Hermsen -
Hi Heidi,

The selection is so ok, because not every user clicked on "select user" so i changed it


You are admin right ? So you see all courses, test it with an student or an teacher ;) Then you will see it depends on user roles, and the question isn't needed


Regards, Martin
In reply to Martin Hermsen

Re: Message Module Improvement

by Iradj Teymurian -
Hi Martin,

where can I download the latest version? Stands in readme file: "Add the lines from your language to 'moodledate / lang / _your_lang_ / message.php". I can not find the place where I should make this entry.

Thank you in advance for your feedback.
Iradj
In reply to Iradj Teymurian

Re: Message Module Improvement

by Martin Smaxwil -
for all who have installed a language pack when installing moodle:
  • language packs are stored in the `moodledata`-folder (of course it must be an A instead of an E gemischt).
  • for every langunage there is an subfolder (i.e. de_utf8 or en_utf8).
  • open the 'message.php' and copy-paste the lines from the downloaded message.php to your file. you can place the lines wherever you want - at its end or on top, they only contain the missing words for the `new` frontend.
  • save, close.
maybe you have not downloaded a language pack when installing moodle:
  • check the \\[yourserver]\moodle\lang\ -folder
  • there you´ll find your 'message.php'
  • add the lines by c´n´p.
  • save, close.
regards, ML

p.s.: the download-links from the module-site (http://moodle.org/mod/data/view.php?rid=2899) sometimes do not work for a couple of hours, everytime when we upload a 'new latest version'...
In reply to Martin Hermsen

Re: Message Module Improvement

by Heidi Peter -
Hi Martin,
did you check this problem? Maybe a solution?
Regards,
Heidi
In reply to Heidi Peter

Re: Message Module Improvement

by Heidi Peter -
For everybody, who has the same problems. I found the solution: The Message Modul Improvement collides with the contacts-block that is available as an extra module. The styles.php has to be changed to:

.block_contacts .note, .link .remove, .link .history
{
display:inline;
}

After changing that line, the messages are shown correct.

Regards,
Heidi

In reply to ces moce

Re: Message Module Improvement

by Mia Matisse -


Fatal error: Cannot redeclare get_fast_modinfo() (previously declared in /home/elevatei/public_html/course/lib.php:1032) in /home/elevatei/public_html/lib/moodlelib.php on line 2840

How can this be resolved? The site is now down.

In reply to Martin Smaxwil

Re: Message Module Improvement

by José Ángel Polo -

I can not see the messages, nor the historical messages with other users, although I find it when I use the search function.

Can you help me, please?

Attachment dontdisplaymessage.jpg
In reply to José Ángel Polo

Re: Message Module Improvement - i need a delete message button!!

by Heidi Peter -

Hi all,

we are using this message module improvement and it works pretty well. But now, the messages are too much and we would like to be able to delete messages. How can that be realised? Maybe somebody has an idea and can help?

Regards,

Heidi

In reply to Heidi Peter

Re: Message Module Improvement - i need a delete message button!!

by Greg Jeffrey -

We get quite a few inappropriate messages on our system unfortunately.  I use the phpMyAdmin plugin http://moodle.org/mod/data/view.php?d=13&rid=448&filter=1 to search/delete/modify.  Sadly a few of our students have a high proportion of "Inappropriate message removed" entries now.  Here's hopeing they get the hint!
That's not a lot of help if you were specifically looking to delete a large quantity of messages but...  may be helpful?

In reply to Martin Smaxwil

Re: Message Module Improvement

by Matt Long -

Hi, I just set up the module using the English version on Moodle 1.9.12. It looks great, and these are features that Moodle 1.9 desperately needed! I did notice a couple of things:

First, when I search for contacts, there is a bit of untranslated text. The results display the message 'Mitteilung senden' rather than 'Send a message'.

Second, the styling is a bit off with the up/down arrows near 'Time Sent' on the 'inbox' tab. The down arrow (descending order) appears after the word 'Sent', but the up arrow (ascending order) appears below the letter S in the word 'Sent'. (I haven't installed the Contacts block).

Sorry I can't send a screenshot of this. I'm testing it out remotely on a server and am having trouble capturing the screen.

In reply to Matt Long

Re: Message Module Improvement

by Matt Long -

Okay, I think I've fixed this. A couple of corrections were made:

1.) A few lines of untranslated text from the original were translated to English.

2.) Three of the tabs (Inbox, Outbox, and Write) were capitalized, along with a few other words here and there as needed.

3.) 'Time Sent' was shortened to 'Time' so that the message window displays the up/down arrows correctly. (An additional string variable was added to message.php so that the core Moodle code would remain unmodified).

I would be happy to upload a copy of the modified files/folders if that would be useful for others using this in English (and if the developers are okay with me doing that wink). (Specifically, the 'message' subdirectory from the root of the site and the 'message.php' file from the lang\en_utf8 folder were modified. The patch file does not need modification).

Love the module! Thanks for your hard work and for making this available to the community! We haven't tested out Moodle 2 yet since importing courses is still an issue, but I'm really hoping they have incorporated something similar to this in the new version.

In reply to Martin Smaxwil

Re: Message Module Improvement

by Florian Schneider -

Hi!

First at all - nice plugin! We would like to use it with our Moodle, but unfortunately its only available for moodle 1.9 - we already use 2.0.2.

Are there any plans to port the patch to Moodle2? Because the messaging subsystem of Moodle2 still has the same usability issues as 1.9, the new implemented features are nice but they do not fix the really important problems (in my opinion). Maybe we should start a new proposal to include changes like these into the moodle core?

Best Regards, Florian

In reply to Martin Smaxwil

Re: Message Module Improvement

by Julia fil -

Hi!

We updated the sever with php (version 5.3), but Moodle version is still 1.9.5. After update in Message Moodle the tab=newmsg is empty and also tab=send! 

Have you any hints what's wrongh?

Thank you.

Attachment message.png