Yeah, I think it makes sense to just make it raise a reasonable exception,
rather than the assertion that's currently there.

-Cale


On Mon, Mar 3, 2014 at 4:40 PM, Ned Batchelder <notifications@github.com>wrote:

> In common/lib/xmodule/xmodule/modulestore/mixed.py:
>
> > @@ -367,31 +203,266 @@ def get_errored_courses(self):
> >              errs.update(store.get_errored_courses())
> >          return errs
> >
> > +    def _get_course_id_from_block(
> self, block, store):
> > +        """
> > +        Get the course_id from the block or from asking its store. Expensive.
> > +        """
> > +        try:
> > +            if block.course_id is not None:
> > +                return block.course_id
> > +        except AssertionError:  # will occur if no xmodule set
>
> @cpennington <https://github.com/cpennington> it seems like a bad
> reaching-in to have Don's layer check for the existence of xmodule_runtime.
> How would you feel about replacing (somehow?) the assertion with an
> exception that's raised indicating that the module doesn't exist, and so
> module attributes aren't available?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/2738/files#r10230346>
> .
>