The idea is that lots of small files download easier than a big file - simple timeout concept.
Making them inactive - is that because they are no longer a client or that the course isn't accessible ? Why not just keep the url/page and forward to the home page or display a message that the course is no longer active?
Why not group the courses by region for purposes of a sitemap.
That way your trigger is when a site becomes active/inactive, you rebuild the sitemap.
BUT REMEMBER: Just because you create a sitemap, doesn't mean Google will index your site - your site index is set to a Google dictated crawl cycle, which could be weekly or monthly...so you could be generating 4 sitemaps for every 1 that Google actually reads, hence why you need that 404 widget so much...
Official Google Webmaster Central Blog: Make your 404 pages more useful