Invitaiton + Reminder email error

Invitaiton + Reminder email error

by Daniel Nickl -
Number of replies: 2
Hello everybody,

I have a small problem with the scheduler emails and I would be very happy if you can help me with this error.
Everything works fine with the scheduler emails (student books or cancels an appointment/teacher declines an appointment).

But if I manually sending invitations or reminders to students who did not yet make an appointment, I got this error from moodle:

ERROR from moodle:

Error: Argument 2 passed to scheduler_message_form::__construct() must be an instance of scheduler_instance, instance of mod_scheduler\model\scheduler given, called in [dirrot]/mod/scheduler/teacherview.php on line 354

Debug info:
Error code: generalexceptionmessage

Stack trace:
line 37 of /mod/scheduler/message_form.php: Type Error thrown
line 354 of /mod/scheduler/teacherview.php: call to scheduler_message_from->__construct()
line 75 of /mod/scheduler/view.php: call to include()

---

Here is what I found at the .php´s:

line 37 message_form.php -->
37: public function __construct($action, scheduler $scheduler, $customdata=null) {
38:   $this->scheduler = $scheduler;
39:   parent::__construct($action, $customdata);
40: }

line 354 teacherview.php -->
354: $mform = new scheduler_message_form($actionurl, $scheduler, $templatedata);

line 75 view.php -->
75: include($CFG->dirroot.'/mod/scheduler/teacherview.php');

---

My system:

PHP Version 7.3.10-1+ubuntu16.04.1+deb.sury.org+1
moodle Version 3.7.1+
Scheduler Version: 2019081200


Many thanks in advance!

Daniel



Attachment error_reminder_invitation.PNG
Average of ratings: -
In reply to Daniel Nickl

Re: Invitaiton + Reminder email error

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

Hello

it appears that you are working with the development version (master branch) of Scheduler.

In that case, please update to the very latest version of the master branch where this problem has (likely) been fixed; if not, let me know.

Best wishes

Henning

Average of ratings: Useful (1)
In reply to Henning Bostelmann

Re: Invitaiton + Reminder email error

by Daniel Nickl -
Hi,

I updated to the latest version and everything is working fine.

Thank you!


Daniel