為讓表單建立者進一步控管回覆者,我們推出了精細的回覆者控管功能。2026 年 1 月 31 日後透過 API 建立的表單,預設為未發布狀態。詳情請參閱「
Google 表單的 API 變更」。
設定測驗評分選項
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
測驗是 Google 表單的其中一項主要功能。本指南將說明如何使用表單 API 建立測驗,以及新增評分選項。
製作基本測驗
製作測驗的第一個階段分為兩個步驟:建立表單,然後更新表單設定,將其定義為測驗。如需基本設定說明,請參閱「建立表單或測驗」。
新增問題
建立測驗後,請新增問題 (如要查看問題類型清單,請參閱Question object
)。您可以在首次新增問題時加入評分選項,也可以稍後再更新。包含評分選項的新問題項目的 JSON 程式碼範例如下所示:
"item": {
"title": "Which of these singers was not a member of Destiny's Child?",
"questionItem": {
"question": {
"required": True,
"grading": {
"pointValue": 2,
"correctAnswers": {
"answers": [{"value": "Rihanna"}]
},
"whenRight": {"text": "You got it!"},
"whenWrong": {"text": "Sorry, that's wrong"}
},
"choiceQuestion": {
"type": "RADIO",
"options": [
{"value": "Kelly Rowland"},
{"value": "Beyoncé"},
{"value": "Rihanna"},
{"value": "Michelle Williams"}
]
}
}
}
}
如要瞭解如何在表單中新增問題項目,請參閱更新表單或測驗。
新增評分選項
在測驗題中加入評分選項,有助於自動化評分程序。您可以為每個問題指派分數值,並提供使用者答案的意見回饋。
對於下列問題類型,您可以新增 correctAnswers
欄位,讓系統在考試提交時自動評分。您可以使用 whenRight
和 whenWrong
欄位,針對正確和錯誤的答案提供具體意見回饋。
您也可以新增 correctAnswers
欄位,讓系統自動評分簡答題,但只能提供 generalFeedback
,而非 whenRight
或 whenWrong
意見回饋。對於其他類型的題目,系統不會自動評分,您只能提供 generalFeedback
。
注意:除了答案是透過上傳檔案的題目外,系統會擷取使用者的答案並以文字格式進行評估 (請參閱 TextAnswer
物件,瞭解不同類型的答案格式)。答案必須與答案表完全相符,才算正確。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-04-09 (世界標準時間)。
[null,null,["上次更新時間:2025-04-09 (世界標準時間)。"],[],["Create a quiz in Google Forms by first building a form, then converting it to a quiz via settings. Add questions, specifying the question type and whether it's required. Include grading options like `pointValue`, `correctAnswers`, and feedback (`whenRight`, `whenWrong`). Questions with `correctAnswers` (Checkbox, Radio, Dropdown, Short answer) can be auto-graded. Feedback options are available for correct and incorrect answers, except for short answers that only offer `generalFeedback`. Answers are evaluated as text for correctness.\n"],null,["# Set up quiz grading options\n\nAdministering quizzes is one of the key features of Google Forms. This guide\nshows you how to create a quiz and add grading options with the Forms API.\n\nMake a basic quiz\n-----------------\n\nThe first stage of making a quiz is a two-step process: you create a form,\nthen update the form's settings to define it as a quiz. See\n[Create a form or quiz](/workspace/forms/api/guides/create-form-quiz#convert_a_form_to_a_quiz)\nfor basic setup instructions.\n\nAdd questions\n-------------\n\nAfter you've created the quiz, add the questions (see the\n[`Question object`](/workspace/forms/api/reference/rest/v1/forms#question) for a\nlist of question types). You can include\n[grading options](#grading-options) when you first add the questions, or\nupdate them later. Sample JSON code for a new question item that includes\ngrading options looks like this: \n\n \"item\": {\n \"title\": \"Which of these singers was not a member of Destiny's Child?\",\n \"questionItem\": {\n \"question\": {\n \"required\": True,\n \"grading\": {\n \"pointValue\": 2,\n \"correctAnswers\": {\n \"answers\": [{\"value\": \"Rihanna\"}]\n },\n \"whenRight\": {\"text\": \"You got it!\"},\n \"whenWrong\": {\"text\": \"Sorry, that's wrong\"}\n },\n \"choiceQuestion\": {\n \"type\": \"RADIO\",\n \"options\": [\n {\"value\": \"Kelly Rowland\"},\n {\"value\": \"Beyoncé\"},\n {\"value\": \"Rihanna\"},\n {\"value\": \"Michelle Williams\"}\n ]\n }\n }\n }\n }\n\nSee [Update a form or quiz](/workspace/forms/api/guides/update-form-quiz#add_an_item)\nto learn how to add a question item to a form.\n\nAdd grading options\n-------------------\n\nAdding grading options to quiz questions helps automate the grading process.\nEach question can have an assigned point value and give the user feedback about\ntheir answer.\n\nFor the question types below, adding a`correctAnswers` field enables them to\nbe automatically graded when the quiz is submitted. You can provide\nspecific feedback for correct and incorrect answers using the `whenRight` and\n`whenWrong` fields.\n\n- Checkbox\n- Radio\n- Dropdown\n\nShort answer questions can also be auto-graded by adding a `correctAnswers`\nfield, but you can only provide `generalFeedback`, not `whenRight` or\n`whenWrong` feedback. For other types of questions, grading is not automatic\nand you can only provide `generalFeedback`.\n\n**Note:** Except for questions where the answer is via a file upload, the\nuser's answer is captured and evaluated as text (see the\n[`TextAnswer`](/workspace/forms/api/reference/rest/v1/forms.responses#textanswer)\nobject for specifics about how different types of answers are formatted). To\nbe correct, the answer must match the answer key exactly."]]