Enum FeedbackType
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.
FeedbackType
Một enum đại diện cho các loại phản hồi được hỗ trợ. Bạn có thể truy cập vào các loại phản hồi từ FormApp.FeedbackType
.
Để gọi một enum, bạn gọi lớp mẹ, tên và thuộc tính của enum đó. Ví dụ:
FormApp.FeedbackType.CORRECT
.
// Open a form by ID and add a new list item.
const form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
const item = form.addListItem();
item.setTitle('Do you prefer cats or dogs?');
// Set "Dogs" as the correct answer to this question.
item.setChoices([
item.createChoice('Dogs', true),
item.createChoice('Cats', false),
]);
// Add feedback which will be shown for correct responses; ie "Dogs".
item.setFeedbackForCorrect(
FormApp.createFeedback().setDisplayText('Dogs rule, cats drool.').build(),
);
Thuộc tính
Thuộc tính | Loại | Mô tả |
CORRECT | Enum | Ý kiến phản hồi tự động hiển thị cho người trả lời khi họ trả lời đúng một câu hỏi.
Bạn chỉ có thể đính kèm ý kiến phản hồi chính xác vào một loại câu hỏi hỗ trợ tính năng tự động chấm điểm (ví dụ: câu hỏi chọn một trong nhiều đáp án, hộp đánh dấu, câu hỏi chọn một đáp án) |
INCORRECT | Enum | Ý kiến phản hồi tự động hiển thị cho người trả lời khi họ trả lời sai một câu hỏi.
Bạn chỉ có thể đính kèm ý kiến phản hồi không chính xác vào một loại câu hỏi hỗ trợ tính năng tự động chấm điểm (ví dụ: chọn bằng nút chọn, chọn bằng hộp đánh dấu, chọn bằng danh sách) |
GENERAL | Enum | Ý kiến phản hồi tự động hiển thị cho người trả lời khi họ gửi câu trả lời.
Bạn chỉ có thể đính kèm ý kiến phản hồi chung vào những loại câu hỏi không hỗ trợ tính năng tự động chấm điểm nhưng có thể chấm điểm (tức là tất cả loại câu hỏi ngoại trừ câu hỏi dạng lưới) |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eFeedbackType\u003c/code\u003e is an enum used to represent different types of feedback in Google Forms, accessible via \u003ccode\u003eFormApp.FeedbackType\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt includes three properties: \u003ccode\u003eCORRECT\u003c/code\u003e, \u003ccode\u003eINCORRECT\u003c/code\u003e, and \u003ccode\u003eGENERAL\u003c/code\u003e, used to specify feedback for correct answers, incorrect answers, and general feedback respectively.\u003c/p\u003e\n"],["\u003cp\u003eFeedback is displayed to respondents automatically based on their answers and the type of feedback specified.\u003c/p\u003e\n"],["\u003cp\u003eEach feedback type is associated with specific question types it can be applied to for providing targeted feedback to users.\u003c/p\u003e\n"]]],[],null,["# Enum FeedbackType\n\nFeedbackType\n\nAn enum representing the supported types of feedback. Feedback types can be accessed from [FormApp.FeedbackType](/apps-script/reference/forms/form-app#FeedbackType).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nFormApp.FeedbackType.CORRECT`.\n\n```javascript\n// Open a form by ID and add a new list item.\nconst form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');\nconst item = form.addListItem();\nitem.setTitle('Do you prefer cats or dogs?');\n// Set \"Dogs\" as the correct answer to this question.\nitem.setChoices([\n item.createChoice('Dogs', true),\n item.createChoice('Cats', false),\n]);\n// Add feedback which will be shown for correct responses; ie \"Dogs\".\nitem.setFeedbackForCorrect(\n FormApp.createFeedback().setDisplayText('Dogs rule, cats drool.').build(),\n);\n``` \n\n### Properties\n\n| Property | Type | Description |\n|-------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `CORRECT` | `Enum` | Feedback that is automatically displayed to respondents for a question answered correctly. Correct feedback can only be attached to a question type that supports autograding (e.g. radio, checkbox, select) |\n| `INCORRECT` | `Enum` | Feedback that is automatically displayed to respondents for a question answered incorrectly. Incorrect feedback can only be attached to a question type that supports autograding (e.g. radio, checkbox, select) |\n| `GENERAL` | `Enum` | Feedback that is automatically displayed to respondents when they submit their response. General feedback can only be attached to question types that do not support auto-grading, but are gradeable (ie everything but grid) |"]]