-
Bug
-
Resolution: Fixed
-
Minor
-
1.9.4
-
None
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
To reproduce error:-
Add email list block to site front page (course id = 1).
Add an email_list block to a course and add participants.
Send message from one participant to another.
Delete the course. (Site->Administration->Courses->Add/edit courses)
From site front page click on eMail list->General Inbox (Site->eMail's->eMail)
Click on email sender's Sentbox or email recipent's Inbox.
Error Message - Invalid course id (Displayed in pink box)
If the user has a lot of emails you may need to attempt to page to the email for the deleted course for the error message to be displayed.
The error message is displayed by the following code:-
blocks\email_list\email\lib.php
function email_showmails
if (! $course_mail = get_record("course", "id", $mail->course)) {
echo ' Email/s present for deleted Course Id:- '.$mail->course;
print_error('invalidcourseid', 'block_email_list');
}
I added the above echo statement to identify the missing course id.
I guess that the code that needs changing is either in the email_list block or in the course deletion code.