scheduler not marking reminders sent - resulting in MANY reminders

scheduler not marking reminders sent - resulting in MANY reminders

by Scott Krajewski -
Number of replies: 5

Running moodle Moodle 1.9.9 (Build: 20100609) and scheduler 2008061701 (warmed over version).

Every few days the reminders are not being flagged as sent.  The emaildate field is not getting set to -1.  It's easy to detect and correct with SQL but I'm not sure why sometimes it is not set.  Emails are getting sent - every cron run afterwards!  The poor students can get 50 reminders before we notice.

I'll have to put in a monitoring script to watch for this.

The value is supposed to be set in scheduler_cron in lib.php after it emails.  It looks pretty straightforward in the code.  And the problem (not setting emaildate to -1) only happens sometimes, not all the time.

Any ideas out there?

-- Scott

Average of ratings: -
In reply to Scott Krajewski

Re: scheduler not marking reminders sent - resulting in MANY reminders

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

Possibly you're affected by CONTRIB-2264 .

In reply to Henning Bostelmann

Re: scheduler not marking reminders sent - resulting in MANY reminders

by Scott Krajewski -

For some reason I can't see that issue.  I get

 

Permission Violation

It seems that you have tried to perform an operation which you are not permitted to perform.

If you think this message is wrong, please consult your administrators about getting the necessary permissions.

In reply to Scott Krajewski

Re: scheduler not marking reminders sent - resulting in MANY reminders

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

Oh, sorry - it's flagged as a "minor security issue" so you're probably not allowed in.

In brief: Look into your scheduler/lib.php, function scheduler_cron(), around line 175; check whether you find a line like:

update_record('scheduler_slots', $slot);

If you do have this, it should be replaced by:

update_record('scheduler_slots', addslashes_object($slot));


In reply to Henning Bostelmann

Re: scheduler not marking reminders sent - resulting in MANY reminders

by Scott Krajewski -

Thank you!  I bet that is it.  It makes sense -- the recent ones that failed had an ' in the name.  Can we get this put into the current code?

In reply to Scott Krajewski

Re: scheduler not marking reminders sent - resulting in MANY reminders

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

Question is, what is the current code? The fix is in the 1.9 version on CVS (http://cvs.moodle.org/contrib/plugins/mod/scheduler/) and the issue does not occur in my 2.x version on github (https://github.com/bostelm/moodle-mod_scheduler). I'm not sure where Howard maintains his "warmed over version" for 1.9.