简体   繁体   English

Canvas-lms-通过API提交答案

[英]Canvas-lms - submitting an answer via API

How do I submit an answer to a quiz by API? 如何通过API提交测验答案? I believe can be done via https://canvas.instructure.com/doc/api/quiz_submissions.html - POST /api/v1/courses/:course_id/quizzes/:quiz_id/submissions , but how to I actually provide the answer to that request? 我相信可以通过https://canvas.instructure.com/doc/api/quiz_submissions.html-POST POST /api/v1/courses/:course_id/quizzes/:quiz_id/submissions ,但是我如何实际提供答案那个要求? There's no parameter in it which looks like it's what I'm looking for. 它中没有参数,看起来像是我要寻找的。 Or maybe I have to use another end point? 还是我必须使用另一个终点?

The API endpoint you need is this one. 您需要的API端点就是一点。 You will need to create an answer json object depending on the "question type" of the question you're trying to answer (see this appendix) 您将需要根据要尝试回答的问题的“问题类型”创建一个答案json对象(请参阅附录)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM