Before creating Question Types for the Assessment
Portal it is important to understand the difference between normal and section-wide question types.
Normal question types will display one webpage for every question. Section-wide question
types use a single webpage for an entire section. This is great for question types like multiple
choice or when you would like to use background loading. Before you begin coding, decide which
type of question type will work best for you. To get started developing question types download
the Question Type Template by going to the Edit Test tab, clicking Edit Question Types
and clicking the blue link. Note that this section is only visible for administrators.
Inside the downloaded zip are 3 files and 1 empty folder. Lets discuss each of these
individually. index.html is the file that is loaded by the
software when a test uses your question type. It is completely up to you what this file
interface to our system and should not be modified. The comments above each function
describe how they should be used. Every question type should use this file for communication
with our web application. Note that the version of this file included in the template is designed
to ease development. Once you upload your question type this file is replaced with a
deployment version. The test folder is a place to store any files
used for testing that will be specified by test creators, using inputs, once uploaded
to the portal. If you are creating a video player question type this may be the video
that is played in your player. The test.txt file contains JSON similar to
that used by the Assessment Portal for communication with your question type. You should add any
inputs you plan to give test designers as keys, and also provide values that will allow
you to test your question type. Note that you are limited to strings and arrays of strings.
Anything else like arrays of arrays are not supported by the software with one exception.
If you are choosing to create a section-wide question type each input will be an array
with one entry per question in the section. Each one of those entries, in this case, may
then be a string or array of strings. Note that if you create a section-wide question
type you still have the option to make some of your inputs section-wide. These types of
inputs don’t have the extra array, and will have a single value that applies to all questions.
If you will be using any demographic information within your question you should also provide
sample data in this file for testing. Prefix the demographic information names with two
underscores, and make sure to type them exactly how they appear in the system.
Also note the other parameters, that contain a single underscore, which you may adjust
to test your applications behaviour. Once you have completed you question type zip all
the files relating to it into a .zip file.