Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better custom gradebook column CRUD #531

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Rojods
Copy link

@Rojods Rojods commented Mar 9, 2022

Without the {"content": column_data}, we get a nasty 500 error everytime this algorithm tries to execute. I was surprised to hit it the first time I executed my script. The other change is to be able to set the column data for the first time. When there is already some data in the custom column, the get_entries routine returns and then we can modify then. But if there's nothing there in the first place, it is impossible with the current code base to add anything to start with. Therefore I propose to add in the CustomGradebookColumn a update the column data; this way it will be possible to create entries as well as modify them.

Proposed Changes

  • kwargs improvement
  • new method to update or create ColumnData which works even when they don't exist.

Fixes

  • 500 errors when trying to use the python API for updating custom gradebook column entries.

For the record, I've modified the source code locally and tried using it successfully.

Without the `{"content": column_data}`, we get a nasty `500` error everytime this algorithm tries to execute. I was surprised to hit it the first time I executed my script. The other change is to be able to set the column data for the first time. When there is already some data in the custom column, the `get_entries` routine returns and then we can modify then. But if there's nothing there in the first place, it is impossible with the current code base to add anything to start with. Therefore I propose to add in the `CustomGradebookColumn` a update the column data; this way it will be possible to create entries as well as modify them.
@gqmaguirejr
Copy link

I would like to support Rodolfo's posting regarding missing functionality as it should be possible to create new content rather than just update existing content.

@Thetwam Thetwam modified the milestone: CanvasAPI v3.1.0 Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants