When is a boolean not?

dtod
Community Contributor

Was trying to work out how to remove a new tool from course navigation without reinstalling it, and came up with this which worked:

var url='https://<ourdomain>.instructure.com/api/v1/accounts/1/external_tools/<uniqueidhere>';
$.ajax({
url: url,
type: 'PUT',
data: 'course_navigation[default]=disabled',
success: function(data) {
alert('Tool was disabled.');
}
});

but took some wall-directed head-banging before realizing that the parameter was not true or false, but disabled or enabled. Is this me not reading the docs properly, or what?

0 Likes