Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-1558

Emails present for deleted course, giving message - Invalid course id

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9
    • 1.9.4
    • Block: Email_list
    • 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.

            tmas Toni Mas
            pjstockw Pam Stockwell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.