Problems with muting assignments using new Grade Book

tbednall
Community Member

Hi folks, I have a question about the new Canvas API.

I am trying to upload some grades automatically via the API, and would like to hide the grades automatically by default. In the previous Grade Book, I would do this using the "muted" attribute, which I understand has now been depreciated.

For individual submissions, I have tried changing the "posted_at" attribute to "". I have also tried to change the "post_manually" attribute to True for the assignment. However, none of these measures appear to work, and the grades always appear visible in grade book.

I'm using the canvasapi wrapper for Python (https://github.com/ucfopen/canvasapi). My code for setting up the assignment is:

new_assignment = course.create_assignment({'name': config["AdjustedMark_Name"], 'notify_of_update': False, 'points_possible': config["RescaleTo"], 'description': 'This assignment is your Peer Mark for the team project.', 'published': True, 'post_manually': True, 'due_at': datetime.strftime(session["DueDate"], '%Y-%m-%dT23:59:59')})

I have noticed that the "post_manually" attribute does not appear to work. When I check the assignment it seems to be set to False.


My code for individual submissions is:

for submission in new_assignment.get_submissions():
...
   submission.edit(submission={'posted_grade': adj_score(ID), 'posted_at': "", 'submitted_at': datetime.strftime(submission_date(ID), '%Y-%m-%dT23:59:59')})

With the "posted_at" attribute, I have set it to "". However, this does not seem to work in terms of hiding the grade in the Grade Book. Do I need to set it to "null" or another value?

Labels (1)
0 Likes