Version 3.4.8 which is highest in series
Bug fixes for general core bugs in 3.4.x ended 12 November 2018 (12 months).
Bug fixes for security issues in 3.4.x will end 13 May 2019 (18 months).
Bug fixes for your version has already past.
Searching Tracker for: task_adhoc failed
https://tracker.moodle.org/browse/MDL-60367?filter=-4&jql=text%20~%20%22task_adhoc%20failed%22%20order%20by%20created%20DESC
for: course module could not be deleted
https://tracker.moodle.org/browse/MDL-22529?filter=-4&jql=issuetype%20%3D%20Bug%20AND%20text%20~%20%22course%20module%20could%20not%20be%20deleted%22%20order%20by%20created%20DESC
Maybe you need to ask @
https://moodle.org/mod/forum/discuss.php?d=382972
Can you make a backup of that troubled course?
Restore it to your sandbox 3.6.x. Does that restore still have 'pending'?
'spirit of sharing', Ken