The functions `CourseOverview.get_from_id_if_exists` and `CourseOverview.get_from_ids if exists` are bug- prone, in that they do not go to the modulestore when a CourseOverview is out-of-date or uncached. The docstrings spell this out, but callers seem not to understand the implications. So, in this commit, we: * Remove both functions * Add `CourseOverview.get_from_ids` for almost-as-fast yet safer bulk-fetching of overviews * Update call sites to use `course_exists` or `get_from_ids` in place of the old functions. * Add tests for @verify_course_exists. This PR should specifically fix an issue where the program_enrollments API was breaking when the CourseOverview version was bumped. CR-1708
Open edX -------- This is the root package for Open edX. The intent is that all importable code from Open edX will eventually live here, including the code in the lms, cms, and common directories. If you're adding a new Django app, place it in core/djangoapps. If you're adding utilities that require Django, place them in core/djangolib. If you're adding code that defines no Django models or views of its own but is widely useful, put it in core/lib. Note: All new code should be created in this package, and the legacy code will be moved here gradually. For now the code is not structured like this, and hence legacy code will continue to live in a number of different packages.