Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51608

Warning debug messages being displayed when sending notification emails after attempting a quiz

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • 2.8.8, 2.9.2, 3.0
    • Quiz
    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE

    Description

      1. Set up a valid email for the Moodle instance in Site administration ► Plugins ► Message outputs ► Email
      2. Set the Debug messages to DEVELOPER in "Site administration ► Development ► Debugging"
      3. Create a course. Enrol students and teachers. Make sure the enrolled teachers have valid email addresses.
      4. Create a quiz.
      5. Under "Quiz administration", click "Permissions".
      6. Select the "Teacher" role for the "Advanced role override" dropdown menu
      7. Set the capability "mod/quiz:emailnotifysubmission" to "Allow" then click "Save changes".
      8. Attempt the quiz as a student.
      9. After submitting the quiz, the following debug messages will be shown:

        Necessary properties missing in userto object, fetching full record
        line 95 of /lib/messagelib.php: call to debugging()
        line 1451 of /mod/quiz/locallib.php: call to message_send()
        line 1531 of /mod/quiz/locallib.php: call to quiz_send_notification()
        line 1644 of /mod/quiz/locallib.php: call to quiz_send_notification_messages()
        line ? of unknownfile: call to quiz_attempt_submitted_handler()
        line 155 of /lib/classes/event/manager.php: call to call_user_func()
        line 89 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
        line 2411 of /lib/dml/moodle_database.php: call to core\event\manager::database_transaction_commited()
        line 92 of /lib/dml/moodle_transaction.php: call to moodle_database->commit_delegated_transaction()
        line 184 of /mod/quiz/processattempt.php: call to moodle_transaction->allow_commit()
        

      Upon investigation, the debug messages are being shown because the $eventdata->userto object that is being passed into the message_send function of lib/messagelib.php from the $recipient parameter in quiz_send_notification function of mod/quiz/locallib.php does not have the auth, suspended, deleted and emailstop properties.

      These properties should be included in the $notifyfields variable of the quiz_send_notification_messages on line 1551 of mod/quiz/locallib.php.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              jpataleta Jun Pataleta
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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