elearningsoftware / moodle-mod_journal

The Moodle journal module for moodle 2.0+
https://moodle.org/plugins/view.php?plugin=mod_journal
16 stars 34 forks source link

`Class 'mod_journal\task\stdClass' not found` on cron_task #72

Closed kaseyhackspace closed 2 years ago

kaseyhackspace commented 2 years ago

After the fix at https://github.com/elearningsoftware/moodle-mod_journal/issues/71 , There's a new error that popped up:

Execute scheduled task: Background processing for journal module (mod_journal\task\cron_task)
... started 00:08:30. Current memory use 12.8MB.
Processing journal entry 1578
... used 11 dbqueries
... used 0.13751697540283 seconds
Scheduled task failed: Background processing for journal module (mod_journal\task\cron_task),Class 'mod_journal\task\stdClass' not found
Backtrace:
* line 248 of /lib/cronlib.php: call to mod_journal\task\cron_task->execute()
* line 150 of /admin/cli/scheduled_task.php: call to cron_run_inner_scheduled_task()

Can be fixed by prepending a \ on stdClass on https://github.com/elearningsoftware/moodle-mod_journal/blob/fa2bb5a6d57a80102f930d0f8a9a4fbc875f0347/classes/task/cron_task.php#L119

adrian-sarmas commented 2 years ago

This has been fixed in the master branch. You may download it now from github or wait a few days for this to become available on moodle.org

kaseyhackspace commented 2 years ago

Thanks @adrian-sarmas , can confirm that the cron task works now