instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.4k stars 2.42k forks source link

In the Beta environment, sending properties wrapped in brackets to certain API calls results in no visible error but results in no value saved #2334

Open MakotoTheKnight opened 3 months ago

MakotoTheKnight commented 3 months ago

Summary: We have been leveraging the Update Course Settings API PUT call to Canvas to set the announcements for courses. With some changes to the environment, this no longer seems to work. In Beta, this fails and does not return true when called. In test and production, this works as expected.

Steps to reproduce:

  1. Pick any course you have the permission to update (e.g. api/v1/courses/<course>/settings)
  2. Pass in as form parameters the following (brackets are important):
    [show_announcements_on_home_page] = true
  3. Observe response from Canvas.

Expected behavior:

show_announcements_on_home_page returns true

Actual behavior:

In beta only, show_announcements_on_home_page returns false

Additional notes:

We're sort of stuck with the KSU Canvas API for the time being, and on inspection this behavior has been present in this library for about four years now.

tarunsankhla commented 2 months ago

can I take this issue ?

I am new to the code base but I will figure things out to resolve the issue

MakotoTheKnight commented 2 months ago

can I take this issue ?

I am new to the code base but I will figure things out to resolve the issue

@tarunsankhla We've heard from Instructure that this will not be fixed on their end, and we don't disagree with the assessment (honestly, the fact that it worked like this was surprising to begin with). We're pivoting instead to forking the KSU library to fix the issue ourselves for now.