Adhoc task failed: core_course\task\course_delete_modules

Adhoc task failed: core_course\task\course_delete_modules

by Mark Fedenia -
Number of replies: 1

I am running 3.4+ (Build: 20171116)

When I manually run cron I get the following Adhoc tasks failing:


Adhoc task failed: core\task\refresh_mod_calendar_events_task,Invalid course module ID
Execute adhoc task: core\task\refresh_mod_calendar_events_task
... started 09:14:36. Current memory use 12MB.
Refreshing events for assign
... used 3 dbqueries
... used 0.0011241436004639 seconds
Adhoc task failed: core\task\refresh_mod_calendar_events_task,Invalid course module ID
Execute adhoc task: core\task\refresh_mod_calendar_events_task
... started 09:14:36. Current memory use 12MB.
Refreshing events for assign
... used 3 dbqueries
... used 0.0027229785919189 seconds
Adhoc task failed: core\task\refresh_mod_calendar_events_task,Invalid course module ID
Execute adhoc task: core_course\task\course_delete_modules
... started 09:14:36. Current memory use 12MB.
... used 6 dbqueries
... used 0.0049970149993896 seconds
Adhoc task failed: core_course\task\course_delete_modules,Coding error detected, it must be fixed by a programmer: The course module 164 could not be deleted. #0 /home/fedenia8/public_html/lms/mod/assign/locallib.php(1680): course_modinfo->get_cm('164')
#1 /home/fedenia8/public_html/lms/mod/assign/locallib.php(1613): assign->get_course_module()
#2 /home/fedenia8/public_html/lms/mod/assign/submission/onlinetext/locallib.php(559): assign->get_instance()
#3 /home/fedenia8/public_html/lms/mod/assign/locallib.php(751): assign_submission_onlinetext->delete_instance()
#4 /home/fedenia8/public_html/lms/mod/assign/lib.php(56): assign->delete_instance()
#5 /home/fedenia8/public_html/lms/course/lib.php(1194): assign_delete_instance('34')
#6 /home/fedenia8/public_html/lms/course/classes/task/course_delete_modules.php(66): course_delete_module('164')
#7 /home/fedenia8/public_html/lms/lib/cronlib.php(181): core_course\task\course_delete_modules->execute()
#8 /home/fedenia8/public_html/lms/lib/cronlib.php(74): cron_run_inner_adhoc_task(Object(core_course\task\course_delete_modules))
#9 /home/fedenia8/public_html/lms/admin/cron.php(81): cron_run()
#10 {main}



Coincidentally, I have a course that I cannot delete. The web interface looks like it starts to delete the course but then it stops without reporting any success or failure. The course is not removed although some if not most of the activities are deleted. I restored the course from a backup and the course is intact, however, the same ad-hoc tasks above keep failing. I am not sure whether or not the two circumstances are related but I need to be able to (1) fix the problem above and (2) delete the course.  Can anyone point me in the right direction?

 


Average of ratings: -
In reply to Mark Fedenia

Re: Adhoc task failed: core_course\task\course_delete_modules

by Bruno Bouret -

Can you try this :

1) Go to site administration

2) search for "recycle bin"

3) disable "course recycle bin"      (you already have a backup of your course)

4) delete the course

5) enable "course recycle bin"


If successful I think you have the same problem than mine :

the delete process try to create a temporary table with RAW_FORMAT= DYNAMIC. It fails because because that's forbidden if the Database Format is not INNODB Barracuda.

Hope this help

Average of ratings:Useful (1)