Back to news list

New pl-dropdown element

Posted on 2024-07-23 by Nicolas Nytko

PrairieLearn now has a new pl-dropdown element, thanks to the efforts of Andrew Stec (University of British Columbia). These can be used instead of a multiple choice field to put inputs inside of sentences, or on an overlay for example.

Each dropdown answer is specified in the question.html similarly to the pl-multiple-choice element. The partial source for the above example is given here:

A <pl-dropdown sort="ascend" answers-name="hume">
    <pl-answer correct="true">wise</pl-answer>
    <pl-answer correct="false">clumsy</pl-answer>
    <pl-answer correct="false">reckless</pl-answer>
</pl-dropdown> man proportions his belief to the evidence.

For more information, see the pl-dropdown documentation.