use REST API to unmute an assignment?

Jump to solution
BillA
Community Explorer

I'm using https://github.com/kajigga/py_canvas_api to allow myself to do some routine Canvas tasks from Python scripts rather than from the Canvas GUI.  I would like to be able to unmute an assignment.  I have been able to use the REST API to change due dates on assignments, to enter grades for submissions, to change the 'published' state of assignments, and to read the 'muted' state of assignments.  But I have not succeeded at changing the 'muted' state of assignments except by using the web GUI gradebook.  Is there a mechanism via the API to unmute an assignment?

This works:

data = {"assignment": {"published": False}}
self.c.courses(self.cid).assignments(11328924).put(data)

but this does not work:

data = {"assignment": {"muted": False}}
self.c.courses(self.cid).assignments(11328924).put(data)

This is my first time posting a question here, so I apologize in advance if it turns that that I have posted in the wrong place.

-Bill

 

0 Likes
1 Solution
BrianHall76
Community Explorer

Hi Bill.  I wasn't actually familiar with the "muted" property for an assignment, but when I found it in the Assignment definition in the Rest API documentation there's a note that it is Deprecated.  Perhaps because of that the property can't be set/updated via the API call?

I actually don't see the "Mute Assignment" option in Gradebook UI anymore.  Is it still available in your Canvas version?  As far as I'm aware, it was replaced with Grade Posting Policy a little while back.

View solution in original post