openedx / platform-plugin-aspects

Aspects plugins for the Open edX LMS and Studio
Apache License 2.0
2 stars 8 forks source link

fix: Fix course-overviews sink not ordering blocks correctly #59

Closed bmtcril closed 5 months ago

bmtcril commented 5 months ago

We've been using Modulestore's get_items, but even though it's often correct the ordering isn't guaranteed. The new method walks the course tree itself, then adds in the detached models separately.

Potential concerns:

This was already a pretty heavy operation, calling into Modulestore twice to walk all of the blocks may not be performant enough or cause issues in the LMS/CMS. It may be preferable to ignore detached blocks if we are not currently using them, but I wanted to preserve parity with what we've been doing unless/until there is an actual problem.

Closes: #61

Merge checklist: Check off if complete or not applicable:

github-actions[bot] commented 5 months ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  platform_plugin_aspects
  __init__.py
  platform_plugin_aspects/sinks
  course_overview_sink.py
Project Total  

This report was generated by python-coverage-comment-action