1. Overview & Purpose
The neoQuizEngine plugin provides a modern, interactive evaluation and testing engine control (neoQuiz Display) for VisualNEO Win applications.
It supports 4 question formats (multiple-choice, true-false, flashcard, fill-blank), real-time scoring, optional per-question and total timers, keyboard input, optional question/answer shuffling, pause/resume, a localized results screen, JSON dataset loading, and detailed result export.
2. Custom Control Properties
Control: neoQuiz Display (neo-quiz-display)
| Property Name | Type | Default Value | Description |
|---|---|---|---|
theme | string | "dark" | Visual color theme preset ("dark", "light"). |
showTimer | boolean | true | Shows or hides the timers without disabling their limits. |
showFeedback | boolean | true | Enables or disables instant green/red answer feedback colors. |
passingScore | integer | 70 | Required passing threshold percentage (0 to 100). |
questionTimeLimit | integer | 30 | Seconds available per question. 0 disables this limit. |
totalTimeLimit | integer | 0 | Seconds available for the whole quiz. 0 disables this limit. |
autoAdvanceOnTimeout | boolean | true | Advances after an unanswered question expires. |
shuffleQuestions | boolean | false | Shuffles question order on every start/restart. |
shuffleOptions | boolean | false | Shuffles each question's answer options on start/restart. |
autoContrast | boolean | true | Automatically selects readable text colors. |
accentColor | string | "#0078D4" | Primary brand accent color (#HEX). |
backgroundColor | string | "auto" | Control background color. |
surfaceColor | string | "auto" | Question and result card color. |
optionColor | string | "auto" | Answer option color. |
textColor | string | "auto" | Preferred text color. |
correctColor | string | "#10B981" | Correct answer color. |
incorrectColor | string | "#EF4444" | Incorrect answer color. |
borderColor | string | "auto" | Outer border color. |
3. Actions & Commands Reference
neoQuizLoadQuestions
Loads an array of questions from a raw JSON string into a neoQuizDisplay control.
- Command Syntax:
neoQuizLoadQuestions "ObjectName" "JSONString"
neoQuizLoadFile
Loads questions directly from a JSON file (.json) on disk.
- Command Syntax:
neoQuizLoadFile "ObjectName" "FilePath"
neoQuizAddQuestion
Appends a single question to a neoQuizDisplay control programmatically.
- Command Syntax:
neoQuizAddQuestion "ObjectName" "Type" "TitleText" "OptionsList" "CorrectAnswer" "Explanation" "TimeLimitSeconds" - Parameters:
- •
ObjectName(string): Target control name. - •
Type(string): Question type ("multiple-choice","true-false","flashcard","fill-blank"). - •
TitleText(string): Question text. - •
OptionsList(string): Comma-separated list of options for multiple choice. - •
CorrectAnswer(string): Correct answer string. - •
Explanation(string): Optional explanation text. - •
TimeLimitSeconds(integer): Optional question override.0disables the limit and a blank value usesquestionTimeLimit.
neoQuizStart
Starts or restarts the quiz session from question 1.
- Command Syntax:
neoQuizStart "ObjectName"
neoQuizNext
Navigates to the next question.
- Command Syntax:
neoQuizNext "ObjectName"
neoQuizPrev
Navigates to the previous question.
- Command Syntax:
neoQuizPrev "ObjectName"
neoQuizSubmitAnswer
Submits an answer choice string for the active question programmatically.
- Command Syntax:
neoQuizSubmitAnswer "ObjectName" "UserAnswer"
neoQuizFlipFlashcard
Flips the current flashcard between Question and Answer sides.
- Command Syntax:
neoQuizFlipFlashcard "ObjectName"
neoQuizGetScore
Retrieves current score, question count, percentage, and pass/fail status into [neoQuizResult].
- Command Syntax:
neoQuizGetScore "ObjectName" - Result Schema (
[neoQuizResult]):
{"score":80,"maxScore":100,"percentage":80,"passingScore":70,"passed":true,"questionCount":10,"correctCount":8,"incorrectCount":1,"unansweredCount":1,"totalTimedOut":false,"paused":false,"answers":[{"id":"1","question":"...","userAnswer":"Paris","correctAnswer":"Paris","answered":true,"correct":true,"points":10}]}
neoQuizExportResults
Saves full detailed quiz score results to a JSON file on disk.
- Command Syntax:
neoQuizExportResults "ObjectName" "OutputFilePath"
neoQuizReset
Clears all user answers and resets score to zero.
- Command Syntax:
neoQuizReset "ObjectName"
neoQuizPause
Pauses interaction and freezes both countdown timers.
- Command Syntax:
neoQuizPause "ObjectName"
neoQuizResume
Resumes interaction and both countdown timers.
- Command Syntax:
neoQuizResume "ObjectName"
4. Events Reference
questionstart: Fires when a new question becomes active.answer: Fires when the user submits an answer choice.timeupdate: Fires every second with legacy and separate question/total timer values.timeout: Fires when the current question timer reaches 0.quiztimeout: Fires when the total quiz timer reaches 0.completed: Fires when all questions in the quiz are finished.
5. Keyboard Operation
Tabfocuses the quiz control.- Arrow keys move the visible option focus.
Entersubmits the focused option.- Number keys
1to9submit the corresponding option directly. - After answering,
Enteror the right/down arrow advances to the next question. EnterorSpaceflips a flashcard. A secondEntermarks it as studied.
When a quiz finishes, the control automatically displays percentage, pass/fail status, correct, incorrect and unanswered totals, plus a compact question review. neoQuizGetScore and exported results include an answers array with the detailed state of every question.
6. Practical Usage Example (VisualNEO Win Script)
. --- Load questions from JSON file ---
neoQuizLoadFile "Quiz1" "[PubDir]data/geography_quiz.json"
. --- Alternatively add question programmatically ---
neoQuizAddQuestion "Quiz1" "multiple-choice" "What is the capital of France?" "Paris,London,Berlin,Madrid" "Paris" "Paris has been the capital of France since 987 AD."
. --- Start the quiz ---
neoQuizStart "Quiz1"
. --- Optional pause and resume ---
neoQuizPause "Quiz1"
neoQuizResume "Quiz1"
. --- Retrieve results on completion ---
neoQuizGetScore "Quiz1"
SetVar "[FinalScore]" "[neoQuizResult]"
The complete VisualNEO publication is available at demo/neoQuizEngine-demo.pub.