Would it be possible to delegate this to a function in XModule?  I know we have logic like this all over the place, but it makes me nervous that we're creating a dependency on the course location being in a particular format.