這類問題項目可讓作答者從一組編號圓形按鈕中選擇一個選項。您可以透過 Form 存取或建立項目。在測驗中使用時,這些項目會獲得評分。
// Open a form by ID and add a new scale item. const form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); const item = form.addScaleItem(); item.setTitle('Pick a number between 1 and 10').setBounds(1, 10);
方法
內容詳盡的說明文件
create
為這個比例尺項目建立新的 Item。如果 response 引數超出項目的邊界,就會擲回例外狀況。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| response | Integer | 這個評量項目的值答案 | 
回攻員
Item:項目回應
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
duplicate()
get
傳回回應,當作答者回覆可評分的題目時,系統會向他們顯示這項回應。
回攻員
Quiz - 意見回饋 (如果有的話)。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
取得項目的說明文字 (有時稱為版面配置項目的說明文字,例如 Image、Page 和 Section)。
回攻員
String:項目的說明文字或說明文字
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
取得項目的專屬 ID。
回攻員
Integer:商品 ID
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
取得表單中所有項目中的項目索引。
回攻員
Integer:項目索引
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
取得比例下限的標籤 (如有)。
回攻員
String:比例下限的標籤
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
取得刻度的下限。
回攻員
Integer:刻度的下限
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
傳回可評分的項目分數。
回攻員
Integer:問題的分數。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
取得比例上限的標籤 (如有)。
回攻員
String:比例上限的標籤
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
取得項目的標題 (在 Section 的情況下,有時稱為標頭文字)。
回攻員
String:項目的標題或標頭文字
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
get
get
取得刻度表的上限。
回攻員
Integer:刻度的上限
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
is
決定受訪者是否必須回答問題。
回攻員
Boolean:受訪者是否必須回答問題
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
set
set
當作答者回覆沒有正確或錯誤答案的評分問題 (也就是需要手動評分的題目) 時,系統會顯示這項回饋。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| feedback | Quiz | 新的意見回饋 | 
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
set
設定項目的說明文字 (對於 Image、Page 和 Section 等版面配置項目,有時稱為說明文字)。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| text | String | 新的說明文字 | 
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms
set
set
set
set
設定項目的標題 (在 Section 的情況下,有時稱為標頭文字)。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| title | String | 新的標題或標頭文字 | 
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/forms.currentonly
- 
https://www.googleapis.com/auth/forms