Class QuizFeedback
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แบบทดสอบความคิดเห็น
การใช้งาน Bean ของความคิดเห็นซึ่งมีพร็อพเพอร์ตี้ที่เหมือนกันสำหรับความคิดเห็นทั้งหมด เช่น แสดงข้อความหรือลิงก์
คุณสามารถเพิ่มความคิดเห็นลงในรายการ Form
ที่ให้คะแนนได้
// Setting feedback which should be automatically shown when a user responds to
// a question incorrectly.
const form = FormApp.create('My Form');
const textItem = form.addTextItem().setTitle(
'Re-hydrating dried fruit is an example of what?');
const feedback =
FormApp.createFeedback()
.setDisplayText(
'Good answer, but not quite right. Please review chapter 4 before next time.',
)
.addLink('http://wikipedia.com/osmosis');
textItem.setFeedbackForIncorrect(feedback);
เมธอด
วิธีการ | ประเภทการแสดงผล | รายละเอียดแบบย่อ |
getLinkUrls() | String[] | รับรายการ URL ที่เชื่อมโยงกับความคิดเห็น |
getText() | String | รับข้อความที่แสดงของความคิดเห็น |
เอกสารประกอบโดยละเอียด
getLinkUrls()
รับรายการ URL ที่เชื่อมโยงกับความคิดเห็น รายการเหล่านี้จะแสดงต่อผู้ใช้เป็นรายการลิงก์ที่มีประโยชน์
รีเทิร์น
String[]
— รายการ URL ที่เชื่อมโยงกับความคิดเห็น
getText()
รับข้อความที่แสดงของความคิดเห็น ข้อความนี้จะแสดงต่อผู้ใช้หลังจากที่ส่งคำตอบแล้ว
รีเทิร์น
String
— ข้อความของความคิดเห็น
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eQuizFeedback\u003c/code\u003e objects store common feedback properties like display text and links for Google Forms.\u003c/p\u003e\n"],["\u003cp\u003eFeedback can be linked to form items and automatically displayed based on user responses (e.g., incorrect answers).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003egetLinkUrls()\u003c/code\u003e and \u003ccode\u003egetText()\u003c/code\u003e methods to retrieve associated URLs and display text from \u003ccode\u003eQuizFeedback\u003c/code\u003e objects.\u003c/p\u003e\n"]]],["Feedback, used with gradeable form items, provides display text and links. Feedback is created via `FormApp.createFeedback()`, allowing the setting of display text with `setDisplayText()` and adding links with `addLink()`. `setFeedbackForIncorrect()` associates the feedback with a question to be shown on incorrect responses. The methods `getLinkUrls()` retrieves associated URLs, and `getText()` gets the feedback's display text. These features offer customized information and guidance for users.\n"],null,["# Class QuizFeedback\n\nQuizFeedback\n\nThe bean implementation of a Feedback, which contains properties common to all feedback, such as\ndisplay text or links.\n\nFeedback can be added to gradeable [Form](/apps-script/reference/forms/form) items.\n\n```javascript\n// Setting feedback which should be automatically shown when a user responds to\n// a question incorrectly.\nconst form = FormApp.create('My Form');\nconst textItem = form.addTextItem().setTitle(\n 'Re-hydrating dried fruit is an example of what?');\nconst feedback =\n FormApp.createFeedback()\n .setDisplayText(\n 'Good answer, but not quite right. Please review chapter 4 before next time.',\n )\n .addLink('http://wikipedia.com/osmosis');\ntextItem.setFeedbackForIncorrect(feedback);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------|-------------|-------------------------------------------------------|\n| [getLinkUrls()](#getLinkUrls()) | `String[]` | Gets a list of the URLs associated with the Feedback. |\n| [getText()](#getText()) | `String` | Gets the Feedback's display text. |\n\nDetailed documentation\n----------------------\n\n### `get``Link``Urls()`\n\nGets a list of the URLs associated with the Feedback. These are displayed to the user as a list\nof helpful links.\n\n#### Return\n\n\n`String[]` --- a list of the URLs associated with the Feedback\n\n*** ** * ** ***\n\n### `get``Text()`\n\nGets the Feedback's display text. This text is shown to the user after they've submitted a\nresponse.\n\n#### Return\n\n\n`String` --- the Feedback's text"]]