AP Questionnaire

Documentation & support for AP Questionnaire.

Implementing Exam System

This example demonstrates how to set up an exam system by using the StartExam export. This system is customizable, allowing you to define exam settings, shuffle questions, set minimum passing criteria, and more.

Step-by-Step Guide

  1. Define the Exam Structure Use the StartExam export to define the exam structure. The parameters for the function are:

    • title: The title of the exam.

    • Description: A short explanation of the purpose of the exam.

    • Logo: A URL link to an image or logo representing the exam.

    • Minimum: The minimum number of questions required to pass.

    • ShuffleQuestions: A boolean to shuffle questions for each test-taker.

    • AmountOfQuestionsToShow: The number of questions to display during the exam.

    • Questions: An array of question objects, each containing:

      • question: The text of the question.

      • answers: A dictionary of possible answers.

      • correctAnswer: The key corresponding to the correct answer.

  2. Add Questions Populate the Questions array with as many questions as needed. Each question object should have:

    • A question text.

    • Multiple answers with unique keys.

    • The key corresponding to the correct answer.

  3. Set Passing Conditions Define the number of minimum correct answers (Minimum) required to pass the exam. Set ShuffleQuestions to true to ensure that the questions are randomized for each candidate.

  4. Run the Exam Call the StartExam function with the defined parameters. The function will handle the exam flow, including question presentation, response validation, and determining whether the candidate has passed or failed.

  5. Handle Results Use the returned result (true for pass, false for fail) to take appropriate action. For example:

Example Code

Last updated