Question Writer Manual/About Questions/Plugins

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Plugins[edit | edit source]

The plugin question type allows for an unlimited number of question types. Anything that can be programmed in Flash (up to version 8) can be used as a question type. Plugin Questions allow you to ask any type of question, with any type of layout or display, and any type of scoring logic.

Plugin Questions can also use content that is entered in Question Writer. This means that a programmer is only required to create the initial question type – the content can be supplied through the usual Question Writer interface. And once a Plugin Question is created, it can be used over and over again in different quizzes

Three sample Plugin Questions are provided with Question Writer. Check in the samples directory to open the 'PluginQuestions.qwz' file in Question Writer. View the quiz here[[1]], to see how the questions integrate seamlessly into a quiz.



Plugin Questions are created as .swf files - this file contains all the layout code and scoring logic. Question Writer then provides the file with the parameters and options of the question. Take the Horizontal Slider Plugin Question provided with Question Writer for example.



The parameters are used to tell it the maximum and minimum values that the slider can take and whether to display the slider's current value. The first option is used to provide a background graphic, and the second option is used to provide the slider button. In this way, the Plugin Question is programmed once, but virtually any type of slider can be created with it using the parameters and options.

To create your own Plugin Question, you'll need the services of a Flash programmer. The interface is described in Plugin Question Requirements, and you can also download the source code (.fla) to a sample Plugin Question (The Cycle Plugin Question) as a basis to work from [[2]].