To me this sounds as if you have a number of courses for which the course directory got removed but the database table remains. My bet is that for all practical purposes this won't have an impact on your use of the new version of WeBWorK.
If these are courses that you no longer need or want it might be nice to get rid of the database tables from an aesthetic viewpoint. I think it may be hard from within WeBWorK itself, however. If you have access to the mySQL server you could drop those tables manually. If not, but you have access to the webserver, you might be able to fake it by manually creating course directories for the XXXX courses (using mkdir from a terminal window, and then changing the ownership of the directories to make them writable by the web server) and then deleting the courses through the WeBWorK admin course.
Upgrading from 2.2.1 to 2.4.1
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 5 posting(s) in 1 day