This function modifies an existing quiz in a specific course in the Canvas LMS API.
update_quiz(canvas, course_id, quiz_id, quiz_params)A list representing the updated quiz object.
An object containing the Canvas API key and base URL, obtained through the canvas_authenticate function.
The ID of the course containing the quiz to be modified.
The ID of the quiz to be modified.
A named list of quiz parameters to update. This list can include:
(string) The quiz title.
(string) A description of the quiz.
(string) The type of quiz. Allowed values: "practice_quiz", "assignment", "graded_survey", "survey".
(integer) The assignment group id to put the assignment in. Defaults to the top assignment group in the course. Only valid if the quiz is graded.
(integer) Time limit to take this quiz, in minutes. Set to NULL for no time limit. Defaults to NULL.
(boolean) If TRUE, quiz answers for multiple choice questions will be randomized for each student. Defaults to FALSE.
(string) Dictates whether or not quiz results are hidden from students. Allowed values: "always", "until_after_last_attempt". Defaults to NULL.
(boolean) If FALSE, hides correct answers from students when quiz results are viewed. Defaults to TRUE.
(boolean) If TRUE, hides correct answers from students until they submit the last attempt for the quiz. Defaults to FALSE.
(DateTime) The correct answers will be visible by students only after this date.
(DateTime) The correct answers will stop being visible once this date has passed.
(integer) Number of times a student is allowed to take a quiz. Set to -1 for unlimited attempts. Defaults to 1.
(string) Scoring policy for a quiz that students can take multiple times. Allowed values: "keep_highest", "keep_latest".
(boolean) If TRUE, shows quiz to student one question at a time. Defaults to FALSE.
(boolean) If TRUE, questions are locked after answering. Defaults to FALSE.
(string) Restricts access to the quiz with a password. For no access code restriction, set to NULL.
(string) Restricts access to the quiz to computers in a specified IP range.
(DateTime) The day/time the quiz is due. Accepts times in ISO 8601 format, e.g., "2011-10-21T18:48Z".
(DateTime) The day/time the quiz is locked for students.
(DateTime) The day/time the quiz is unlocked for students.
(boolean) Whether the quiz should be published.
(boolean) Whether students should be prevented from viewing their quiz results past the first time. Defaults to FALSE.
(boolean) Whether this quiz is only visible to overrides. Defaults to FALSE.
(boolean) If TRUE, notifies users that the quiz has changed. Defaults to TRUE.