Simon-Initiative / oli-torus

Next Generation OLI Authoring and Delivery Platform
https://proton.oli.cmu.edu
MIT License
81 stars 35 forks source link

[BUG FIX] [MER-2932] Filter insights by product course section - part 2 #4871

Closed nicocirio closed 1 month ago

nicocirio commented 1 month ago

This PR finishes the work done in a series of PRs (PR1, PR2, PR3, PR4), by fixing the latest bugs reported in the ticket

Before

https://github.com/Simon-Initiative/oli-torus/assets/74839302/1a92b036-0c15-49eb-901a-04897ed7383f

After

https://github.com/Simon-Initiative/oli-torus/assets/74839302/eb779bc2-ab97-49ee-bf43-c0f0a09d5174

Other Improvements

Other bugs found and fixed

Multiselect filter persistence

When some sections were filtered in the multiselect and then the resource criteria (by activity, by page or by objectives) was changed, those filtered sections weren't correctly being used to filter the results (they were ignored)

Other notes

With the current implementation, only resources of the current project will be shown while combining the filter options in the Insights page. For example, imagine an instructor creates an "Elixir 2.0" course from the corresponding Elixir project and then remixes its content to add a page, let's say, the "Learn how to sum" page that belongs to the Maths project. In this case, when the author visits the Elixir project Insights, all the metrics corresponding to the attempts made in the "Learn how to sum" page from that "Elixir 2.0" course will NOT be shown there, since this insights page is supposed to show metrics about the Elixir project. On the other hand, if the author visits the Maths project Insights, then metrics about how that "Learn how to sum" page will be taken into account since that page belongs to the current project (although it was added to an Elixir course)

https://github.com/Simon-Initiative/oli-torus/assets/74839302/975c3f9e-b309-4ca4-a46f-a7eb3dc71ac0