Add Participation field to Courses API

0 Likes
(2)

In the spring of 2021 a new field called Participation was added to course settings.  The values of Participation are Term and Course.  There is no way to retrieve this setting for a course using the API.  Please add Participation to the Courses API.

8 Comments
Stef_retired
Instructure Alumni
Instructure Alumni
Status changed to: Open
 
dwillmore
Community Champion

This is a critical need for us.  Not only did the field get added to settings but the setting defaults to Term when a course is created manually or through our SIS ILP integration.   Our fall courses are all set to Term and I need to set them to Course.

Can we change the default back to course?  This is the way the setting used to default.

James
Community Champion

@kiporter@dwillmore 

If I am reading correctly, this is already part of the API and has been for at least 7 years (looking at the source code).

I went to the course settings page and changed the Participation setting and looked at what was sent back to Canvas. It is true that request does not use an API call. Then I changed it to the other settings and saved it to see what was different between the two requests.

The difference is course[restrict_enrollments_to_course_dates].

It turns out that is part of the Courses API. It is part of Update a course endpoint, not the Update Course Settings endpoint. The description is incorrectly worded, and now incorrect. What is there wouldn't necessarily indicate that this is what it is doing.

Set to true to restrict user enrollments to the start and end dates of the course. This parameter is required when using the API, as this option is not displayed in the Course Settings page.

That is use true for Course dates and false for Term dates.

I believe what they meant is "This parameter must be set using the API, as this option is not displayed in the Course Settings page." Anyway, it is now displayed, so that statement is incorrect as well as confusing.

I tested it to confirm the setting works. I used JSON, but that shouldn't affect it.

PUT /api/v1/courses/:id

{"course":{"restrict_enrollments_to_course_dates":true}}

 

You can get this setting by fetching information about a course.

I also went to a course that was created earlier today using a SIS import. I specify dates for the course during the import and Canvas set the participation to Course, the same as has since at least 2013 when we started using SIS imports. I imagine that if I didn't set the dates for the course, that it would use the term dates and default to term participation.

There is one other thing I can think of that might be affecting this, but I would check the lack of dates for the course during the import before I check this. The default for our institution (Admin > Settings) is to restrict students from viewing course before course start date. I did not test a SIS import with dates without that setting checked, but it may be possible that a SIS import without having restrictions may cause it to default to term. 

dwillmore
Community Champion

@James Thank you, that did the trick.

Stef_retired
Instructure Alumni
Instructure Alumni
Status changed to: Archived
 
Stef_retired
Instructure Alumni
Instructure Alumni

Many thanks to @James for providing the location of the field in the API. We've archived the idea.

lisa_friesen
Community Member

I have instructors who are having issues viewing the Participation field.  Every instructor can see the Participation field label, but multiple instructors cannot see the field itself,so there course is set to the default of term.  This is causing an issue with intersession courses.

I have talked to Canvas Tier I and 2, and have found that some believe it is a CSS issue, while others believe it is a permissions issue, but I don't know the best starting place to determine this.

Any help would be greatly appreciated!

James
Community Champion

@lisa_friesen 

I'm not sure this is the right place to ask this. It's an archived idea conversation, which means that it won't see as much action as if it was asked in the questions area.

Does your institution load any custom CSS or JavaScript through the theme editor? If so, it's possible that it is interfering. You could open the developer tools in the browser and look at the console when you load the settings page to see if there are any errors that might be causing the issue.

As for general troubleshooting, I would look for common characteristics that might narrow down the issue.

Are the people where it works all using the same browser while the others are using a different browser? Are people using different versions of the browsers (a lot of Safari users are using older versions)?

Do the people who can see it have different roles within the course than people who cannot see it? If you only have one teacher role and it works for some but not others, then it's probably not a permissions issue, but if some are TAs or there are primary teachers and secondary teachers, then it might be.

If someone cannot see the field, then you might go into the developer tools for the browser and inspect the element. If it is there, but not showing, it might be CSS. If it's not there at all, it's more likely a role/permissions issue.

You might also try clearing the cookies and cache in the browser. I used to be a fan of clearing the cache and not clearing cookies, but I had an issue earlier this summer where things just would not work until I actually cleared the cookies. You can do that (in Chrome) for just your Canvas site by clicking on the padlock at the front of the URL, then choosing cookies, and remove (it will log you out of Canvas, but that's better than having all of your cookies removed if you rely on them for convenience purposes).

These are all things you will have to look into. Those of us in the Community are not Canvas support and we don't have access to your institution's Canvas to check and see.