Skip to content
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

Adhoc task fails if config->crawlstart does not correspond to a record in the crawler_history table #165

Open
cameron1729 opened this issue Oct 13, 2022 · 0 comments

Comments

@cameron1729
Copy link
Contributor

The tool_crawler_crawl function uses the plugin setting crawlstart (from the mdl_config_plugins table) to find a record in mdl_tool_crawler_history. It is possible that there can be no such record with this value in mdl_tool_crawler history.

The record from the history table is attempted to be loaded here: https://github.com/catalyst/moodle-tool_crawler/blob/MOODLE_310_STABLE/lib.php#L75

If it isn't found, no error is raised. Then later an attempt to write to the DB is made here: https://github.com/catalyst/moodle-tool_crawler/blob/MOODLE_310_STABLE/lib.php#L96 but it fails since we have no ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant