Phase 1 of adding asset metadata saving to old Mongo

@dmitchell @cpennington Here's the first phase of my work. Look at the tests to see what is implemented and what isn't yet.
You can leave it if it's intentional (it does count as a pylint violation).
It's just, I've put some in w/ the intent of fixing them before merging and
forgotten unless reminded by reviewers.

The "best practice" is to label it w/ the story id where it should be
removed


On Tue, Aug 19, 2014 at 2:52 PM, John Eskew <notifications@github.com>
wrote:

> In common/lib/xmodule/xmodule/modulestore/mongo/base.py:
>
> > +                asset_key (AssetKey): asset identifier
> > +                displayname: The human-readable name of the asset
> > +                uploadDate (datetime.datetime): The date and time that the file was uploaded
> > +                contentType: The mimetype string of the asset
> > +                md5: An md5 hash of the asset content
> > +        """
> > +        assert isinstance(course_key, CourseKey)
> > +        if self.asset_collection is None:
> > +            return None
> > +
> > +        course_assets = self._find_course_assets(course_key)
> > +        all_assets = course_assets['assets']
> > +        if get_thumbnails:
> > +            all_assets = course_assets['thumbnails']
> > +        ret_assets = []
> > +        # TODO: Respect start/maxresults/sort.
>
> What's our policy on TODO comments? In this case, I'd like to leave the
> TODO in there. Is that against the rules? Perhaps it's worse to never make
> TODO notes on code?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/edx/edx-platform/pull/4854/files#r16435146>.
>