mirror of
https://github.com/moodle/moodle.git
synced 2025-02-24 20:13:14 +01:00
This new messaging system replaces all the various email_to_user() calls. They are now replaced by events triggers, and the messages are then processed centrally according to user preferences and sent to one or more processors (email, popup, jabber etc...) This code is not finished yet, a lot of work still has to be done on the interface. However, the basic structure is there and should be working. Luis and I will be reviewing and polishing this heavily in the next few weeks.
50 lines
2.1 KiB
PHP
50 lines
2.1 KiB
PHP
<?php
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// NOTICE OF COPYRIGHT //
|
|
// //
|
|
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
|
|
// http://moodle.com //
|
|
// //
|
|
// Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
|
|
// //
|
|
// This program is free software; you can redistribute it and/or modify //
|
|
// it under the terms of the GNU General Public License as published by //
|
|
// the Free Software Foundation; either version 2 of the License, or //
|
|
// (at your option) any later version. //
|
|
// //
|
|
// This program is distributed in the hope that it will be useful, //
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
// GNU General Public License for more details: //
|
|
// //
|
|
// http://www.gnu.org/copyleft/gpl.html //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
* Jabber message processor - lib file
|
|
*
|
|
* @author Luis Rodrigues
|
|
* @version $Id$
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
|
* @package
|
|
*/
|
|
|
|
/**
|
|
* Register the processor.
|
|
*/
|
|
function jabber_install(){
|
|
global $DB;
|
|
|
|
$result = true;
|
|
|
|
$provider = new object();
|
|
$provider->name = 'jabber';
|
|
if (!$DB->insert_record('message_processors', $provider)) {
|
|
$return = false;
|
|
}
|
|
return $result;
|
|
}
|