danmarsden / moodle-local_recompletion

Allows course recompletion
29 stars 45 forks source link

Scheduled task failed: Check for users that need to recomplete (local_recompletion\task\check_recompletion),Argument 1 passed to moodle_text_filter::filter_stage_pre_format() must be of the type string, array given #148

Closed UniWarwickGrahamWilmott closed 7 months ago

UniWarwickGrahamWilmott commented 7 months ago

Hi,

We recently updated to version 2023111402, but are seeing errors in our task logs:

Execute scheduled task: Check for users that need to recomplete (local_recompletion\task\check_recompletion) ... started 01:51:01. Current memory use 22.2 MB. Debugging increased temporarily due to faildelay of 86400 ... used 32 dbqueries ... used 0.30173087120056 seconds Scheduled task failed: Check for users that need to recomplete (local_recompletion\task\check_recompletion),Argument 1 passed to moodle_text_filter::filter_stage_pre_format() must be of the type string, array given, called in /var/www/moodle/docroot/lib/filterlib.php on line 188 Backtrace:

  • line 188 of /lib/filterlib.php: call to moodle_text_filter->filter_stage_pre_format()
  • line 230 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
  • line 1351 of /lib/weblib.php: call to filter_manager->filter_text()
  • line 224 of /local/recompletion/classes/task/check_recompletion.php: call to format_text()
  • line 297 of /local/recompletion/classes/task/check_recompletion.php: call to local_recompletion\task\check_recompletion->notify_user()
  • line 119 of /local/recompletion/classes/task/check_recompletion.php: call to local_recompletion\task\check_recompletion->reset_user()
  • line 263 of /lib/cronlib.php: call to local_recompletion\task\check_recompletion->execute()
  • line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
  • line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
  • line 178 of /admin/cli/cron.php: call to cron_run()

Happy to provide other logs as needed.

danmarsden commented 7 months ago

@UniWarwickGrahamWilmott that's not the most recent version of the plugin for 4.1 or 4.3 - can you please confirm which Moodle version you are using, and upgrade to the latest version available in github for your Moodle version and see if that

UniWarwickGrahamWilmott commented 7 months ago

Sorry - we (or rather, our external Moodle hosts) got the latest version from https://moodle.org/plugins/local_recompletion/versions

We are currently running Moodle4.1 (planning to upgrade to 4.4 when it is released). I'll ask for the correct version to be installed, which hopefully will solve the problem. I will close this issue.

Sorry again

danmarsden commented 7 months ago

all good! - key thing to be aware of is that the moodle.org plugins db is not always updated with the latest release - it's often a manual process - we do try to automate it by using a workflow to trigger the update when the version number changes, but that's not been working recently (expired HQ tokens I think) - hopefully we'll get that sorted soon and it will start pushing more regular updates.