Khan / khan-api

Documentation for (and examples of) using the Khan Academy API
http://www.khanacademy.org
377 stars 75 forks source link

Calculating Percent Complete for a given course #122

Open matt-green-ra opened 7 years ago

matt-green-ra commented 7 years ago

Hello there. I'm a CS/Math teacher at Riverpoint Academy who used Khan Academy with my student body (160 kids, grades 9-12) last year and LOVED it. Last year I would pull down the spreadsheet coach reports and then used some Visual Basic to pull it all together into a quick report that would let us see a student's percentage complete, number of targets practiced, level 1, level 2 and mastered. It also gave us time spent in the last 2 days, last 7 days, last 30 days and all time. It worked fine but was kludgy.

This year I've begun to rewrite it in the Wolfram Language. With much help, the OAuth flow is now working and I'm making authenticated calls to both the public and private API. I've found that I can make a call to: https://www.khanacademy.org/api/internal/user/students/skills?... and supply it with a ListId associated with the class I've put them in. It returns all the data I need... and more.

I've got mastery data on each student in that course on the targets in the course (about 180) and a whole bunch more targets (926 in total at last API call for a course using the Algebra mission.

How do I filter the targets so I can use just the targets used as part of the course so I can calculate their percentage complete? I used this last year to calculate the weighted averages in my Visual Basic spreadsheet foo and it worked great. I pulled data from a sheet in the coach excel workbook entitled, "Mission Specific" and was able to make the calculation easily.

Can you guide me on how I might do this using the API?

I know that you encourage use of your private API, which to be honest feels really weird to me... like I'm trespassing or something. I don't know if its okay to ask for help on this but I figured it was worth a shot. Thank you!