"Sort" (Question Interface Type)

"Sort"

creates an interface for sorting a sequence of values.

Details

  • By default, "Sort" question interfaces use an interactive, graphical user interface for ordering items.

Properties

  • In QuestionInterface["Sort",props], props is an Association that supports the following keys:
  • "Prompt"Nonetext asking the user a question
    "Items"Automaticlist of choices
    "ItemOrdering"Automaticfunction for initial ordering of choices in the interface
    "Labels"None
  • list with corresponding labels for each item
  • When "Items" are not specified, values are inferred from the AssessmentFunction.
  • When "ItemOrdering" is not specified, the ordering is preserved for values explicitly given in "Items". Values inherited from the AssessmentFunction are arranged in an arbitrary order to prevent revealing the correct answer.

Corresponding AssessmentFunction

  • "Sort" is not an automatically assigned interface type for any AssessmentFunction. It must be specified in QuestionInterface.
  • The assessment function should be structured as AssessmentFunction[{{elem1a, elem2a,},{elem1b,elem2b}},] 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  (2)

Create a sorting question from an AssessmentFunction:

Create a sorting question without assessment:

Scope  (2)

Get an EntityClass for the five most populous countries:

Create a sorting question using flags as labels:

Set "ItemOrdering" to a function in order to initially reorder the items in the interface:

Applications  (1)

Create an astronomy test: