How to change quiz attributes via API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I want to know if is it possible to change some attributes inside a quiz.
In this case, for example, I want to mark the checkbox "Manter os envios anônimos", it must be equivalent to "Keep submissions anonymous" or something like that. Please check the image below:
But I need do to that via API, I use a Python Library from to access Canvas.
I use the code below to access the course name,
canvas = Canvas(API_URL, API_KEY)
course = canvas.get_course(8718)
print(course.name)
but I don't know how to change the attributes(or parameters) inside a quiz.
How can I do that using the Python library?
Regards,
Fabio
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to resolve the question.
course = canvas.get_course(8718)
print(course.name)
quiz = course.get_quiz(58321)
resultQuiz = quiz.edit( quiz={ 'anonymous_submissions': 'true',
"due_at": "2020-05-22T23:59:00",
"lock_at": "2020-05-22T23:59:00"
})