Để nhà sáng tạo biểu mẫu có nhiều quyền kiểm soát hơn đối với những người có thể trả lời, chúng tôi sẽ ra mắt các chế độ kiểm soát chi tiết cho người trả lời. Theo mặc định, những biểu mẫu được tạo bằng API sau ngày 31 tháng 1 năm 2026 sẽ có trạng thái chưa xuất bản. Để tìm hiểu thêm, hãy xem bài viết Các thay đổi về API đối với Google Biểu mẫu.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Quản lý bài kiểm tra là một trong những tính năng chính của Google Biểu mẫu. Hướng dẫn này sẽ cho bạn biết cách tạo bài kiểm tra và thêm các lựa chọn chấm điểm bằng API Biểu mẫu.
Tạo bài kiểm tra cơ bản
Giai đoạn đầu tiên của việc tạo bài kiểm tra là một quy trình gồm hai bước: bạn tạo một biểu mẫu, sau đó cập nhật chế độ cài đặt của biểu mẫu để xác định biểu mẫu đó là bài kiểm tra. Hãy xem phần Tạo biểu mẫu hoặc bài kiểm tra để biết hướng dẫn thiết lập cơ bản.
Thêm câu hỏi
Sau khi tạo bài kiểm tra, hãy thêm câu hỏi (xem Question object để biết danh sách các loại câu hỏi). Bạn có thể thêm các lựa chọn chấm điểm khi thêm câu hỏi lần đầu hoặc cập nhật các lựa chọn này sau. Mã JSON mẫu cho một mục câu hỏi mới bao gồm các lựa chọn chấm điểm sẽ có dạng như sau:
"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"}]}}}}
Việc thêm các lựa chọn chấm điểm vào câu hỏi trong bài kiểm tra sẽ giúp tự động hoá quá trình chấm điểm.
Mỗi câu hỏi có thể được chỉ định một giá trị điểm và đưa ra ý kiến phản hồi cho người dùng về câu trả lời của họ.
Đối với các loại câu hỏi bên dưới, việc thêm trường correctAnswers sẽ cho phép tự động chấm điểm khi bài kiểm tra được gửi. Bạn có thể cung cấp phản hồi cụ thể cho câu trả lời đúng và sai bằng cách sử dụng các trường whenRight và whenWrong.
Hộp kiểm
Đài
Trình đơn thả xuống
Bạn cũng có thể tự động chấm điểm câu hỏi dạng câu trả lời ngắn bằng cách thêm trường correctAnswers, nhưng bạn chỉ có thể cung cấp ý kiến phản hồi generalFeedback chứ không phải whenRight hoặc whenWrong. Đối với các loại câu hỏi khác, việc chấm điểm không tự động và bạn chỉ có thể cung cấp generalFeedback.
Lưu ý: Ngoại trừ các câu hỏi mà câu trả lời là thông qua tệp tải lên, câu trả lời của người dùng sẽ được ghi lại và đánh giá dưới dạng văn bản (xem đối tượng TextAnswer để biết thông tin cụ thể về cách định dạng các loại câu trả lời). Để được coi là đúng, câu trả lời phải khớp chính xác với đáp án.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-04-09 UTC."],[],["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."]]