by Davo Smith.
Actually, for very little effort (and, at most 1 DB query - you could get it down to 0 DB queries if you pass it an existing course object), you now know that course id 17 has no sections or activities in it.