cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Member

How to get sis_id in quiz report generated by API?

Jump to solution

I've written a script to generate and download reports for all quizzes in a course, but it turns out that reports generated this way do not include the sis_id for the students.  If the report is generated manually, this appears as the third column, but I can't figure out a way to get the same data in the API generated version.  I've tried adding 'quiz_report[include]=sis_user_id' (and just 'sis_id'), but that did not seem to do anything.  Does anyone know how to get the sis_user_id in the api generated quiz report?

Thanks!

-David Rios

1 Solution

Accepted Solutions
Highlighted
Adventurer III

riosd@oregonstate.edu ,

Does the user running the script have permissions to obtain the SIS IDs?

The reason I ask is because when Canvas makes the call to generate the student analysis, it uses the API call. There should be no difference between what you get from the API and what Canvas gets, one exception being if the token being used doesn't have the permissions to view the SIS IDs.


It makes a POST with a payload of

{"quiz_reports":[{"report_type":"student_analysis","includes_all_versions":true}],"include":["progress","file"]}

View solution in original post

4 Replies
Highlighted
Adventurer III

riosd@oregonstate.edu ,

Does the user running the script have permissions to obtain the SIS IDs?

The reason I ask is because when Canvas makes the call to generate the student analysis, it uses the API call. There should be no difference between what you get from the API and what Canvas gets, one exception being if the token being used doesn't have the permissions to view the SIS IDs.


It makes a POST with a payload of

{"quiz_reports":[{"report_type":"student_analysis","includes_all_versions":true}],"include":["progress","file"]}

View solution in original post

Highlighted
Community Member

This does appear to be the reason, despite the fact that it is being run by a teacher and they have the 'SIS Data - read' permission.  In fact, there are only five permissions they don't have, and none of them sounds like they relate to SIS data at all.  Also, I haven't been able to create a scenario where I don't get to see a student's sis id while masquerading as a teacher, so it really doesn't seem like that permission is missing.  The only place it seems to come up is generating these reports.  I've generated them as a teacher in a course with multiple sections and just one, the sis id is missing in all cases.  Do you have any thoughts on how I can address this?

Thanks!

-David

0 Kudos
Highlighted
Community Member

Okay, I got it.  In a course with multiple sections, I couldn't get sis data because the teacher wasn't a teacher in all the sections.  I found a different course where the same teacher was in all the sections, and the report has the sis data there.  I'm not sure why it didn't appear in the single section course I tested, but I'm pretty sure this is the key.  Thanks for pointing me in the right direction!

-David

Highlighted
Community Member

Actually, I spoke too soon.  It looks like the key factor is whether or not the course is past term.  I've been working almost entirely with past term courses for this purpose, but the course I found where the teacher was in all sections happened to be current term.  I tested several more past/current term courses, and the sis data is missing in the past term courses.  I'm not sure if this is a setting somewhere or expected behavior, I'll have to keep digging.  Thanks again!

Thanks!

-David

0 Kudos