JSON entry for assignments with multiple due dates for different sections
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an assignment (a graded discussion topic) that is assigned to different sections with different due dates for each section. It is not assigned to all students, only by section.
When I query the API for the JSON entry for this assignment:
1) It has a listed due date which is one of the due dates assigned to one of the sections
2) I can't find anywhere in the JSON entry where it lists who the assignment is assigned to and what the due date for that group of students is. 'has_overrides' is True, but I can't find those overrides listed anywhere.
Can anyone help me with this? JSON entry is below if anyone needs it.
{
'id': 7267939,
'description': '<div class="entry-content ">\n<div class="discussion-section message_wrapper">\n<div class="message user_content enhanced" data-bind="message">\n<p><span>What role do microbes play in the human body? Why do we study them? What percentage of microbes do you think cause disease in humans?</span></p>\n</div>\n</div>\n</div>\n<div id="discussion-toolbar" class="toolbarView unsubscribed"></div>',
'due_at': '2024-08-29T22:50:00Z',
'unlock_at': '2024-08-29T01:00:00Z',
'lock_at': '2024-08-29T22:50:00Z',
'points_possible': 1.0,
'grading_type': 'points',
'assignment_group_id': 1885435,
'grading_standard_id': None,
'created_at': '2024-08-05T18:11:01Z',
'updated_at': '2024-08-05T23:11:00Z',
'peer_reviews': False,
'automatic_peer_reviews': False,
'position': 3,
'grade_group_students_individually': False,
'anonymous_peer_reviews': False,
'group_category_id': None,
'post_to_sis': False,
'moderated_grading': False,
'omit_from_final_grade': False,
'intra_group_peer_reviews': False,
'anonymous_instructor_annotations': False,
'anonymous_grading': False,
'graders_anonymous_to_graders': False,
'grader_count': 0,
'grader_comments_visible_to_graders': True,
'final_grader_id': None,
'grader_names_visible_to_final_grader': True,
'allowed_attempts': -1,
'annotatable_attachment_id': None,
'hide_in_gradebook': False,
'secure_params': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsdGlfYXNzaWdubWVudF9pZCI6ImMxZGFjZmJmLTk0YWItNGFlNi1iZDZjLWQ4Njk2ZGJlNjRhMCIsImx0aV9hc3NpZ25tZW50X2Rlc2NyaXB0aW9uIjoiXHUwMDNjZGl2IGNsYXNzPVwiZW50cnktY29udGVudCBcIlx1MDAzZVxuXHUwMDNjZGl2IGNsYXNzPVwiZGlzY3Vzc2lvbi1zZWN0aW9uIG1lc3NhZ2Vfd3JhcHBlclwiXHUwMDNlXG5cdTAwM2NkaXYgY2xhc3M9XCJtZXNzYWdlIHVzZXJfY29udGVudCBlbmhhbmNlZFwiIGRhdGEtYmluZD1cIm1lc3NhZ2VcIlx1MDAzZVxuXHUwMDNjcFx1MDAzZVx1MDAzY3NwYW5cdTAwM2VXaGF0IHJvbGUgZG8gbWljcm9iZXMgcGxheSBpbiB0aGUgaHVtYW4gYm9keT8gV2h5IGRvIHdlIHN0dWR5IHRoZW0_IFdoYXQgcGVyY2VudGFnZSBvZiBtaWNyb2JlcyBkbyB5b3UgdGhpbmsgY2F1c2UgZGlzZWFzZSBpbiBodW1hbnM_XHUwMDNjL3NwYW5cdTAwM2VcdTAwM2MvcFx1MDAzZVxuXHUwMDNjL2Rpdlx1MDAzZVxuXHUwMDNjL2Rpdlx1MDAzZVxuXHUwMDNjL2Rpdlx1MDAzZVxuXHUwMDNjZGl2IGlkPVwiZGlzY3Vzc2lvbi10b29sYmFyXCIgY2xhc3M9XCJ0b29sYmFyVmlldyB1bnN1YnNjcmliZWRcIlx1MDAzZVx1MDAzYy9kaXZcdTAwM2UifQ.UFJmY20zQ5IEPZ5KsLUQGZJyQ7v83GDjOSY3xvsFawI',
'lti_context_id': 'c1dacfbf-94ab-4ae6-bd6c-d8696dbe64a0',
'course_id': 1389750,
'name': 'Week 1 - DQ1',
'submission_types': ['discussion_topic'],
'has_submitted_submissions': False,
'due_date_required': False,
'max_name_length': 255,
'in_closed_grading_period': False,
'graded_submissions_exist': True,
'is_quiz_assignment': False,
'can_duplicate': True,
'original_course_id': None,
'original_assignment_id': None,
'original_lti_resource_link_id': None,
'original_assignment_name': None,
'original_quiz_id': None,
'workflow_state': 'published',
'important_dates': False,
'muted': False,
'html_url': 'https://csn.instructure.com/courses/1389750/assignments/7267939',
'has_overrides': True,
'needs_grading_count': 0,
'sis_assignment_id': None,
'integration_id': None,
'integration_data': {},
'discussion_topic': {
'id': 4484626,
'title': 'Week 1 - DQ1',
'last_reply_at': '2024-08-05T23:10:59Z',
'created_at': '2024-08-05T18:11:01Z',
'delayed_post_at': None,
'posted_at': '2024-08-05T23:10:59Z',
'assignment_id': 7267939,
'root_topic_id': None,
'position': None,
'podcast_has_student_posts': False,
'discussion_type': 'side_comment',
'lock_at': None,
'allow_rating': False,
'only_graders_can_rate': False,
'sort_by_rating': False,
'is_section_specific': False,
'anonymous_state': None,
'summary_enabled': False,
'user_name': None,
'discussion_subentry_count': 1,
'permissions': {
'attach': True,
'update': True,
'reply': True,
'delete': True,
'manage_assign_to': True
},
'require_initial_post': True,
'user_can_see_posts': True,
'podcast_url': None,
'read_state': 'read',
'unread_count': 0,
'subscribed': True,
'attachments': [],
'published': True,
'can_unpublish': True,
'locked': False,
'can_lock': False,
'comments_disabled': False,
'author': {},
'html_url': 'https://csn.instructure.com/courses/1389750/discussion_topics/4484626',
'url': 'https://csn.instructure.com/courses/1389750/discussion_topics/4484626',
'pinned': False,
'group_category_id': None,
'can_group': True,
'topic_children': [],
'group_topic_children': [],
'locked_for_user': False,
'message': '<div class="entry-content ">\n<div class="discussion-section message_wrapper">\n<div class="message user_content enhanced" data-bind="message">\n<p><span>What role do microbes play in the human body? Why do we study them? What percentage of microbes do you think cause disease in humans?</span></p>\n</div>\n</div>\n</div>\n<div id="discussion-toolbar" class="toolbarView unsubscribed"></div>',
'todo_date': None,
'is_announcement': False
},
'published': True,
'unpublishable': True,
'only_visible_to_overrides': True,
'visible_to_everyone': False,
'locked_for_user': False,
'submissions_download_url': 'https://csn.instructure.com/courses/1389750/assignments/7267939/submissions?zip=1',
'post_manually': False,
'anonymize_students': False,
'require_lockdown_browser': False,
'restrict_quantitative_data': False
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @JoshuaStomel,
Since you're sending the data as json (which is normally what I do), and looking at the API spec, I think you need to add your info into an assignment override main dictionary. Try:
override = {'assignment_override':{
'course_section_id': 1555035,
'id': 138276,
'assignment_id': 7267945,
'title': 'BIOL 251 - 3001 FALL 2024',
'due_at': '2024-09-03T02:20:00Z',
'unlock_at': '2024-09-03T01:00:00Z',
'lock_at': '2024-08-29T02:20:00Z',
'all_day': False,
'all_day_date': '2024-09-03',
'unassign_item': False
}}
Let us know if this works
-Chris