WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
Wolfram Language Home Page »

"SelectCompletion" (Question Interface Type)

"SelectCompletion"

provides a fill-in-the-blank interface with choices for each blank.

Properties

  • In QuestionInterface ["SelectCompletion",props], props is an Association that supports the following keys:
  • "Prompt" None text asking the user a question
    "Template" (required) template object with slots to be filled
    "Choices" Automatic available choices for each slot
    "ChoiceOrdering" Automatic function for ordering choices
    "Labels" Automatic corresponding labels for each choice
  • The "Template" can be any content supported by TemplateObject or StringTemplate . When providing a string, template slots denoted by backticks `` define locations for blanks in the question interface.
  • By default, the "Choices" are inherited from the AssessmentFunction and randomly sorted to avoid exposing the correct answer.
  • When provided directly, "Choices" should have the form {{item1a,item1b,},{item2a,item2b,},} where each sublist contains the available choices for a blank in the interface. By default, the order will be maintained as provided.
  • When "ChoiceOrdering"f is specified, the items will be presented as {f[{item1a,item1b,}],f[{item2a,item2b,}],}.

Corresponding AssessmentFunction

  • "SelectCompletion" is not an automatically assigned interface type for any AssessmentFunction . It must be specified in QuestionInterface .
  • The values vali in AssessmentFunction [{val1,},] should contain the answers for each slot in order.
  • The assessment function should be structured as AssessmentFunction [{{elem1a, elem2a,}scorea,{elem1b,elem2b}scoreb},] where each list {elem1i,elem2i,} is a value in the answer key defining a possible correct or incorrect answer.

Examples

open allclose all

Basic Examples  (3)

Define a select completion question with assessment:

Specify the choices directly instead of inheriting from the AssessmentFunction :

Create a select completion interface without assessment:

Scope  (3)

A question with multiple possible correct answers:

Create a grammar question:

Create a fill-in-the-blank question with labels:

Generalizations & Extensions  (2)

Specify the template using TemplateSlot :

Provide a full TemplateObject :

Applications  (2)

Create a question generator for a fill-in-the-blank question:

Create three instances of the question:

Create a select completion question for an art assessment:

Generate a question. Images for some artworks are unavailable and may cause failures:

Properties & Relations  (1)

Specify choice ordering on a fill-in-the-blank question:

Possible Issues  (2)

The values in the AssessmentFunction should be lists. Submitting an answer to this invalid assessment will fail:

Specify the answer key values as a list instead:

The TemplateObject created by StringTemplate contains options incompatible with "SelectCompletion" :

Attempting to use this template will create a broken interface:

Remove the option settings:

Now the template works in "TextCompletion" :

Alternatively, use TemplateObject directly instead of StringTemplate :

This template does not have any options settings:

It works in "SelectCompletion" :

See Also

QuestionInterface   QuestionObject   PopupMenu   TemplateObject

Question Interface Types: TextCompletion   DragCompletion   SelectPair

Comparison Methods: Expression

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /