Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9.4
-
Fix Version/s: 1.9
-
Component/s: Block: Email_list
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
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.
Attachments
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Now, if user context level allow to delete course or to delete block instance, eMail List clear all this content (folders, subfolders, filters, mails and folder-mail references). Thanks Pam.