Plugin for creating pretty, dynamic quizzes.


Based on:

https://github.com/jewlofthelotus/SlickQuiz


Sample App:
https://visualneo.com/tutorials/neoquiz


Description


The neoQuiz plugin for VisualNEO Web enables the creation of interactive, visually appealing quizzes within applications. Based on the SlickQuiz library, this plugin allows customization of quiz content, scoring, and feedback, making it ideal for educational apps, surveys, and engagement tools. Here’s a breakdown of its main features and practical applications:

Creating a New Quiz

The neoQuizNewQuiz command initiates a new quiz with customizable options for quiz structure, including title, description, and results levels.

    • Command: neoQuizNewQuiz
    • Syntax: neoQuizNewQuiz json "nameText" "descriptionText" "resultsText" "level1" "level2" "level3" "level4" "level5"
      • json: JSON object variable to store quiz data.
      • nameText: Title of the quiz.
      • descriptionText: Brief description of the quiz.
      • resultsText: Text displayed after the quiz.
      • level1level5: Scoring levels or ranks for quiz completion.

Example:

neoQuizNewQuiz "quizData" "General Knowledge" "Test your knowledge!" "Well done!" "Novice" "Intermediate" "Advanced" "Expert" "Master"

This command initializes a quiz titled "General Knowledge" with feedback based on score levels​.

Setting Quiz Options

The plugin supports configuration for question sorting, answer shuffling, and response messaging with the neoQuizSetOptions command.

    • Command: neoQuizSetOptions
    • Syntax: neoQuizSetOptions skipStartButton numberOfQuestions randomSortQuestions randomSortAnswers preventUnanswered perQuestionResponseMessaging completionResponseMessaging scoreAsPercentage
      • Options:
        • skipStartButton: Start the quiz immediately.
        • numberOfQuestions: Limit the number of questions (0 = all).
        • randomSortQuestions and randomSortAnswers: Shuffle questions or answers.
        • preventUnanswered: Enforce answering each question.
        • scoreAsPercentage: Display score as a percentage​.

Starting the Quiz

The neoQuizStart command launches the quiz in a designated container.

    • Command: neoQuizStart
    • Syntax: neoQuizStart "objId" [jsonData]
      • objId: The container where the quiz displays.
      • jsonData: JSON data containing quiz questions and settings.

Example:

neoQuizStart "quizContainer" "[quizData]"

This command displays the quiz in quizContainer, pulling questions from quizData​.

Event Handling for Quiz Interactions

The plugin supports custom events with neoQuizSetEvents to trigger actions on quiz start, completion, and more.

    • Command: neoQuizSetEvents
    • Syntax: neoQuizSetEvents onstart oncomplete onreset oncheckanswer onnextquestion onbackquestion
      • Events:
        • onstart: Triggered when the quiz starts.
        • oncomplete: Triggered upon completion.
        • oncheckanswer: After each answer check.

Practical Applications

The neoQuiz plugin is suitable for:

    • Educational Apps: Testing knowledge on various topics.
    • Customer Engagement: Quizzes for engagement and data collection.
    • Self-Assessment Tools: Providing users with feedback based on scores.

With flexible settings for customizing quiz content and feedback, the neoQuiz plugin provides a robust tool for interactive assessments in VisualNEO Web applications​

 

neoQuizNewQuiz

Purpose:

Create a new Quiz JSON Object.


Alternatively you can create it directlly using JavaScript.

Category:

neoQuiz

Syntax:

neoQuizNewQuiz json "nameText" "descriptionText" "resultsText" "level1" "level2" "level3" "level4" "level5"

 

json

JSON object variable name (will be created if not exists)

nameText

Quiz name text

descriptionText

Description text

resultsText

Results text (shown when fishished)

level1

Ranking level 1 text

level2

Ranking level 2 text

level3

Ranking level 3 text

level4

Ranking level 4 text

level5

Ranking level 5 text

 

neoQuizAddQuestion

Purpose:

Add a new question to a Quiz JSON Object.


Alternatively you can create it directlly using JavaScript.

Category:

neoQuiz

Syntax:

neoQuizAddQuestion json "question" "correctText" "incorrectText" "answer1" answer1type "answer2" answer2type "answer3" answer3type "answer4" answer4type

 

json

JSON object variable name

question

Question text (HTML allowed)

correctText

Text to display if the answer is correct

incorrectText

Text to display if the answer is incorrect

answer1

Answer1 text (HTML allowed)

answer1type

Answer1 is a correct answer?

answer2

Answer2 text (HTML allowed)

answer2type

Answer2 is a correct answer?

answer3

Answer3 text (HTML allowed)

answer3type

Answer3 is a correct answer?

answer4

Answer4 text (HTML allowed)

answer4type

Answer4 is a correct answer?

 

neoQuizSetText

Purpose:

Set default text strings for quizzes.


Left any of them empty for default content.

Category:

neoQuiz

Syntax:

neoQuizSetText "getStartedText" "checkAnswerText" "nextQuestionText" "backButtonText" ""completeQuizText" "tryAgainText" "preventUnansweredText" "questionCountText" "questionTemplateText" "scoreTemplateText" "nameTemplateText" "youScoredText" "rankingText"

 

getStartedText

Text for get started button. Default: 'Get Started!'

checkAnswerText

Text for the check answer button. Default: 'Check My Answer!'

nextQuestionText

Text for the next question button. Default: 'Next »'

backButtonText

Text for the back button. Left blank (default) for no back button

"completeQuizText

Text for last button before getting results. Example: ""Get Your Results!"""

tryAgainText

Text for the try again button. If left blank - no try again button will be displayed

preventUnansweredText

Text to show if a user enter a blank answer. Default: 'Select at least one answer'

questionCountText

Question count text. Default: 'Question %current of %total'

questionTemplateText

Question template text. Default: '%count. %text'

scoreTemplateText

Score template text. Default: '%score / %total'

nameTemplateText

Name template text. Default: 'Quiz: %name'

youScoredText

You scored text. Default: 'You scored:'

rankingText

Ranking text. Default: 'Ranking:'

 

neoQuizSetOptions

Purpose:

Set quiz options

Category:

neoQuiz

Syntax:

neoQuizSetOptions skipStartButton numberOfQuestions randomSortQuestions randomSortAnswers preventUnanswered perQuestionResponseMessaging completionResponseMessaging scoreAsPercentage

 

skipStartButton

Skip start button

numberOfQuestions

Number of questions to load from the question set (0 = all)

randomSortQuestions

Sort questions randomly

randomSortAnswers

Sort answers randomly

preventUnanswered

Prevent submitting a question with no answer

perQuestionResponseMessaging

Show correct / incorrect response messages after each answer

completionResponseMessaging

Display all questions results when the quiz is completed

scoreAsPercentage

Display score as a percentage rather than the correct responses number

 

neoQuizSetEvents

Category:

neoQuiz

Syntax:

neoQuizSetEvents onstart oncomplete onreset oncheckanswer onnextquestion onbackquestion

 

onstart

On start quiz

oncomplete

On complete quiz

onreset

On reset quiz

oncheckanswer

On check answer

onnextquestion

On next question

onbackquestion

On back question

 

neoQuizStart

Purpose:

Start the Quiz

Category:

neoQuiz

Syntax:

neoQuizStart "objId" [jsonData]

 

objId

Container for the quiz

jsonData

JSON object variable name with questions data

Created with the Personal Edition of HelpNDoc: Effortlessly optimize your documentation website for search engines