@James ,
Would you be able to post the snippet that you use according to what you developed in your google sheets tool?
Not sure what happened to my original post, but brilliant explanation! I am writing a tool similar to your page management tool that manages calendar events/quizzes/assignments and applies assignments by sections. My institution uses a Day 1/Day 2 method instead of a standard M-W-F/T-R method, and the Day 1 and Day 2's are almost completely arbitrary. I'm looking to publish it so that many instructors in my institution can leverage it as well as other in institutions with seemingly random section days.
I was able to modify and delete assignments using the Assignments API, but when I apply it to quizzes it seems to return a null. I have the following. The CanvasAPI call comes from the Assignments API:
//CREATE ASSIGNMENT OVERRIDE GIVEN QUIZ ID
result = canvasAPI('POST /api/v1/courses/:course_id/assignments/:assignment_id/overrides',{
':course_id': 2247293, // Course Id
':id':5812067, // Problem Set 1 Quiz Id
'assignment_override[course_section_id]': 2408773, // Section 'H2'
'assignment_override[due_at]': new Date('2020-11-19T03:59:59Z'),
}
);
As applied to a quiz that already has an existing override for sections G1 and H1. In the above, I am trying to add section H2. Here is a snippet of showing the Quiz object as it contains the override:
"all_dates": [
{
"id": 858389,
"due_at": "2020-08-19T03:59:59Z",
"unlock_at": "2020-08-10T04:00:00Z",
"lock_at": "2020-08-29T03:59:59Z",
"title": "G1",
"set_type": "CourseSection",
"set_id": 2408772
},
{
"id": 858390,
"due_at": "2020-08-20T03:59:59Z",
"unlock_at": "2020-08-03T04:00:00Z",
"lock_at": "2020-08-30T03:59:59Z",
"title": "G2",
"set_type": "CourseSection",
"set_id": 2408774
}
],
And here is the full Quiz Object:
{
"id": 5812067,
"title": "Probelm Set 1",
"html_url": "https://canvas.instructure.com/courses/2247293/quizzes/5812067",
"mobile_url": "https://canvas.instructure.com/courses/2247293/quizzes/5812067?force_user=1&persist_headless=1",
"description": "<p>You must provide documentation for each problem. See <a class=\"instructure_file_link instructure_scribd_file\" title=\"Documentation_Example_Citations.txt\" href=\"https://canvas.instructure.com/courses/2247293/files/103970667/download?wrap=1\" data-api-endpoint=\"https://canvas.instructure.com/api/v1/courses/2247293/files/103970667\" data-api-returntype=\"File\">example citations</a> for proper guidance (also found in <a title=\"Course Resources\" href=\"https://canvas.instructure.com/courses/2247293/pages/course-resources#https:\" data-api-endpoint=\"https://canvas.instructure.com/api/v1/courses/2247293/pages/course-resources%23https:\" data-api-returntype=\"Page\">Course Resources</a>).</p>",
"quiz_type": "assignment",
"time_limit": null,
"timer_autosubmit_disabled": false,
"shuffle_answers": false,
"show_correct_answers": false,
"scoring_policy": "keep_highest",
"allowed_attempts": -1,
"one_question_at_a_time": false,
"question_count": 8,
"points_possible": 40,
"cant_go_back": false,
"access_code": null,
"ip_filter": null,
"due_at": "2020-07-29T03:59:00Z",
"lock_at": "2020-07-29T03:59:00Z",
"unlock_at": "2020-06-03T04:00:00Z",
"published": true,
"unpublishable": true,
"locked_for_user": true,
"lock_info": {
"missing_permission": "participate_as_student",
"asset_string": "quizzes:quiz_5812067"
},
"lock_explanation": "This quiz is currently locked.",
"hide_results": null,
"show_correct_answers_at": null,
"hide_correct_answers_at": null,
"all_dates": [
{
"id": 858389,
"due_at": "2020-08-19T03:59:59Z",
"unlock_at": "2020-08-10T04:00:00Z",
"lock_at": "2020-08-29T03:59:59Z",
"title": "G1",
"set_type": "CourseSection",
"set_id": 2408772
},
{
"id": 858390,
"due_at": "2020-08-20T03:59:59Z",
"unlock_at": "2020-08-03T04:00:00Z",
"lock_at": "2020-08-30T03:59:59Z",
"title": "G2",
"set_type": "CourseSection",
"set_id": 2408774
}
],
"can_unpublish": true,
"can_update": true,
"require_lockdown_browser": false,
"require_lockdown_browser_for_results": false,
"require_lockdown_browser_monitor": false,
"lockdown_browser_monitor_data": "",
"speed_grader_url": "https://canvas.instructure.com/courses/2247293/gradebook/speed_grader?assignment_id=16874595",
"permissions": {
"manage": true,
"read": true,
"update": true,
"create": true,
"submit": true,
"preview": true,
"delete": true,
"read_statistics": true,
"grade": true,
"review_grades": true,
"view_answer_audits": false
},
"quiz_reports_url": "https://canvas.instructure.com/api/v1/courses/2247293/quizzes/5812067/reports",
"quiz_statistics_url": "https://canvas.instructure.com/api/v1/courses/2247293/quizzes/5812067/statistics",
"message_students_url": "https://canvas.instructure.com/api/v1/courses/2247293/quizzes/5812067/submission_users/message",
"section_count": 5,
"quiz_submission_versions_html_url": "https://canvas.instructure.com/courses/2247293/quizzes/5812067/submission_versions",
"assignment_id": 16874595,
"one_time_results": false,
"only_visible_to_overrides": true,
"assignment_group_id": 3191775,
"show_correct_answers_last_attempt": false,
"version_number": 6,
"has_access_code": false,
"post_to_sis": false,
},