Skip to main content

Questions & Import

Add questions manually, bulk-import via JSON, and use all 8 question types.

Question Types

TrueCert supports 8 question types, each suited for different assessment needs:

TypeDescriptionScoring
Multiple Choice
mcq
Single correct answer from 4 options All or nothing
True / False
true_false
Binary true/false statement All or nothing
Select Multiple
select_multiple
Multiple correct answers; "Select all that apply" Partial credit
Code Output
code_output
Given a code snippet, type the expected output All or nothing
Fill in the Blank
fill_in_blank
Type the missing keyword, command, or value All or nothing
Ordering
ordering
Drag items into the correct sequence Partial credit per position
Matching
matching
Match items from two columns Partial credit per pair
Code Completion
code_completion
Fill in blanks within a code snippet (drag or type) Partial credit per blank

Scenario-Based Questions

Any question type can include a scenario — a real-world situation presented to the candidate before the question. This is the same format used by AWS, CKA, and HashiCorp certification exams.

Scenario
Your company runs a 3-node Kubernetes cluster in production. A developer reports that pods in the staging namespace are failing to pull images from the private registry. The cluster was working fine yesterday, and no configuration changes were made overnight.

Scenarios test practical decision-making and are especially effective for Level 2+ assessments. Add them via the scenario_text field in the question editor or JSON import.

Adding Questions Manually

  1. Go to AdminQuestionsAdd New
  2. Select the target certification
  3. Choose the question type
  4. Enter the question text (and optional scenario text)
  5. Set the topic, difficulty (1-5), and weight
  6. Add answer options or configure the type-specific fields
  7. Optionally add an image URL for diagrams or screenshots
  8. Save
Topic field: Group related questions under the same topic name (e.g. "Networking", "Security"). Topics are used for the strengths analysis on PDF certificates.

Bulk Import via JSON

For large question sets, use the JSON import tool at AdminQuestionsImport JSON.

Import Modes
  • Merge — Updates existing questions (matched by id) and adds new ones. Existing questions not in the import are left unchanged.
  • Replace — Deactivates all existing questions for the certification, then imports all questions as new. Use with caution.
JSON Format

The import file must be a JSON object with this structure:

{
  "cert_id": 7,
  "cert_slug": "ansible-l1",
  "version": "March 2026",
  "import_mode": "replace",
  "questions": [
    {
      "id": null,
      "topic": "Inventory",
      "question_text": "Which file format is used for Ansible inventory?",
      "scenario_text": null,
      "type": "mcq",
      "difficulty": 1,
      "weight": 1.0,
      "is_active": true,
      "image_url": null,
      "options": [
        { "text": "INI or YAML", "is_correct": true },
        { "text": "JSON only", "is_correct": false },
        { "text": "XML", "is_correct": false },
        { "text": "CSV", "is_correct": false }
      ]
    }
  ]
}
Field Reference
FieldRequiredDescription
cert_idYes*Target certification ID (* or use cert_slug)
cert_slugAltAlternative to cert_id — matched by slug
versionNoSets the version_label on the certification (e.g. "March 2026")
import_modeNo"merge" (default) or "replace"
idNoQuestion ID for merge updates (null for new questions)
topicNoTopic grouping for PDF strengths analysis
question_textYesThe question prompt
scenario_textNoReal-world scenario shown above the question
typeYesOne of: mcq, true_false, select_multiple, code_output, fill_in_blank, ordering, matching, code_completion
difficultyNo1-5 (default: 1)
weightNoScoring weight (default: 1.0; use 1.5 for select_multiple/code_output, 2.0 for matching/ordering)
image_urlNoURL to a diagram or screenshot shown with the question
optionsVariesArray of answer options (required for option-based types)
question_configVariesType-specific configuration (required for code_output, fill_in_blank, ordering, matching, code_completion)
Type-Specific Examples

Code Output — requires question_config.code and question_config.accepted:

{
  "type": "code_output",
  "question_config": {
    "code": "print(len([1, 2, 3]))",
    "language": "python",
    "accepted": ["3"],
    "case_sensitive": false
  }
}

Ordering — uses opt:N references for correct order:

{
  "type": "ordering",
  "options": [
    { "text": "Plan" },
    { "text": "Build" },
    { "text": "Test" },
    { "text": "Deploy" }
  ],
  "question_config": {
    "correct_order": ["opt:0", "opt:1", "opt:2", "opt:3"]
  }
}

Matching — pairs left column (group 0) with right column (group 1):

{
  "type": "matching",
  "options": [
    { "text": "HTTP",  "display_group": 0 },
    { "text": "SSH",   "display_group": 0 },
    { "text": "Port 80",  "display_group": 1 },
    { "text": "Port 22",  "display_group": 1 }
  ],
  "question_config": {
    "pairs": [["opt:0", "opt:2"], ["opt:1", "opt:3"]]
  }
}

Scenario question — add scenario_text to any type:

{
  "type": "mcq",
  "scenario_text": "Your production Kubernetes cluster is running low on resources...",
  "question_text": "What should you do first?",
  "options": [...]
}

Best Practices

  • Pool size: Create 40-60 questions for a 25-question exam to ensure variety across attempts.
  • Mix types: Use a variety of question types — MCQ for breadth, code output for depth, scenarios for practical application.
  • Weight appropriately: Use weight 1.0 for basic MCQ/true-false, 1.5 for select-multiple and code questions, 2.0 for matching and ordering.
  • Topics: Always set the topic field — it drives the strengths analysis on PDF certificates.
  • Difficulty spread: Aim for ~40% easy (1-2), ~40% medium (3), ~20% hard (4-5) questions.
  • Scenarios: Add scenario_text to 15-20% of questions, especially for Level 2+ exams.
  • No file size limit on question count per import (only a 2 MB file size limit). Import as many questions as you need.