fix: jump_to should redirect to first unit on invalid key
Previously, it would 404. While accurate, it's not a great user experience. Users can be offered invalid jump_to paths in the normal course of things, if course content disappears or they lose access to it. In both cases, they might be offered a resume URL in the courseware that would be to a now-invalid location. With this change, that invalid link will at least give them *something* (the first unit in the course) rather than an error page. This also (unrelatedly) fixes an exception when the learning MFE outline page tries to render a course that contains sequences with no children. AA-867
Showing
- common/lib/xmodule/xmodule/contentstore/utils.py 10 additions, 0 deletionscommon/lib/xmodule/xmodule/contentstore/utils.py
- common/test/acceptance/fixtures/course.py 2 additions, 5 deletionscommon/test/acceptance/fixtures/course.py
- lms/djangoapps/course_home_api/outline/v1/views.py 1 addition, 1 deletionlms/djangoapps/course_home_api/outline/v1/views.py
- lms/djangoapps/courseware/tests/test_views.py 8 additions, 1 deletionlms/djangoapps/courseware/tests/test_views.py
- lms/djangoapps/courseware/views/views.py 13 additions, 6 deletionslms/djangoapps/courseware/views/views.py
- openedx/core/djangoapps/courseware_api/tests/test_views.py 10 additions, 0 deletionsopenedx/core/djangoapps/courseware_api/tests/test_views.py
- openedx/core/djangoapps/courseware_api/views.py 3 additions, 4 deletionsopenedx/core/djangoapps/courseware_api/views.py
Loading
Please register or sign in to comment