-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 404.1.2 adhoc task fails #222
Comments
Strange given https://github.com/gjbarnard/moodle-format_grid/blob/main/classes/task/update_displayed_images_task.php#L47 - is your Moodle in maintenance mode to prevent changes to the course course format setting? |
@Syxton And.... what version of the format please. |
Oh grrr, I forgot a backslash here... https://github.com/gjbarnard/moodle-format_grid/blob/main/classes/task/update_displayed_images_task.php#L50 |
Humm... strange that it worked in testing though... odd. |
@Syxton Having said about the backslash though, it's odd given the stack trace as https://github.com/gjbarnard/moodle-format_grid/blob/main/classes/task/update_displayed_images_adhoc.php#L58 should never happen in a non-grid format course because the adhoc task would not be scheduled for a course that isn't a grid one by https://github.com/gjbarnard/moodle-format_grid/blob/main/classes/task/update_displayed_images_task.php#L47. |
Or perhaps I've not missed a backslash as everywhere else doesn't use one, even with a name space. |
@Syxton How are you running cron exactly please? |
@Syxton Okay, I've tried to replicate and cannot:
Running via UI cron. |
Ah, okay, with cli cron:
Therefore the UI cron loads with /course/format/lib.php that has 'course_get_format()' and the CLI version doesn't! |
Okay, have a fix:
|
…ase as previous adhoc tasks could have failed!
…ase as previous adhoc tasks could have failed!
…ase as previous adhoc tasks could have failed!
…ase as previous adhoc tasks could have failed!
…ase as previous adhoc tasks could have failed!
Describe the bug
Adhoc task failed: format_grid\task\update_displayed_images_adhoc,Call to undefined function format_grid\course_get_format()
Backtrace:
To Reproduce
Steps to reproduce the behaviour:
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: