How to get course requirements via /course API call?

Jump to solution
wmonroe
Community Novice

For a course, I want to get a count of the requirements.  There is no count of requirements on a course object, so I'd have to loop over all the modules, get the items and requirements.  Is that the only way to do this?

I do know that if I look at one student I can get their progress and find out their progress i.e. how many requirements they have completed, and how many there are.  Perhaps the reason there is no count of requirements on the course is that different student enrollments might have different numbers of requirements?

Labels (1)
1 Solution
stuart_ryan
Community Novice

Hi  @wmonroe ,

I wanted to get clarification on what you mean by requirements. Are you referring to the assignments/assessments that must be completed only, or are you also looking at module requirements from mastery paths?

I would be curious to hear a little more. From what you have mentioned I would say looping over the modules would be the solution which comes to mind, though, as you have mentioned this may differ student to student (and add further complexity if you are using mastery paths). I would be inclined to agree with your line of thinking as this is why you would not have a count on the course level, thinking on it further, you could also have group or section specific assignments and requirements.

If you are looking for something more general, I would consider looking only at a count of the assignment items in a course, that should give you a good generalisation, of course, this depends on the specific use case of why you are looking for the requirements count.

Would love to hear more about what you are hoping to use the statistic for, as always, there may be another way we could look at this.

Hope that helps!

Stuart

View solution in original post