Now that you have an understanding of the components used in Simulation Development, lets take a look at how to build a question. A question is nothing more than a slide, except it acts as an entry point and a configuration for the question.
If you haven't already, download the seed-exam. We will use this starter project to build our first question.
You can access any slide located in the
slides directory through the browser. The URL
includes the path using a
# as the entry point that points to the slide. For example,
if you had a slide located in directory
office/word/q1.html, you could access it via
is omitted from the path.
Question slides contain a few extra components that other slides do not need.
- String references
- Toolbar section
- Entry slide (optional, but recommended)
- Calculator (optional)
- Growl widget
Do I need a slide for each question?
No, but its recommended. If you find your configuration is the same for a group of questions, then just build up that piece as a h:mixin. For example, you will notice the toolbar is a mixin. It is pretty much the same for all questions.
Where should I build the application I am simulating in the question slide?
No. The application will be used by many questions. Its possible that it may be used in another
exam. It is best to treat the question more like a configuation for the exam and the application.
Aside from having the toolbar, a
h:slide, and the
the question, there shouldn't be any other widgets present in the question.
Deconstructing a question
Lets take a look at a question slide.
In the example above we have a few things going on. In the
h:strings tag has been declared. Any strings included in in this file will can be referenced
in the question or slides used in the question. As mentioned in the
Strings, you can declare any number of
h:score tag is used to actually make the simulation a scorable question. Without the
h:score tag, there really isn't a question.
Click here to learn more about scoring.
h:mixin header is used to include the toolbar. Because the toolbar does not change, it
is best to have this as a mixin. The
h:mixin header looks like this:
The stem is not included in the header because the content changes. It is easier to just include
learn:stem with a reference to
A reference to the simulated application. The advantage of pointing to the application through a slide is the reuse.
h:mixin footer may include components like copyright and other elements that
should display below the simulation. In our case, we are including the
h:mixin footer looks like this:
This question template will get you started on the workflow for constructing a question. You will most likely find a format that works best for each exam that is built.