Merge commit '246cc0e6b52f455dcb1ab23039202d7498d91d30'

Conflicts:
	course/request.php
This commit is contained in:
Petr Skoda 2011-01-10 14:12:34 +01:00
commit b2d6484598
4 changed files with 21 additions and 3 deletions

View File

@ -4074,8 +4074,7 @@ class course_request {
*/
protected function notify($touser, $fromuser, $name='courserequested', $subject, $message) {
$eventdata = new stdClass();
$eventdata->modulename = 'moodle';
$eventdata->component = 'course';
$eventdata->component = 'moodle';
$eventdata->name = $name;
$eventdata->userfrom = $fromuser;
$eventdata->userto = $touser;
@ -4084,6 +4083,7 @@ class course_request {
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
$eventdata->notification = 1;
message_send($eventdata);
}
}

View File

@ -986,6 +986,9 @@ $string['messagebody'] = 'Message body';
$string['messagedselectedusers'] = 'Selected users have been messaged and the recipient list has been reset.';
$string['messagedselectedusersfailed'] = 'Something went wrong while messaging selected users. Some may have received the email.';
$string['messageprovider:backup'] = 'Backup notifications';
$string['messageprovider:courserequestapproved'] = 'Course creation request approval notification';
$string['messageprovider:courserequested'] = 'Course creation request notification';
$string['messageprovider:courserequestrejected'] = 'Course creation request rejection notification';
$string['messageprovider:errors'] = 'Important errors with the site';
$string['messageprovider:errors_help'] = 'These are important errors that an administrator should know about.';
$string['messageprovider:notices'] = 'Notices about minor problems';

View File

@ -43,6 +43,21 @@ $messageproviders = array (
'backup' => array (
'capability' => 'moodle/site:config'
),
//course creation request notification
'courserequested' => array (
'capability' => 'moodle/site:approvecourse'
),
//course request approval notification
'courserequestapproved' => array (
'capability' => 'moodle/course:request'
),
//course request rejection notification
'courserequestrejected' => array (
'capability' => 'moodle/course:request'
)
);

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2010122900; // YYYYMMDD = date of the last version bump
$version = 2011010400; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0.1+ (Build: 20110105)'; // Human-friendly version name