Right. `course_id` is only defined on `ModuleSystem`, and thus is only available if we're working w/ an `XModuleDescriptor` that has been set up to work as an `XModule`.

A test that would be slightly more in the spirit of the current design would be to look for whether `block.xmodule_runtime` is set, and if so, then you know that the block is set up to work as an xmodule, and you're free to call `block.course_id`.

This will all get a bit less grungy once I've converted `ModuleSystem` and `DescriptorSystem` to xblock services.