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.constform=FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');constitem=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)
[[["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: 2024-12-22 UTC."],[[["`FeedbackType` is an enum used to represent different types of feedback in Google Forms, accessible via `FormApp.FeedbackType`."],["It includes three properties: `CORRECT`, `INCORRECT`, and `GENERAL`, used to specify feedback for correct answers, incorrect answers, and general feedback respectively."],["Feedback is displayed to respondents automatically based on their answers and the type of feedback specified."],["Each feedback type is associated with specific question types it can be applied to for providing targeted feedback to users."]]],[]]