Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Hello to all,
We have an integration between a system A and Canvas and we're obtaining the necessary information through Canvas APIs.
This question is because we're having some troubles with enrollments start and end dates (start_at and end_at).
Using Enrollment by ID API to get all information for a specific enrollment id, we always get a null value for both fields: start_at and end_at as shown in the image below:
We were specting start_at and end_at would be populated with section dates, course dates or term dates (in that priority order) for each enrollment, but we found both fields with null values.
Could someone help me understand how this two fields work? When are they populated?
We need to use section start and end dates as enrollments start and end dates. We configured this two dates for a section and activated the "Users can only participate in the course between these dates" option. These tests were done in test and beta environments.
Thanks in advance.
Solved! Go to Solution.
It seems that the only time these fields can be populated is if the enrollment object is created via API, not CSV or GUI. Here is the field w/ comments:
start_at (datetime, optional): The start time of the enrollment, in ISO8601 format.,
end_at (datetime, optional): The end time of the enrollment, in ISO8601 format.,
Enrollments - Canvas LMS REST API Documentation
The SIS csv does not list support for start/end date at the enrollment object level:
SIS Import Format Documentation - Canvas LMS REST API Documentation
For us, this works fine as our start/end dates are course and/or term based and not specific to each user. Canvas does provide these fields in CSV for courses and terms. All our enrollment start/end dates are null like your example.
There is very limited documentation on what the enrollment start/end date would do if populated, I would guess it would override the start/end date of the course for just that enrollment. You could test out by creating an enrollment via API and populating those fields.
If you are not needing any user specific start/end dates, I would suggest sticking with the course/term start/end dates.
Thanks,
Anthony Hess
@lucas_faule , I've shared this highly specific question about using the Canvas API with the Canvas Admins group.
@lucas_faule , I'm also going to share this with the Canvas Developers group in the Community since they are the ones who normally handle the back-end integrations with Canvas and other systems.
It seems that the only time these fields can be populated is if the enrollment object is created via API, not CSV or GUI. Here is the field w/ comments:
start_at (datetime, optional): The start time of the enrollment, in ISO8601 format.,
end_at (datetime, optional): The end time of the enrollment, in ISO8601 format.,
Enrollments - Canvas LMS REST API Documentation
The SIS csv does not list support for start/end date at the enrollment object level:
SIS Import Format Documentation - Canvas LMS REST API Documentation
For us, this works fine as our start/end dates are course and/or term based and not specific to each user. Canvas does provide these fields in CSV for courses and terms. All our enrollment start/end dates are null like your example.
There is very limited documentation on what the enrollment start/end date would do if populated, I would guess it would override the start/end date of the course for just that enrollment. You could test out by creating an enrollment via API and populating those fields.
If you are not needing any user specific start/end dates, I would suggest sticking with the course/term start/end dates.
Thanks,
Anthony Hess
Thankyou very much, Anthony.
Your answer has been very helpful. As you mentioned there is limited documentation about these dates. We did some test and as you said enrollment dates override term/course/section dates when are specified.
I really don't understand the reason of its existence since you cannot modified them by GUI or CSV. Only way is through API calls. One thing I want to share is I discovered that if you call "Enroll a user" with same basic information, the enrollment is updated. The call returns the same enrollment_id.
Based on this information we'll have to analyze which is the best scenario that fits ours requeriments.
Thanks again!!!
I realize that this is an old question, but I'm wondering if in the interim anyone in Canvas Admins or Canvas Developers has gained more experience with this. Enrollment start and end dates are now available in the enrollments.csv but aren't mentioned as settable fields in the enrollment endpoint, although they are returned in the enrollment object--which seems to be a complete inversion of the situation described in this thread.
What hasn't changed, though, is that effect of setting the dates doesn't seem to be described anywhere. In particular, student enrollment dates are noticeably absent from the FAQ (How do term dates, course dates, and section dates work in Canvas? ) and PDF (https://s3.amazonaws.com/tr-learncanvas/docs/TermsCoursesandSectionEnrollments.pdf ) on complex date interactions.
In particular, can this be used to to give students access to a course outside of the term and course dates, and if so, how does it interact with "only allow participation between these dates"? What happens at the end of the enrollment, or from the end of enrollment to the end of term, or the end of term to the end of enrollment?
@jsavage2 , although I could not find any reference to this in the API docs or anywhere else, the code below is working pretty well to me:
curl https://<canvas>/api/v1/courses/:course_id/enrollments \
-X POST \
-H 'Authorization: Bearer <token>' \
-F 'enrollment[user_id]=2' \
-F 'enrollment[type]=StudentEnrollment' \
-F 'enrollment[start_at]=2019-01-01T00:00:00Z' \
-F 'enrollment[end_at]=2020-01-01T00:00:00Z' \
HTH
Hi Tulio,
Thanks! I hadn’t gotten around to testing it. I’m still not 100% sure what it does, though, in terms of interaction with the course and terms dates, particularly once we start ticking course override boxes.
Get Outlook for iOS<https://aka.ms/o0ukef>
Thank you for revisiting this and updating it with useful info. What I'm not clear on is how these fields can be described as "Sticky" if they can't be set in the UI?!
Has anyone tested setting the enrollment start/end dates as a way to handle rolling enrollments in a course? Our institution is setting up an integration using API endpoints (vs. SIS imports) and would like to specify enrollment dates to avoid creating a lot of sections for rolling enrollments. When I did a quick test and specified a limited enrollment window for a student in an open section, the enrollment expired with the dates I specified and the student could no longer participate. I didn't test with any "only allow participation" options, so I'm wondering if there could be any hiccups depending on course settings.
Good day,
We started today with integration development to set these from our SIS
enrollment[start_at] DateTime
The start time of the enrollment, in ISO8601 format. e.g. 2012-04-18T23:08:51Z
enrollment[end_at] DateTime
The end time of the enrollment, in ISO8601 format. e.g. 2012-04-18T23:08:51Z
We'll test it together with this:
course[start_at] DateTime
Course start date in ISO8601 format, e.g. 2011-01-01T01:00Z This value is ignored unless 'restrict_enrollments_to_course_dates' is set to true.
course[end_at] DateTime
Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z This value is ignored unless 'restrict_enrollments_to_course_dates' is set to true.
course[restrict_enrollments_to_course_dates] boolean
Set to true to restrict user enrollments to the start and end dates of the course. This value must be set to true in order to specify a course start date and/or end date.
Hoping to set restrict enrollments on and off to test the differences the user would experience ito course access and interaction. We're not testing sections at this stage. We are use to Moodle when student enrolment dates can be set and manipulated on API and GUI which works well for rolling courses.
I also need to test fixed and rolling courses, will hopefully feedback soon.
To participate in the Instructure Community, 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.