Moodle
  1. Moodle
  2. MDL-10107

META: New Messaging System (GSoC)

    Details

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

      Description

      Google SoC messaging system improvements.

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

        Issue Links

          Activity

          Hide
          Luis Rodrigues added a comment -

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

          Show
          Luis Rodrigues added a comment - This is the first version of changes I've made to create the new message system.
          Hide
          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
          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 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 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
          Matt Gibson added a comment -

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

          Show
          Matt Gibson added a comment - What's the status of this? Is any code in a usable state?
          Hide
          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
          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
          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
          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
          Luis Rodrigues added a comment -

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

          Just wait a couple of weeks

          Show
          Luis Rodrigues added a comment - It's not impossible but it would be a lot of work. Just wait a couple of weeks
          Hide
          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
          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
          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
          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
          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
          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
          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
          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
          Hide
          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
          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
          Martin Dougiamas added a comment -

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

          Show
          Martin Dougiamas added a comment - I'm actually working on this right now...
          Hide
          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
          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
          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
          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
          Luis Rodrigues added a comment -

          Working on completing them and on new edit_form.

          Show
          Luis Rodrigues added a comment - Working on completing them and on new edit_form.
          Hide
          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
          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
          Hide
          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
          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
          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
          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
          Martin Dougiamas added a comment -

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

          Show
          Martin Dougiamas added a comment - By the way, there is documentation for developers here: http://docs.moodle.org/en/Development:Messaging_2.0
          Hide
          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
          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
          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
          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).
          Hide
          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
          Dan Poltawski added a comment - This project has been merged and is in core for some time now - I think it can be closed
          Hide
          Eloy Lafuente (stronk7) added a comment -

          (just changing fixfor version to the point this arrived)

          Show
          Eloy Lafuente (stronk7) added a comment - (just changing fixfor version to the point this arrived)

            People

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

              Dates

              • Created:
                Updated:
                Resolved: