This feature was requested by Timothy Takemoto.
See this forum for more on this topic.
Ken Wilson has written code for this feature. See attached zip file.
It would be nice to combine [the feature] with a method of limiting the number of courses that students can sign onto. Perhpas within the course their might be a setting
"Only allow one course registration to courses within category..."
followed by a drop down box showing the categories (and parent, and grand parent categories) that the course belongs to.