Skip to content

Commit

Permalink
Merge branch 'MDL-30871-master' of git://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Nov 20, 2012
2 parents 4d7259e + 38fb498 commit 86ebf41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions enrol/flatfile/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected function process_file() {
if(! @unlink($filename)) {
$eventdata = new stdClass();
$eventdata->modulename = 'moodle';
$eventdata->component = 'course';
$eventdata->component = 'enrol_flatfile';
$eventdata->name = 'flatfile_enrolment';
$eventdata->userfrom = get_admin();
$eventdata->userto = get_admin();
Expand All @@ -169,7 +169,7 @@ protected function process_file() {
// Send mail to admin
$eventdata = new stdClass();
$eventdata->modulename = 'moodle';
$eventdata->component = 'course';
$eventdata->component = 'enrol_flatfile';
$eventdata->name = 'flatfile_enrolment';
$eventdata->userfrom = get_admin();
$eventdata->userto = get_admin();
Expand Down Expand Up @@ -280,7 +280,7 @@ private function process_records($action, $roleid, $user, $course, $timestart, $

$eventdata = new stdClass();
$eventdata->modulename = 'moodle';
$eventdata->component = 'course';
$eventdata->component = 'enrol_flatfile';
$eventdata->name = 'flatfile_enrolment';
$eventdata->userfrom = $teacher;
$eventdata->userto = $user;
Expand All @@ -303,7 +303,7 @@ private function process_records($action, $roleid, $user, $course, $timestart, $

$eventdata = new stdClass();
$eventdata->modulename = 'moodle';
$eventdata->component = 'course';
$eventdata->component = 'enrol_flatfile';
$eventdata->name = 'flatfile_enrolment';
$eventdata->userfrom = $user;
$eventdata->userto = $teacher;
Expand Down
1 change: 0 additions & 1 deletion lang/en/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
$string['contactlistempty'] = 'Your contact list is empty';
$string['contacts'] = 'Contacts';
$string['context'] = 'context';
$string['couldnotfindpreference'] = 'Could not load preference {$a}. Does the component and name you supplied to message_send() match a row in message_providers? Message providers must appear in the database so users can configure how they will be notified when they receive messages.';
$string['defaultmessageoutputs'] = 'Default message outputs';
$string['defaults'] = 'Defaults';
$string['deletemessagesdays'] = 'Number of days before old messages are automatically deleted';
Expand Down
9 changes: 5 additions & 4 deletions lib/messagelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ function message_send($eventdata) {
if (isset($defaultpreferences->{$defaultpreference})) {
$permitted = $defaultpreferences->{$defaultpreference};
} else {
//MDL-25114 They supplied an $eventdata->component $eventdata->name combination which doesn't
//exist in the message_provider table (thus there is no default settings for them)
$preferrormsg = get_string('couldnotfindpreference', 'message', $defaultpreference);
throw new coding_exception($preferrormsg,'blah');
// MDL-25114 They supplied an $eventdata->component $eventdata->name combination which doesn't
// exist in the message_provider table (thus there is no default settings for them).
$preferrormsg = "Could not load preference $defaultpreference. Make sure the component and name you supplied
to message_send() are valid.";
throw new coding_exception($preferrormsg);
}

// Find out if user has configured this output
Expand Down

0 comments on commit 86ebf41

Please sign in to comment.