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

Error on Recompletion Task - failed to execute during scheduled cron run time - plugin version 2024071103 (2024071103) moodle 4.4+ (Build: 20240510) #188

Closed
ShirleyGregorczyk opened this issue Jul 29, 2024 · 4 comments · Fixed by #192

Comments

@ShirleyGregorczyk
Copy link

Received an error alert that the Recompletion task failed to execute on 24-07-2024 at its scheduled run time.

Detail Error log.

Execute scheduled task: Check for users that need to recomplete (local_recompletion\task\check_recompletion)
... started 21:29:01. Current memory use 22.9 MB.
... used 112 dbqueries
... used 0.1792209148407 seconds
Scheduled task failed: Check for users that need to recomplete (local_recompletion\task\check_recompletion),A required parameter (sesskey) was missing
Backtrace:

  • line 426 of /lib/classes/param.php: call to core\param->get_request_parameter()
  • line 646 of /lib/moodlelib.php: call to core\param->required_param()
  • line 73 of /lib/sessionlib.php: call to required_param()
  • line 84 of /lib/sessionlib.php: call to confirm_sesskey()
  • line 8513 of /mod/assign/locallib.php: call to require_sesskey()
  • line 8991 of /mod/assign/locallib.php: call to assign->process_unlock_submission()
  • line ? of unknownfile: call to assign->add_attempt()
  • line 108 of /local/recompletion/classes/plugins/mod_assign.php: call to ReflectionMethod->invoke()
  • line 277 of /local/recompletion/classes/task/check_recompletion.php: call to local_recompletion\plugins\mod_assign::reset()
  • line 120 of /local/recompletion/classes/task/check_recompletion.php: call to local_recompletion\task\check_recompletion->reset_user()
  • line 410 of /lib/classes/cron.php: call to local_recompletion\task\check_recompletion->execute()
  • line 208 of /lib/classes/cron.php: call to core\cron::run_inner_scheduled_task()
  • line 125 of /lib/classes/cron.php: call to core\cron::run_scheduled_tasks()
  • line 186 of /admin/cli/cron.php: call to core\cron::run_main_process()

Any insights, I how to correct that? Plugin was recently upgraded to current version
2024071103 (2024071103)

@ShirleyGregorczyk
Copy link
Author

The Cron job displays a Clear button on the course recompletion task. If we deploy the clear button, will this help us to resume our recompletions tasks, or will it muddy the next steps to restore the functionality?

@danmarsden
Copy link
Owner

Hi @ShirleyGregorczyk - I suspect the PR I have in #192 will fix this for you - let me know if you get a chance to test it (you should probably try on a testing environment before you run it on prod.) - If you can't test this easily it's likely to sit here in the backlog for a while until I get a chance to look further.

@ShirleyGregorczyk
Copy link
Author

Tested the PR in #192 - and that corrected my issue. Thank you for supplying the code fix.

danmarsden added a commit that referenced this issue Aug 20, 2024
Fix #188 - allow re-use of existing function which requires sesskey.
@danmarsden
Copy link
Owner

Thanks for that! - I've merged it in now.

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