Found this content helpful? Log in or sign up to leave a like!

Use API to determine if student has completed requirement

Jump to solution
nils_k_hansen
Community Member

I need to use the API to determine if a student has completed a requirement in an item. I have for instance this item:

{'id': 688577, 'title': 'siden', 'position': 3, 'indent': 0, 'quiz_lti': False, 'type': 'Page', 'module_id': 118330, 'html_url': 'https://uia.instructure.com/courses/17945/modules/items/688577', 'page_url': 'siden', 'publish_at': None, 'url': 'https://uia.instructure.com/api/v1/courses/17945/pages/siden', 'completion_requirement': {'type': 'must_mark_done'}, 'published': True, 'unpublishable': True}

I then need to determine if a student has marked this item as done.

I know I can obtain a count of how many requirements a student has completed in a module, but I need information per item.

Can anyone help?

Labels (1)
0 Likes
2 Solutions
melodyc_lam
Community Coach
Community Coach

@nils_k_hansen -- You need to use the List Module Items call to get a list of all the items in a module, and pass along the student_id of the student that you want to look at, which will get this student's progress with the items. By the way, student_id is probably referencing the Canvas ID of the student (which is the Canvas identifier and is probably different from other identifiers for the student). 

Hope this helps!

View solution in original post

Thak you. The magic trick was to pass student_id as a parameter.

View solution in original post