Open p-gw opened 3 months ago
Another possibility is to keep the current interface and require an additional iterator over items (and persons) such as,
m = MyModel()
for i in eachitem(m)
getitemlocations(m, i)
end
However it is not so clear what exactly eachitem
iterates. Is it item indexes, item estimates, or something completely different?
Fetching person and item locations using the current interface does not work for the intended use case. The reason is that in order to fetch all items with
getitemlocations(m, i)
all itemsi
must be known.However, downstream packages cannot know the implemented ids (e.g. from RaschModels) or item parameters (e.g. from ItemResponseFunctions`).
To fetch all items we need another function signature
getitemlocations(m)
without the need to specify the item indices.