QuestionInterface[type,<|p1s1,p2s2,…|>]
QuestionObjectのためのインターフェースを与えられた type と設定が siの特性 piを使って定義する.
QuestionInterface
質問インターフェースタイプのリスト »QuestionInterface[type,<|p1s1,p2s2,…|>]
QuestionObjectのためのインターフェースを与えられた type と設定が siの特性 piを使って定義する.
詳細
- QuestionInterfaceは,通常,QuestionObject[QuestionInterface[…],…]内でインターフェースを直接指定するために使われる.
- インターフェースは質問インターフェースタイプにもリストされている.
- 次は,type に含まれるサポートされるインターフェースタイプである.
-
"MultipleChoice" 定義リストから任意数の項目を選択する
"ShortAnswer"入力フィールドを使って答を入れる
"MultipleShortAnswers"入力フィールドに複数の答を入れる
"ChooseMultiple"定義済みのリストから任意の数の項目を選択する
"MultipleChoiceGrid"表を使って項目をカテゴリに分ける
"TrueFalse"問題が正か偽かを判定する
"NumericRange"範囲内から値を選ぶ
"Code"問題に答えるコードを書く
"TextCompletion"穴埋め問題に入力する
"SelectCompletion"穴埋め問題の項目を選ぶ
"DragCompletion"解答プールか項目をドラッグして穴埋めする
"DragCategorize"ドラッグ・アンド・ドロップインターフェースを使って項目をカテゴリに分ける
"ClickLocations"画像の中の項目を見付ける
"Sort"ドラッグ・アンド・ドロップインターフェースを使ってリストを並べ替える
"SelectPair"項目を分類する
"SelectColor"色を選ぶ - サポートされる特性 piはインターフェースのタイプによって異なる.次は,デフォルト設定でよく使われる特性である.
-
"Prompt" "" インターフェースで表示される問題あるいはプロンプト "ShowAssessment" True QuestionObjectで評価結果を表示するかどうか "MaxAnswers" Infinity 要素ごとの評価で許容される答の最大数 "MinAnswers" 1 要素ごとの評価許容される答の最小数 - 上記に加え,各インターフェースタイプは関連するコントローラのオプションを特性としてサポートする.例えば,"ShortAnswer"はFieldHintを特性としてサポートする.
- QuestionInterface[type,"prompt"]はQuestionInterface[type,<|"Prompt""prompt"|>]に等しい,
- QuestionObject[QuestionInterface[type,props],assessment]で props に含まれない特性は,可能な場合は assessment から推測される.
例題
すべて開く すべて閉じる例 (2)
QuestionObject[QuestionInterface["MultipleChoice", <|"Prompt" -> "What is your favorite ice cream flavor?", "Choices" -> {"Vanilla", "Strawberry", "Chocolate", "Cookie Dough"}|>]]QuestionObject[QuestionInterface["ShortAnswer", <|"Prompt" -> "What is your favorite Sci-Fi movie?"|>]]スコープ (8)
QuestionObject[QuestionInterface["MultipleChoiceGrid", <|"Prompt" -> "Order the US Presidents by inauguration date:", "Choices" -> {"Washington", "Lincoln", "Kennedy"}, "Categories" -> {"First", "Second", "Third"}|>]]QuestionObject[QuestionInterface["SelectPair", <|"Prompt" -> "Choose a good food and wine pairing?", "Choices" -> {"Steak", "Pancakes", "Cheese"}, "Categories" -> {"Pinot Grigio", "Chardonnay", "Merlot"}|>]]QuestionObject[QuestionInterface["MultipleChoice", <|"Prompt" -> "What is the capitol of Alberta?", "Choices" -> {"Calgary", "Edmonton", "Banff"}|>], AssessmentFunction["Edmonton"]]QuestionObject[QuestionInterface["TrueFalse", <|"Prompt" -> "A whale is a mammal, true or false?"|>], TrueQ]QuestionObject[QuestionInterface["SelectColor", <|"Prompt" -> "What color is a pickle?"|>], AssessmentFunction[Green, Tolerance -> 0.2]]QuestionObject[QuestionInterface["ChooseMultiple", <|"Prompt" -> "Which quarterbacks have won a Super Bowl?", Appearance -> "Vertical"|>], AssessmentFunction[{"Joe Montana" -> 1, "Dan Marino" -> 0, "John Elway" -> 1, "Philip Rivers" -> 0, "Brett Favre" -> 1}, <|"ElementwiseAssessment" -> True|>]]検定関数を使った評価を含むスライダーに基づく問題のインターフェースを作る:
QuestionObject[QuestionInterface["NumericRange", <|"Prompt" -> "How many people live in Tokyo?",
"Range" -> {.2, 5} * QuantityMagnitude[Entity["City", {"Tokyo", "Tokyo", "Japan"}][EntityProperty["City", "Population"]]]|>],
Between[{.8, 1.2} * QuantityMagnitude[Entity["City", {"Tokyo", "Tokyo", "Japan"}][EntityProperty["City", "Population"]]]]]QuestionObject[QuestionInterface["MultipleChoice", <|"Prompt" -> "What is 4^3?", "ShowAssessment" -> False|>],
AssessmentFunction[{16, -64, 64 -> 1}]]上記の評価は失われた.QuestionObjectでEpilogFunctionを使って結果を記録する:
QuestionObject[QuestionInterface["MultipleChoice", <|"Prompt" -> "What is 4^3?", "ShowAssessment" -> False|>],
AssessmentFunction[{16, -64, 64 -> 1}], EpilogFunction -> (PutAppend[#Assessment, "assessmentresults"]&)]ReadList["assessmentresults"]DeleteFile["assessmentresults"]一般化と拡張 (1)
関連するガイド
-
▪
- 質問インターフェースタイプ ▪
- 質問と評価
テキスト
Wolfram Research (2021), QuestionInterface, Wolfram言語関数, https://reference.wolfram.com/language/ref/QuestionInterface.html (2025年に更新).
CMS
Wolfram Language. 2021. "QuestionInterface." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/QuestionInterface.html.
APA
Wolfram Language. (2021). QuestionInterface. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/QuestionInterface.html
BibTeX
@misc{reference.wolfram_2026_questioninterface, author="Wolfram Research", title="{QuestionInterface}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/QuestionInterface.html}", note=[Accessed: 05-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_questioninterface, organization={Wolfram Research}, title={QuestionInterface}, year={2025}, url={https://reference.wolfram.com/language/ref/QuestionInterface.html}, note=[Accessed: 05-November-2026]}