The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Is there a way to see the different sections a student has been a member of at different times during a semester?
We use sections for lecture, tutorial, lab, etc groupings. These sections are created by data feeds from the timetable but it is also possible to manually add, edit and delete sections and members. If someone is currently in Section X is there an easily accessible record of sections they were previously members of?
Solved! Go to Solution.
There is a limited history available.
The List enrollments endpoint of the Enrollments API will allow you to specify state[]=deleted, which will return information about previous enrollments. If you leave off the state[], it returns information for active and invited enrollments only, which would show you where the students currently are but not where they had been. There are other enrollment states listed in the documentation.
That API call will return a lot of information. The created_at field would be an ISO-8601 datetime of when the student was added to the section.
The updated_at field should be the last time the object was modified. For enrollments that are deleted, the updated_at field would be the time the enrollment was deleted. However, in my data, every single one of my deleted entries had the exact same date and time (down to the second), so I would not put a lot of stock into that. There is a last_activity_at field that had dates and times after the enrolment had been deleted.
In my testing for this response, enrollments that I removed did show the correct updated_at field, so I don't know why they were all the same for the others. Maybe there was something that reset the dates internally on the Canvas database servers. If the numbers look right, then you can use them, but if they don't, the be careful.
The information is keyed to the section, user, and role type. By that I mean that if I remove a user and then add them back to the same section in the same role, then it keeps the same enrollment ID and just changes the state and they are no longer deleted (they are now active). If I then delete the enrollment again, they go back to the deleted state. The created_at is still the original time that the enrollment was created but the updated_at is the date of the last change.
That means that there is a history, but only of the last time the enrollment entered that state. For the user I removed, re-added, and then removed, the only records I have are when they first were added and when they were last changed (the final removal). I have no way of knowing that they were in the section, then out, then back in, and finally back out.
For most people, it probably won't matter, but I wanted you to be aware of that limitation. First time and last time only, but no history of changes between those times.
In general, Canvas does not make available logs of changes. You would need to gather that information as it happened (using Canvas Services Live Events) if that was important to you. Live Events is event driven so it only gets triggered when something happens. The other way to get that data is by polling the data. Each day, you could download the enrollments, and keep track of changes. Both of those need to be set up ahead of time, though. There's no easy way to go back and retrieve it after the fact.
I don't know what your technical skills are. You asked for easily accessible. To some people, that means a button they can click in Canvas and the answer to that is no, there is not. To others, they are comfortable with the Canvas API and in that case, it is a fairly easy API call to make.
@John_Gaspar @James' explanation is great as always. I will say there is one possible caveat. It depends on how your institution lists the enrollments. If they populate the "start_at" and "end_at" fields, that may be useful for section enrollments as that's what we do. When a student moves from one section to another, we have that shown in those fields. This would be visible in the "list enrollments" for a user API call. I do know that not many institutions use those fields, however. Just another idea to explore.
Cheers,
Chad Scott
Hello,
It depends. If an enrollment is deleted - it's gone.
If the enrollment is completed, inactive, concluded - the enrollment is still listed for the student and your Canvas admin can pull that information for you. As a teacher, you may be able to click on their name in People, then again on the side panel to see their course profile and on it their enrollments, but I can't find a student with multiple enrollments to test.
Cheers,
Chad Scott
I agree with @chadscott ; however, it sounds like you want to know that during a semester student A has been in section 1 the first 3 weeks, , sections 2 the nextt 3 weeks, section 3 for the rest of the semester. It is now week 8 of the course and you want to go back and see that student A has previously been in section 1 and section 2 while currently being in section 3. From my limited experience, my guess is that you will only be able to find out about a students current section. Whether or not past section enrollment data is available through an API information grab is beyond my capabilities. I will mention @James here because he does a lot of work with the data and probably knows off the top of his head whether that information is available or not.
My guess would be that you are out of luck, and that going forward, you will need to keep a record of students in a section every time sections are created.
There is a limited history available.
The List enrollments endpoint of the Enrollments API will allow you to specify state[]=deleted, which will return information about previous enrollments. If you leave off the state[], it returns information for active and invited enrollments only, which would show you where the students currently are but not where they had been. There are other enrollment states listed in the documentation.
That API call will return a lot of information. The created_at field would be an ISO-8601 datetime of when the student was added to the section.
The updated_at field should be the last time the object was modified. For enrollments that are deleted, the updated_at field would be the time the enrollment was deleted. However, in my data, every single one of my deleted entries had the exact same date and time (down to the second), so I would not put a lot of stock into that. There is a last_activity_at field that had dates and times after the enrolment had been deleted.
In my testing for this response, enrollments that I removed did show the correct updated_at field, so I don't know why they were all the same for the others. Maybe there was something that reset the dates internally on the Canvas database servers. If the numbers look right, then you can use them, but if they don't, the be careful.
The information is keyed to the section, user, and role type. By that I mean that if I remove a user and then add them back to the same section in the same role, then it keeps the same enrollment ID and just changes the state and they are no longer deleted (they are now active). If I then delete the enrollment again, they go back to the deleted state. The created_at is still the original time that the enrollment was created but the updated_at is the date of the last change.
That means that there is a history, but only of the last time the enrollment entered that state. For the user I removed, re-added, and then removed, the only records I have are when they first were added and when they were last changed (the final removal). I have no way of knowing that they were in the section, then out, then back in, and finally back out.
For most people, it probably won't matter, but I wanted you to be aware of that limitation. First time and last time only, but no history of changes between those times.
In general, Canvas does not make available logs of changes. You would need to gather that information as it happened (using Canvas Services Live Events) if that was important to you. Live Events is event driven so it only gets triggered when something happens. The other way to get that data is by polling the data. Each day, you could download the enrollments, and keep track of changes. Both of those need to be set up ahead of time, though. There's no easy way to go back and retrieve it after the fact.
I don't know what your technical skills are. You asked for easily accessible. To some people, that means a button they can click in Canvas and the answer to that is no, there is not. To others, they are comfortable with the Canvas API and in that case, it is a fairly easy API call to make.
@James Thanks for responding. I knew you would have the information needed.
Thanks @James. That's a very detailed answer and much appreciated. I haven't used the APIs before but will give it a go.
@John_Gaspar @James' explanation is great as always. I will say there is one possible caveat. It depends on how your institution lists the enrollments. If they populate the "start_at" and "end_at" fields, that may be useful for section enrollments as that's what we do. When a student moves from one section to another, we have that shown in those fields. This would be visible in the "list enrollments" for a user API call. I do know that not many institutions use those fields, however. Just another idea to explore.
Cheers,
Chad Scott
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.