Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-30871-23' of git://github.com/FMCorz/moodle into MO…

…ODLE_23_STABLE
  • Loading branch information...
commit e81c1ad9871d199049096bcd0aa1aeaca6bf610f 2 parents 0482127 + 440dec9
@danpoltawski danpoltawski authored
Showing with 9 additions and 8 deletions.
  1. +4 −4 enrol/flatfile/lib.php
  2. +5 −4 lib/messagelib.php
View
8 enrol/flatfile/lib.php
@@ -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();
@@ -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();
@@ -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;
@@ -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;
View
9 lib/messagelib.php
@@ -129,10 +129,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
Please sign in to comment.
Something went wrong with that request. Please try again.