Simulation Development

Questions

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.

Entry Point

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 http://YOUR_DOMAIN/sandbox/index.html#/office/word/q1. The .html is omitted from the path.

Configuration

Question slides contain a few extra components that other slides do not need.

  • String references
  • Toolbar section
  • Stem
  • Entry slide (optional, but recommended)
  • Scoring
  • Exhibits
  • Calculator (optional)
  • Growl widget

Questions

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 learn:calculator in the question, there shouldn't be any other widgets present in the question.

Deconstructing a question

Lets take a look at a question slide.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<content xmlns:h="http://certiport.com/hammer/sdk/hammer"
         xmlns:learn="http://certiport.com/hammer/sdk/learn"
         class="slide">

    <h:virtual>

        <h:strings url="strings/global"/>

        <h:score>
            <condition>
                <all>
                    <assert>"{{models/slideshow::current_slide}}" == "slides/examples/slideshow/slide_2"</assert>
                </all>
            </condition>
        </h:score>

    </h:virtual>

    <h:mixin url="mixins/header"/>

    <learn:stem class="learn-stem" focus-index focus-autofocus>${stems.question}</learn:stem>

    <h:slide url="slides/examples/slideshow" />

    <h:mixin url="mixins/footer" />

</content>
Strings

In the example above we have a few things going on. In the h:virtual, a 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:string tags.

Score

The 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.

Header

The 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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<learn:toolbar class="learn-toolbar">
    <learn:zoom class="learn-zoom" />
    <div class="learn-spacer"></div>
    <div>
        <h:button ng-show="options.showCalculator" class="learn-btn" focus-index focus-autofocus="2">
            <div class="learn-calculator-icon"></div>
            <h:events click="showCalc()"/>
        </h:button>
        <h:button class="learn-btn learn-btn-default" focus-index>
            <span>Reload</span>
            <h:events click="reload()"></h:events>
        </h:button>
        <h:button class="learn-btn learn-btn-default" focus-index>
            <span>Reset</span>
            <h:events click="reset()"></h:events>
        </h:button>
    </div>
</learn:toolbar>
Stem

The stem is not included in the header because the content changes. It is easier to just include learn:stem with a reference to ${STRING_PATH}

Slide

A reference to the simulated application. The advantage of pointing to the application through a slide is the reuse.

Footer

The h:mixin footer may include components like copyright and other elements that should display below the simulation. In our case, we are including the learn:calculator and learn:growl. The h:mixin footer looks like this:

1
2
3
4
5
6
7
<!-- Calculator-->
<learn:calculator class="learn-calculator" />

<!-- Growl -->
<learn:growl class="learn-growl" delay="3000">
    <h:label>{{growl}}</h:label>
</learn:growl>

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.