Suggest, at this point to restore the 2.2 you have.
Found a discussion about 2.2 with same issue.
https://moodle.org/mod/forum/discuss.php?d=194005
appears to have been resolved by changing the course format.
Are your troubled courses set to use grid course format?
Can you change the course format in one of those to be deleted/troubled courses to
something else (topics) and attempt to delete?
An additional thought ... same sort of thing could happen IF there is an addon for course assignments. OR, for that matter, ANY addons. So how many addons do you have in the 2.2?
https://moodle.org/plugins/browse.php?list=category&id=44
Suggest upgrading to one version higher to start ... 2.3.highest.
Choose another one of those troubled courses and see if it can be deleted - same checks of course format and assignment addons, etc.
IF everything ok there, then take it to 2.6.highest. Check out themes (use no theme other than a standard theme).
Check out assignments and course formats. Delete another one of those courses.
OK? Then take the 2.6.highest up to 2.9.highest.
This does assume one has the required versions of PHP and MySQL as those needed to be upgraded along the upgrade path.
2.9 -> 2.7: PHP 5.4.4, MariaDB 5.5.31 or MySQL 5.5.31
2.6: PHP 5.3.3, MariaDB 5.3.5 or MySQL 5.1.33
2.4: PHP 5.3.2, MySQL 5.1.33
2.2: PHP 5.3.2, MySQL 5.0.25
Also, just before EACH upgrade, do a minimal site backup: moodle code and DB dump..
Taking the time to backup after each step will save time as one could restore to the previous version that was known to work to address any newly discovered issues on the march.
Now about which versions to upgrade to .... how good is my memory? 2.2 was release in 2013 ... almost 3 years ago. Would I know now at what versions to jump through now IF using something other than git to upgrade? Afraid, at this point, that is a 'best guess' from what I can re-call of major changes that occurred in each version.
I, personally, don't worry about that as I run Linux and use git for updates/upgrades which makes the whole process of 'marching a moodle' less stressful.
Am also not suggesting you use git at present, but investigate if you can use it on your system.
Maybe someone else who has experience at 'marching a moodle' upwards from 2.2 to 2.9.x and upwards to 3.0.x would jump in here and share their experiences. ;)
'spirit of sharing', Ken