This changes logic to allow more missed use cases of course_image to
work properly. The cases are:
. XML courses with the course_image attribute set
. Mongo courses that are imported without a contentstore
. Mongo courses that have course_image set but don't have a content store
It also exports default images_static_course.jpg to
images/static_course.jpg to handle a use case where a course author
uploaded an image to the default location in studio without using the
studio interface for adding course images, they then export the course, and then
import it without a contentstore
-- Changed docstrings to use double quote.
-- More consistent naming for youtube IDs (normal_speed_id -> youtube_id_1_0).
-- Formatting changes for readability.
-- Updated test XML to expect JSON-encoded strings; prevents tests from spuriously failing.
TODO:
* need unique slugs for errors so they don't overwrite each other on export.
- try to preserve origin slug. If not possible, generate random one.
* figure out what metadata to strip. e.g.
({'data': '<problem><p><h1>Finger Exercise 1...'},
{'data': '<problem points="1" type="lecture"><p><h1>Finger Exercise 1...'},
False)
- where did points and type come from? Do we want them there?
* separate broken and non-broken test courses
* More tests for mongo modulestore, including tweaks to test files
* add location_to_id method to CourseDescriptors
* Implement path_to_location method in mongo.py
- TODO: does not handle position in sequences yet.
* fix bug in jump_to view.
* Clean up test data for simple, toy courses
* clean up test_mongo.py
* write initial test for path_to_location
* hook up view to use path_to_location
Next: actually implement it :)