Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10107

META: New Messaging System (GSoC)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0
    • Component/s: Messages
    • Labels:
      None

      Description

      Google SoC messaging system improvements.

        Gliffy Diagrams

          Attachments

          1. version1.diff
            46 kB
          2. version2.diff
            81 kB
          3. version3.diff
            82 kB

            Issue Links

              Activity

              lfrodrigues Luis Rodrigues created issue -
              dougiamas Martin Dougiamas made changes -
              Field Original Value New Value
              Assignee Martin Dougiamas [ dougiamas ] Luis Rodrigues [ lfrodrigues ]
              lfrodrigues Luis Rodrigues made changes -
              Summary New Messaging System META: New Messaging System (GSoC)
              Hide
              lfrodrigues Luis Rodrigues added a comment -

              This is the first version of changes I've made to create the new message system.

              Show
              lfrodrigues Luis Rodrigues added a comment - This is the first version of changes I've made to create the new message system.
              lfrodrigues Luis Rodrigues made changes -
              Attachment version1.diff [ 11430 ]
              lfrodrigues Luis Rodrigues made changes -
              Attachment version2.diff [ 11431 ]
              lfrodrigues Luis Rodrigues made changes -
              Attachment version3.diff [ 11432 ]
              Hide
              aborrow Anthony Borrow added a comment -

              Luis - I know that messaging is a popular feature among our students (and faculty). The work on improving messaging is thus very exciting. Thank you for your efforts and for participating in the GSoC. In the documentation it states: "As a teacher, you want to send different messages at the same time to many students. There should be an option, where teacher selects many individual student or a group of students or the entire class, types in the individual messages next to the student name, and does a one click send to all". In order to do this, it would be nice if there were a similar/consistent interface similar to what we have for the participant list whereby a teacher can select the students and then send a bulk message. The two obvious places (just because I use these activities the most) is the \mod\assignment\submissions.php page and the mod\quiz\attempts.php page. Will this be "fixable" under this tracker issue or should I create separate issues for the assignment and quiz modules? Peace - Anthony

              Show
              aborrow Anthony Borrow added a comment - Luis - I know that messaging is a popular feature among our students (and faculty). The work on improving messaging is thus very exciting. Thank you for your efforts and for participating in the GSoC. In the documentation it states: "As a teacher, you want to send different messages at the same time to many students. There should be an option, where teacher selects many individual student or a group of students or the entire class, types in the individual messages next to the student name, and does a one click send to all". In order to do this, it would be nice if there were a similar/consistent interface similar to what we have for the participant list whereby a teacher can select the students and then send a bulk message. The two obvious places (just because I use these activities the most) is the \mod\assignment\submissions.php page and the mod\quiz\attempts.php page. Will this be "fixable" under this tracker issue or should I create separate issues for the assignment and quiz modules? Peace - Anthony
              Hide
              bryce Bryce Thornton added a comment -

              This is Martin's comment regarding the inclusion of this work in Moodle 1.9 (taken from http://moodle.org/mod/forum/discuss.php?d=76255):

              Yes, the move to using Events to pipe all mail through one system and the ability to decide how to redirect messages based on plugins will almost certainly be in 1.9. The new YUI-based interface may not, we'll see.

              Show
              bryce Bryce Thornton added a comment - This is Martin's comment regarding the inclusion of this work in Moodle 1.9 (taken from http://moodle.org/mod/forum/discuss.php?d=76255): Yes, the move to using Events to pipe all mail through one system and the ability to decide how to redirect messages based on plugins will almost certainly be in 1.9. The new YUI-based interface may not, we'll see.
              Hide
              mattgibson Matt Gibson added a comment -

              What's the status of this? Is any code in a usable state?

              Show
              mattgibson Matt Gibson added a comment - What's the status of this? Is any code in a usable state?
              Hide
              lfrodrigues Luis Rodrigues added a comment -

              There is a new message brocker and new message/chat window in YUI.

              I'm waiting for Martin to merge it.

              Show
              lfrodrigues Luis Rodrigues added a comment - There is a new message brocker and new message/chat window in YUI. I'm waiting for Martin to merge it.
              Hide
              mattgibson Matt Gibson added a comment -

              Great! Thanks for all your work on this. Are there patches/zip files available, or is it impossible to use the new system until Martin does further work to integrate it?

              Show
              mattgibson Matt Gibson added a comment - Great! Thanks for all your work on this. Are there patches/zip files available, or is it impossible to use the new system until Martin does further work to integrate it?
              Hide
              lfrodrigues Luis Rodrigues added a comment -

              It's not impossible but it would be a lot of work.

              Just wait a couple of weeks

              Show
              lfrodrigues Luis Rodrigues added a comment - It's not impossible but it would be a lot of work. Just wait a couple of weeks
              Hide
              dougiamas Martin Dougiamas added a comment -

              Note: this code is all available here: http://cvs.moodle.org/contrib/patches/messaging_v2/

              Work continues on getting it into Moodle core in 2008: http://docs.moodle.org/en/Development:Messaging_2.0

              Show
              dougiamas Martin Dougiamas added a comment - Note: this code is all available here: http://cvs.moodle.org/contrib/patches/messaging_v2/ Work continues on getting it into Moodle core in 2008: http://docs.moodle.org/en/Development:Messaging_2.0
              Hide
              dougiamas Martin Dougiamas added a comment -

              This code is now HEAD. There's more reviewing and polishing to do yet, but it'll be faster now!

              Show
              dougiamas Martin Dougiamas added a comment - This code is now HEAD. There's more reviewing and polishing to do yet, but it'll be faster now!
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Huge patch! Looks promising! B-)

              Two comments that come to my mind while looking:

              1) Is supposed that each user is going to be able to specify:

              a) one preferred notification method for the whole moodle server.
              b) more than one (simultaneous) notification methods for the whole moodle server.
              c) one preferred notification method for each communication facility (forum posts, messaging, alert emails...)
              d) more than one (simultaneous) notification methods for each communication facility

              Obviously the more complete is d) where each user can say how he wants to be notified for each facility. mail for forum posts, jabber for messaging, sms for grades... all them supporting multiples (jabber and sms for grades).

              2) The "jabberclass" library... could it go to /lib ? I can imagine other parts of moodle being able to communicate with jabber server... say chat module (new type of, like the daemon one) or so.

              Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Huge patch! Looks promising! B-) Two comments that come to my mind while looking: 1) Is supposed that each user is going to be able to specify: a) one preferred notification method for the whole moodle server. b) more than one (simultaneous) notification methods for the whole moodle server. c) one preferred notification method for each communication facility (forum posts, messaging, alert emails...) d) more than one (simultaneous) notification methods for each communication facility Obviously the more complete is d) where each user can say how he wants to be notified for each facility. mail for forum posts, jabber for messaging, sms for grades... all them supporting multiples (jabber and sms for grades). 2) The "jabberclass" library... could it go to /lib ? I can imagine other parts of moodle being able to communicate with jabber server... say chat module (new type of, like the daemon one) or so. Ciao
              Hide
              lfrodrigues Luis Rodrigues added a comment -

              Hello,

              1)
              a-ok I'm redoing the user messaging preferences form to make it simpler. This will be considered
              b-that already exists, the user may specify with processor he/she wants to use
              c-all the communication methods register as providers, the user then chooses the type notification per provider
              d-also done

              2) I still need to think about the best way to use the jabber class since, now for each message it needs to connect and login to the server (the connection should be at least cached)

              Tx for the comments

              Show
              lfrodrigues Luis Rodrigues added a comment - Hello, 1) a-ok I'm redoing the user messaging preferences form to make it simpler. This will be considered b-that already exists, the user may specify with processor he/she wants to use c-all the communication methods register as providers, the user then chooses the type notification per provider d-also done 2) I still need to think about the best way to use the jabber class since, now for each message it needs to connect and login to the server (the connection should be at least cached) Tx for the comments
              dougiamas Martin Dougiamas made changes -
              Fix Version/s 2.0 [ 10122 ]
              Hide
              dougiamas Martin Dougiamas added a comment - - edited

              After more looking at this, there's some more basic stuff we need to do, sorry.

              1) We need to support more types of messages, more than one per module. So I think we need to change the message_providers table to have:
              id, name, component, capability
              The capability lets us restrict display of certain message types to certain people (eg some will be for admins only), it'll be checked at system level. We can derive the proper string name from these the same way capabilities do (see get_capability_string), by looking in the component language file for a string derived from the name. eg look in forum.php for "message:posts" and "message:digests"

              2) The use of events to register/unregister the providers has turned out to be a bad idea, since they are not really events. Also in the lib/db/install.php there is a hardcoded insert into the database which there should not be. So we need to remove those forum_install() type functions and the hardcoded data in lib/db, and instead we should move to using db/messages.php files, which look very similar to lib/db/access.php and lib/db/events.php files and work the same way. This way it'll be easy to add/remove message types at any time.

              eg in lib/db/messages.php

              $messages = array (
              'moodle:system' => array (
              'capability' => 'moodle/site:config'
              ),

              'moodle:errors' => array (
              'capability' => 'moodle/site:config'
              )
              );

              and mod/forum/db/messages.php

              $messages = array (
              'mod/forum:posts' => array (),

              'mod/forum:digests' => array()
              );

              Show
              dougiamas Martin Dougiamas added a comment - - edited After more looking at this, there's some more basic stuff we need to do, sorry. 1) We need to support more types of messages, more than one per module. So I think we need to change the message_providers table to have: id, name, component, capability The capability lets us restrict display of certain message types to certain people (eg some will be for admins only), it'll be checked at system level. We can derive the proper string name from these the same way capabilities do (see get_capability_string), by looking in the component language file for a string derived from the name. eg look in forum.php for "message:posts" and "message:digests" 2) The use of events to register/unregister the providers has turned out to be a bad idea, since they are not really events. Also in the lib/db/install.php there is a hardcoded insert into the database which there should not be. So we need to remove those forum_install() type functions and the hardcoded data in lib/db, and instead we should move to using db/messages.php files, which look very similar to lib/db/access.php and lib/db/events.php files and work the same way. This way it'll be easy to add/remove message types at any time. eg in lib/db/messages.php $messages = array ( 'moodle:system' => array ( 'capability' => 'moodle/site:config' ), 'moodle:errors' => array ( 'capability' => 'moodle/site:config' ) ); and mod/forum/db/messages.php $messages = array ( 'mod/forum:posts' => array (), 'mod/forum:digests' => array() );
              Hide
              dougiamas Martin Dougiamas added a comment -

              I'm actually working on this right now...

              Show
              dougiamas Martin Dougiamas added a comment - I'm actually working on this right now...
              Hide
              dougiamas Martin Dougiamas added a comment -

              OK, I've checked in these changes, as described above. The only difference is that the names don't contain the full path any more.

              eg http://cvs.moodle.org/moodle/mod/forum/db/messages.php

              Luiz, can you now complete the other modules in the same way? Note that the objects passed to events_trigger need to contain these two parameters for component and name:

              $eventdata = new object();
              $eventdata->component = 'mod/forum';
              $eventdata->name = 'digests';
              $eventdata->userfrom = $site->shortname;
              $eventdata->userto = $userto;
              $eventdata->subject = $postsubject;
              $eventdata->fullmessage = $posttext;
              $eventdata->fullmessageformat = FORMAT_PLAIN;
              $eventdata->fullmessagehtml = $posthtml;
              $eventdata->smallmessage = '';

              Show
              dougiamas Martin Dougiamas added a comment - OK, I've checked in these changes, as described above. The only difference is that the names don't contain the full path any more. eg http://cvs.moodle.org/moodle/mod/forum/db/messages.php Luiz, can you now complete the other modules in the same way? Note that the objects passed to events_trigger need to contain these two parameters for component and name: $eventdata = new object(); $eventdata->component = 'mod/forum'; $eventdata->name = 'digests'; $eventdata->userfrom = $site->shortname; $eventdata->userto = $userto; $eventdata->subject = $postsubject; $eventdata->fullmessage = $posttext; $eventdata->fullmessageformat = FORMAT_PLAIN; $eventdata->fullmessagehtml = $posthtml; $eventdata->smallmessage = '';
              Hide
              dougiamas Martin Dougiamas added a comment -

              Can you also keep working on message/edit.php and message/edit_form.php ? .... the variables are not named exactly right yet and need to be fixed.

              Show
              dougiamas Martin Dougiamas added a comment - Can you also keep working on message/edit.php and message/edit_form.php ? .... the variables are not named exactly right yet and need to be fixed.
              Hide
              lfrodrigues Luis Rodrigues added a comment -

              Working on completing them and on new edit_form.

              Show
              lfrodrigues Luis Rodrigues added a comment - Working on completing them and on new edit_form.
              Hide
              lfrodrigues Luis Rodrigues added a comment -

              Martin I just uploaded a mockup for edit. Please check and tell me what you think.

              It's on message/edit2.php

              Show
              lfrodrigues Luis Rodrigues added a comment - Martin I just uploaded a mockup for edit. Please check and tell me what you think. It's on message/edit2.php
              lfrodrigues Luis Rodrigues made changes -
              Link This issue is blocked by MDL-15900 [ MDL-15900 ]
              Hide
              jrh18 Jason Hardin added a comment -

              Is this moving forward at all? Moodlerooms would liek to consider implementing this in Moodle .19 and then adding it to 2.0 as well.

              Show
              jrh18 Jason Hardin added a comment - Is this moving forward at all? Moodlerooms would liek to consider implementing this in Moodle .19 and then adding it to 2.0 as well.
              Hide
              dougiamas Martin Dougiamas added a comment - - edited

              Jason, can you be explicit about which part are you referring to? The basic messaging API is all there in 2.0 already.

              I wouldn't think this would be easy to port to 1.9 (and due to restrictions on what we can add in the core stable branch, it couldn't go in 1.9.x anyway).

              Show
              dougiamas Martin Dougiamas added a comment - - edited Jason, can you be explicit about which part are you referring to? The basic messaging API is all there in 2.0 already. I wouldn't think this would be easy to port to 1.9 (and due to restrictions on what we can add in the core stable branch, it couldn't go in 1.9.x anyway).
              Hide
              dougiamas Martin Dougiamas added a comment -

              By the way, there is documentation for developers here: http://docs.moodle.org/en/Development:Messaging_2.0

              Show
              dougiamas Martin Dougiamas added a comment - By the way, there is documentation for developers here: http://docs.moodle.org/en/Development:Messaging_2.0
              Hide
              jrh18 Jason Hardin added a comment -

              Specifically we were looking at the core functionality to add a notification event, either email or sms message, and then also the functionality to create notification forms within a block or module. We have several corporate clients that want to use this functionality in Moodle now.

              It is disappointing that we will have to create something to satisfy the need now and then rewrite it to work once 2.0 is released and our clients are willing to migrate to it. Thank you for the update I look forward to adding notifications to our blocks and modules once 2.0 is released, it looks to be well designed, and I like the multiple communication types.

              Show
              jrh18 Jason Hardin added a comment - Specifically we were looking at the core functionality to add a notification event, either email or sms message, and then also the functionality to create notification forms within a block or module. We have several corporate clients that want to use this functionality in Moodle now. It is disappointing that we will have to create something to satisfy the need now and then rewrite it to work once 2.0 is released and our clients are willing to migrate to it. Thank you for the update I look forward to adding notifications to our blocks and modules once 2.0 is released, it looks to be well designed, and I like the multiple communication types.
              Hide
              net-buoy Marc Grober added a comment -

              It is unclear to many (most?) what the Moodle 2 changes encompass. Will Moodle 2 eliminate the existing chatd? Will Moodle 2 include a jabber daemon? If so, will it be ejabberd? WIll Moodle allow the admin to point moodle at any jabber daemon (so that users who already have jabber running do not have to duplicate effort and do not have to replace an existing jabber daemon with some other)? Will a jabber client be included in Moodle 2 and what if any options will there be to substitute other clients? If a jabber client is included will it be multi-protocol capable ( e.g. pidgen/adium or trillian come to mind).

              Show
              net-buoy Marc Grober added a comment - It is unclear to many (most?) what the Moodle 2 changes encompass. Will Moodle 2 eliminate the existing chatd? Will Moodle 2 include a jabber daemon? If so, will it be ejabberd? WIll Moodle allow the admin to point moodle at any jabber daemon (so that users who already have jabber running do not have to duplicate effort and do not have to replace an existing jabber daemon with some other)? Will a jabber client be included in Moodle 2 and what if any options will there be to substitute other clients? If a jabber client is included will it be multi-protocol capable ( e.g. pidgen/adium or trillian come to mind).
              aborrow Anthony Borrow made changes -
              Link This issue will help resolve MDL-19043 [ MDL-19043 ]
              nadavkav Nadav Kavalerchik made changes -
              Link This issue has been marked as being related by MDL-21598 [ MDL-21598 ]
              nadavkav Nadav Kavalerchik made changes -
              Link This issue has been marked as being related by MDL-21599 [ MDL-21599 ]
              dougiamas Martin Dougiamas made changes -
              Fix Version/s 2.0.1 [ 10420 ]
              Fix Version/s 2.0 [ 10122 ]
              dougiamas Martin Dougiamas made changes -
              Workflow jira [ 21166 ] MDL Workflow [ 41994 ]
              dougiamas Martin Dougiamas made changes -
              Fix Version/s 2.0.2 [ 10421 ]
              Fix Version/s 2.0.1 [ 10420 ]
              dougiamas Martin Dougiamas made changes -
              Fix Version/s 2.0.3 [ 10537 ]
              Fix Version/s 2.0.2 [ 10421 ]
              dougiamas Martin Dougiamas made changes -
              Workflow MDL Workflow [ 41994 ] MDL Full Workflow [ 70700 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Fix Version/s 2.0.4 [ 10652 ]
              Fix Version/s 2.0.3 [ 10537 ]
              Hide
              poltawski Dan Poltawski added a comment -

              This project has been merged and is in core for some time now - I think it can be closed

              Show
              poltawski Dan Poltawski added a comment - This project has been merged and is in core for some time now - I think it can be closed
              poltawski Dan Poltawski made changes -
              Status Open [ 1 ] Closed [ 6 ]
              Resolution Fixed [ 1 ]
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              (just changing fixfor version to the point this arrived)

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - (just changing fixfor version to the point this arrived)
              stronk7 Eloy Lafuente (stronk7) made changes -
              Fix Version/s 2.0 [ 10122 ]
              Fix Version/s 2.0.4 [ 10652 ]
              timhunt Tim Hunt made changes -
              Link This issue caused a regression MDL-25995 [ MDL-25995 ]

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    24/Nov/10