Simon-Initiative / oli-torus

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

[FEATURE] [MER-3010] Activity reports display component #4862

Closed rgachuhi closed 2 months ago

rgachuhi commented 3 months ago

This PR adds a new feature to Torus that allows any activity to generate a report, which can be displayed on any other page or page via the new "Report" component.

Example: The legacy student cognition toolbox uses a component in which students take a survey on one page and then will see their results on the next. This is called a survey report in legacy.

https://github.com/Simon-Initiative/oli-torus/assets/11138398/b5b2ffbb-0e5c-46e5-816d-921dbff90355

https://github.com/Simon-Initiative/oli-torus/assets/11138398/acd3a744-31b8-44c2-bf03-d90a2527fb80

darrensiegel commented 2 months ago

Also, I see in the screenshot that the VegaLite actions menu is present. We want to disable that: https://stackoverflow.com/questions/63715640/how-to-hide-the-three-dot-dropdown-menu-on-a-vega-chart

rgachuhi commented 2 months ago
Screenshot 2024-06-11 at 7 28 53 PM

I noticed that Vegalite has a menu that allows you to open in an editor. Is there any way to disable this menu?

Also, is this number scale intentional? The numbers seem unnecessarily large

Not sure why the ranges are that high, but it all depends on the values the likert activity sets

rgachuhi commented 2 months ago

Also, I see in the screenshot that the VegaLite actions menu is present. We want to disable that: https://stackoverflow.com/questions/63715640/how-to-hide-the-three-dot-dropdown-menu-on-a-vega-chart

I was able to disable those.

darrensiegel commented 2 months ago

I tested this out locally with a new course. I first created a practice page and added a Likert activity. It contained three choices "Agree", "Neither Agree or Disagree" and "Disagree". I added two Items "Item one" and "Item two". I then added an activity report to a second page, published and accessed the course as a student.

Visiting the page with the report first correctly showed me the message that I hadn't answered the question on the other page.

After answering the question "Disagree" for Item 1 and "Agree" for item 2, then clicking "Submit" for the Likert, I went back to the page with the report and see this:

Screenshot 2024-06-14 at 7 56 29 AM

The visualization doesn't seem to be correct in a few ways. First, it isn't showing all choices in the Y axis, only the two that I picked. Second, the Y axis scale doesn't make sense. And finally, I'm not sure what good using a horizontal bar chart here is. It immediately gives me the sense that P1 is "more" or "better" than P2. Much better would be something along the lines of https://vega.github.io/vega-lite/examples/layer_likert.html

But as I also pointed out in the other comment, I thought that the Legacy impl of this report showed the "Aggregate" results of this activity across all students in the course?

I then reset the activity on the page and went back to the page with the report and now see this:

Screenshot 2024-06-14 at 7 57 46 AM

So I think we probably should be only querying for the latest "evaluated" activity

rgachuhi commented 2 months ago

I tested this out locally with a new course. I first created a practice page and added a Likert activity. It contained three choices "Agree", "Neither Agree or Disagree" and "Disagree". I added two Items "Item one" and "Item two". I then added an activity report to a second page, published and accessed the course as a student.

Visiting the page with the report first correctly showed me the message that I hadn't answered the question on the other page.

After answering the question "Disagree" for Item 1 and "Agree" for item 2, then clicking "Submit" for the Likert, I went back to the page with the report and see this: Screenshot 2024-06-14 at 7 56 29 AM

The visualization doesn't seem to be correct in a few ways. First, it isn't showing all choices in the Y axis, only the two that I picked. Second, the Y axis scale doesn't make sense. And finally, I'm not sure what good using a horizontal bar chart here is. It immediately gives me the sense that P1 is "more" or "better" than P2. Much better would be something along the lines of https://vega.github.io/vega-lite/examples/layer_likert.html

But as I also pointed out in the other comment, I thought that the Legacy impl of this report showed the "Aggregate" results of this activity across all students in the course?

I then reset the activity on the page and went back to the page with the report and now see this: Screenshot 2024-06-14 at 7 57 46 AM

So I think we probably should be only querying for the latest "evaluated" activity

I have addressed the three issues commented on above. One; improved the visualization to something that makes more sense, two; ensured that the likert scalling works correctly, three; ensured that the last "evaluated" attempt is respected

The legacy impl is indeed reporting for individual users not the "Aggregate" :-)

rgachuhi commented 2 months ago
Screenshot 2024-06-11 at 7 28 53 PM

I noticed that Vegalite has a menu that allows you to open in an editor. Is there any way to disable this menu?

Also, is this number scale intentional? The numbers seem unnecessarily large