AnsweredAssumed Answered

Bug: courses/{id}/users only returns the first 25 users

Question asked by dw0054900 on Jan 31, 2017
Latest reply on Feb 1, 2017 by dw0054900

Hey,

On both my development image and a customer's hosted instance the `courses/{id}/users` endpoint only returns the first 25 users. For example, the course `_3_1` has 125 users, but only 25 are returned:

In [35]: api.get("courses/_3_1/users").get_json()

Out[35]:

{

    u'results': [

        {

            u'availability': {u'available': u'Yes'},

            u'courseId': u'_3_1',

            u'courseRoleId': u'Student',

            u'created': u'2017-01-27T20:07:25.203Z',

            u'dataSourceId': u'_2_1',

            u'userId': u'_6_1',

        },

         … 24 more students …

    ]

}

Notice that:

  • No pagination options are returned
  • Manually adding pagination options (ex, `?offset=25`) works, but as if there are only 25 results (ex, `offset=25` yields an empty list of results, and `offset=24` yields one result)
  • Changing the limit (ex, `?limit=50`) has no effect

 

I've confirmed that this affects both my development instance and a client's hosted instance:

Client’s hosted instance: {"learn":{"major":3100,"minor":6,"patch":0,"build":"6beebfe"}}

My dev instance: {"learn":{"major":3100,"minor":0,"patch":0,"build":"401e22b"}}

 

What should I do about this? Is there any way I can get a complete roster?

 

Edit: I see that this has already been reported as a bug: Limit parameter to get all memberships

 

Can you suggest a workaround, or some other way I could get a course roster list? And is there a timeline for releasing a fix?

Outcomes