Skip to content

Instantly share code, notes, and snippets.

@benjaminadk
Created November 5, 2018 22:17
Show Gist options
  • Save benjaminadk/685cde859082198f3243d28f668a4744 to your computer and use it in GitHub Desktop.
Save benjaminadk/685cde859082198f3243d28f668a4744 to your computer and use it in GitHub Desktop.
Exam Simulator - JSON Format
// Exam Object
{
title: String, // Title of the exam - ex: "Network Administration"
code: String, // Optional 6 digit code - popular for technical certification exams - ex: "123-456"
pass: Number, // Passing score as a percentage - ex: 75
time: Number, // Time limit of exam in minutes - ex: 90
cover: [Node], // Array of Nodes - A way to visualize exam
test: [Questions] // Array of Questions - All questions that make up the exam
}
// Question Object
{
variant: Number, // Identifies type of question - multiple-choice, fill-in-the-blank, etc - ex: 2
question: [Node], // Array of Nodes - An individual question
choices: [Choice], // Array of Choices - Possible answers
answer: [Boolean], // Array of Booleans - If choice[index] is correct answer[index] should be true
explanation: [Node] // Array of Nodes - Explains why answer is what it is
}
// Node Object
// Allows for text or image
{
variant: Number, // Identifies type of node - large text, small text, image - ex: 1
text: String // Text or src - ex: "What is 1+1?", "https://www.example.com/image.png"
}
// Choice Object
// Label values should be in sequence
{
label: String, // Label text - ex: "A", "3"
text: String // Text - ex: "It equals 2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment