QUESTIONNAIRES / PRESENTATION

True / False

Presents a statement and two possible answers: True or False.

1. What the learner does and sees

Presents a statement and two possible answers: True or False.

Use it for quick fact checks or binary concepts, not for questions that allow for nuance or multiple valid answers.

2. Create in Studio

This is the normal path if you are creating the course visually. You don't need to write JSON or execute commands.

  1. Abre Studio.Use the hosted editor or the Studio you have integrated into your project.
  2. Add the activity.In Add content, abre Games and choose True / False.
  3. Edita visualmente.Change statements, responses, and options with editor controls. The JSON remains as an advanced view, not a requirement for use.
  4. Check the learner View.Play the activity before downloading or saving the course.

3. Content requirements

  • In Studio it is created with questions of type True / False.
  • At least two questions are needed.
  • Each question must have exactly two unambiguous options and one embedded solution.

4. Valid data example

This block shows a complete and valid questionnaire for this presentation. It is used to understand the format or to walk through the CLI; If you use Studio, the editor generates this structure for you.

quiz.json
{
  "schema": "https://p2lrn.org/schema/native-questionnaire/0.4.0",
  "version": "0.4.0",
  "title": "True or false",
  "language": "en",
  "grading": {
    "mode": "embedded-key"
  },
  "questions": [
    {
      "id": "q1",
      "type": "true-false",
      "prompt": "Earth orbits the Sun",
      "points": 1,
      "choices": [
        {
          "id": "t1",
          "text": "True"
        },
        {
          "id": "f1",
          "text": "False"
        }
      ],
      "solution": {
        "choiceIds": [
          "t1"
        ]
      }
    },
    {
      "id": "q2",
      "type": "true-false",
      "prompt": "Mars is a star",
      "points": 1,
      "choices": [
        {
          "id": "t2",
          "text": "True"
        },
        {
          "id": "f2",
          "text": "False"
        }
      ],
      "solution": {
        "choiceIds": [
          "f2"
        ]
      }
    }
  ]
}

5. How to read the example

Each question has two choices. The solution points out which of your identifiers is correct using solution.choiceIds.

6. Create by CLI — advanced alternative

Use this tour only if you are generating the course by code. Requires Toolkit installed via NPM. The file quiz.json It must contain a valid questionnaire like the example above.

Terminal
p2lrn-create add-questionnaire ./workspace ./quiz.json \
  --key quiz \
  --title "True / False" \
  --renderer "https://p2lrn.org/renderer/questionnaire/true-false"

p2lrn-create build ./workspace ./course.p2lrn --strict-profiles

--renderer Select the preferred presentation. It does not create a second copy of the questions: the content remains the native questionnaire.

7. Technical presentation identifier

Typically Studio sets this up for you. You only need this identifier when you select presentation from code, CLI, or the viewer.

Technical identifier

https://p2lrn.org/renderer/questionnaire/true-false

Profile

https://p2lrn.org/profile/native-questionnaire

Content type

application/vnd.p2lrn.questionnaire+json

8. Interaction and accessibility

Responses are standard buttons and work with keyboard and assistive technologies.

9. Completion and scoring

Each choice updates the answer to the question. Upon completion of the round, the total score is communicated.

To save the result on your platform, see Events and Host Adapter.

10. Try the example

Open the demo package in the real viewer and check the interaction before integrating it.