|
|
|
[
Permlink
| « Hide
]
Luis Rodrigues - 19/Jun/07 11:08 PM
This is the first version of changes I've made to create the new message system.
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
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. What's the status of this? Is any code in a usable state?
There is a new message brocker and new message/chat window in YUI.
I'm waiting for Martin to merge it. 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?
It's not impossible but it would be a lot of work.
Just wait a couple of weeks :) 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 This code is now HEAD. There's more reviewing and polishing to do yet, but it'll be faster now!
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 :-) 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 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() ); I'm actually working on this right now...
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 = ''; 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.
Working on completing them and on new edit_form.
Martin I just uploaded a mockup for edit. Please check and tell me what you think.
It's on message/edit2.php |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||