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
Define the Exam Structure Use the
StartExamexport 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.
Add Questions Populate the
Questionsarray 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.
Set Passing Conditions Define the number of minimum correct answers (
Minimum) required to pass the exam. SetShuffleQuestionstotrueto ensure that the questions are randomized for each candidate.Run the Exam Call the
StartExamfunction 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.Handle Results Use the returned result (
truefor pass,falsefor fail) to take appropriate action. For example:
Example Code
Last updated