* Introduces the idea of content errors into the learning_sequences public API, accessible using get_content_errors(). * Makes course outline generation much more resilient to unusual structures (e.g. Section -> Unit with no Sequence in between), with the understanding that anything that doesn't conform to the standard structure will simply be skipped. * Improves the Django Admin for learning_sequences to display content errors and improve sequence data browsing within a course. * Switches the main table viewed in the Django admin from LearningContext to CourseContext, which is appropriate since only course runs generate outlines. This was done as part of TNL-8057, with the end goal of making course outline generation resilient enough to switch over apps to using the learning_sequences outline API. The types of course structure errors that this PR addresses cause display issues even in the current Outline Page experience, but would break the outline generation for learning_sequences altogether. The approach for error messages here is very generic, to keep modulestore concepts from seeping into learning_sequences (which is not aware of the modulestore/contentstore). We may need to address this later, with a more normalized content error data model. While the Django admin page is backwards compatible with the old versions of the models, we should run the backfill_course_outlines management command after deploying this change, to get the full benefits.
8.6 KiB
8.6 KiB