Assign urls to edx contentfiles when possible #2420
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
Related to https://github.com/mitodl/hq/issues/7989
Description (What does it do?)
How can this be tested?
Find a course from each of the following sources and ingest the contentfiles for it: mit_edx, mitxonline, xpro, oll:
./manage.py backpopulate_<etl_source>_files --resource-ids <course_id> --overwrite
It should complete without errors, and the majority of contentfiles should then have urls. Try out a bunch of links to make sure they work, including urls that contain
asset
and urls that containblock
Also run
./manage.py backpopulate_canvas_courses --canvas-ids <course_readable_id> --overwrite
to make sure that still works normally.For mit_edx, mitxonline and xpro courses, you may be redirected to a "You must be enrolled in this course" page for these links if you are not logged in, or logged in as someone other than a superuser.