Drag Words Question
The drag_words_question resource asks learners to drag words into blanks in a sentence. Mark each blank with underscores in the question text and list the correct words, in order, in answer.
HCL Syntax
Section titled “HCL Syntax”Basic Syntax
Section titled “Basic Syntax”resource "drag_words_question" "protocol" { question = "The __________ protocol is connection-oriented, while __________ is connectionless." answer = ["TCP", "UDP"]}Fields
| Field | Type | Required | Description |
|---|---|---|---|
question | string | ✓ | Use __________ (underscores) to indicate where words should be dragged into |
answer | list(string) | ✓ | List of words matching each blank in the question, in order ConstraintsAt least one answer word is required |
hints | list(string) | — | Optional hints that can be revealed to help learners |
tags | list(string) | — | Optional tags for organizing and filtering questions |
Examples
Section titled “Examples”With hints and tags
Section titled “With hints and tags”resource "drag_words_question" "protocol" { question = "The __________ protocol is connection-oriented, while __________ is connectionless." answer = ["TCP", "UDP"] hints = ["One guarantees delivery, the other does not"] tags = ["networking"]}