Hi all,
The Questionnaire plugin uses the moodlelib email_to_user function in a non-standard way. Upon submission, an email notification is (optionally) sent to one or more email addresses entered in the appropriate Submission options field.
Up to Moodle 2.5 included, this worked well, as email_to_user checked the following:
if (empty($user) || empty($user->email))
where, obviously, a valid email was provided and it worked fine.
But in Moodle 2.6, the check has changed to:
if (empty($user) or empty($user->id))
which of course returns an error message, because Questionnaire is not sending a valid $user->id to email_to_user.
I wonder why that change was made?
What should I do? As a workaround, I can always send a "dummy" value for $user->id, e.g. 99999. I have tested and it works. Any other suggestions?
Joseph