Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: get data with superset API to the LMS #2

Closed
wants to merge 4 commits into from

Conversation

Ian2012
Copy link
Member

@Ian2012 Ian2012 commented Jun 16, 2023

Description

This PR adds a demo on how to load data from the superset API with the superset API client.

  • Add an iframe to superset via HTML
  • Get results from dashboards.
  • Get results from custom queries (raw data, and aggregated queries)

The XBlock created adds a hardcoded iframe to the LMS

The XBlock aside performs multiple API calls to get data back from superset and renders it for every xblock. This opens the custom for specific reports based on the current XBlock

image

@Ian2012 Ian2012 marked this pull request as draft June 16, 2023 19:51
@bmtcril
Copy link

bmtcril commented Jun 20, 2023

This is exciting work, thanks for taking it on. I think we would not want to have the LMS making synchronous calls to superset on the backend if we can avoid it. How did the iframe work out for you?

@Ian2012
Copy link
Member Author

Ian2012 commented Jun 20, 2023

The iframe was used with three different users: superuser, instructor and student.

The iframe filtered the information based on the given user permissions. I only find 1 problem, the user needs to authenticate in superset before loading the LMS, because I was unable to login using the iframe (probably due to TPA)

seamless
frameBorder="0"
scrolling="no"
src="http://superset.local.overhang.io:8088/superset/explore/p/R19Gpb0mQ6D/?standalone=1&height=400"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ian2012 CC @bmtcril I haven't dug into this possibility, but if we have charts available for everything we want to show in the LMS, then can't simply embed iframes that reference those chart (aka slice) IDs?

E.g. http://superset.local.overhang.io/superset/explore/?form_data={"slice_id":6}&standalone=1 shows the "Events per day" chart in its own window. If you're not logged into Superset then you have to login, but the SSO redirects will get you back there.

cf https://github.com/apache/superset/blob/master/superset/explore/commands/get.py

(For dashboards, there's a few different standalone querystring options, but on/off seems to be the most you get with charts.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't have time to test your idea, but it seems like a feasible solution.

For the instructor dashboard integration, @mariajgrimaldi is working on an openedx filter to allow that integration:

openedx/openedx-filters#96

here is an screenshot of an on-task integration via iframe:

image

cc @bmtcril

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could have a series of instructor-related reports and charts

@bmtcril
Copy link

bmtcril commented Jul 14, 2023

I think we will need to have both a block-level integration that pulls one or more charts in that are specific to the block-type and the individual block (problem difficulty, % of enrolled users who answered the question..., or % of enrolled users who have watched a video / completed the video / the video timeline etc). And also one that can hook into the instructor dash that would allow course-level reports (enrolled students over time, % of students passing, list of students who are behind, etc).

@Ian2012
Copy link
Member Author

Ian2012 commented Jul 14, 2023

All the implementations could leave in a single plugin platform-plugin-superset or platform-plugin-aspects (following the new convention for naming apps).

We could manage aspects dependencies in that repository to avoid this pattern https://github.com/openedx/tutor-contrib-aspects/blob/main/tutoraspects/plugin.py#L47-L52 which overrides dependencies and developers wouldn't need to override that setting

@Ian2012
Copy link
Member Author

Ian2012 commented Dec 13, 2023

Closed in favor of the new plugin: https://github.com/eduNEXT/platform-plugin-superset

@Ian2012 Ian2012 closed this Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants