Skip to content

Crossword

The user fills in a crossword. Requires the content field.

Content Schema

{
"words": [
{ "answer": "CAT", "clue": { "type": "TEXT", "value": "A small animal" } },
{ "answer": "DOG", "clue": { "type": "TEXT", "value": "A loyal pet" } },
{ "answer": "ACT", "clue": { "type": "TEXT", "value": "To do something" } }
]
}

Answer Format

answer = JSON.stringify({ "clue_number": "answer" })

  • Keys are 1-based: clue 1 maps to the first element in content.words.
  • Comparison is case-insensitive: “cat”, “CAT” and “Cat” are equivalent.
  • Missing clues count as incorrect.

Request

{
"exerciseId": "ex_007",
"area": "vocabulary",
"type": "crossword",
"answer": "{\"1\":\"cat\",\"2\":\"dog\",\"3\":\"act\"}",
"content": {
"words": [
{ "answer": "CAT", "clue": { "type": "TEXT", "value": "A small animal" } },
{ "answer": "DOG", "clue": { "type": "TEXT", "value": "A loyal pet" } },
{ "answer": "ACT", "clue": { "type": "TEXT", "value": "To do something" } }
]
}
}

Responses

// All correct
{ "correct": true, "score": 10, "feedback": "All words correct!", "metadata": { "area": "vocabulary", "type": "crossword" } }
// Partial (2 of 3)
{ "correct": false, "score": 7, "feedback": "You got 2 out of 3 words correct.", "metadata": { "area": "vocabulary", "type": "crossword" } }

Score = Math.round((correct / total) * 10)

Grid Generation

See Crossword Generator to generate the grid and obtain clue numbers.