turnitin/moodle-plagiarism_turnitin

Error on task plagiarism_turnitin\task\update_reports

steveorulez opened this issue · 2 comments

Hello,
lately i got few of these errors.

Scheduled task failed: Update Report Scores for Turnitin Plagiarism Plugin (plagiarism_turnitin\task\update_reports),count(): Argument #1 ($value) must be of type Countable|array, stdClass given
Backtrace:

  • line 2136 of /plagiarism/turnitin/lib.php: call to plagiarism_plugin_turnitin->update_grade()
  • line 2934 of /plagiarism/turnitin/lib.php: call to plagiarism_plugin_turnitin->cron_update_scores()
  • line 46 of /plagiarism/turnitin/classes/task/update_reports.php: call to plagiarism_turnitin_update_reports()
  • line 263 of /lib/cronlib.php: call to plagiarism_turnitin\task\update_reports->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()

Moodle: 4.1.4+ (Build: 20230721)
turnitin plagiarism: 2023033001

christian

Is the patch applied in this commit fixing the problem?

Avoid passing non-arrays into count to prevent warnings in PHP8
1b0970d

After upgrading the plugin the problem was resolved, you can close this.