Download SCORM Users Guide for Programmers

Transcript
SCORM Best Practices Guide for Programmers
Sequencing & Navigation - Sequencing
9.4 How to Implement
In sequencing, you basically need to understand how to use three types of condition rules
provided by SCORM: pre-conditions, post-conditions, and exit-conditions. These rules, in
combination with navigation requests (see the Navigation section in this document) are all
that is needed to implement the majority of sequencing. Sequencing rules are defined in
detail in the SN book (see SN 3.4).
All sequencing rules have the same syntax. In the sequencing element of an activity, found
in the manifest file, there is a sequencingRules element, which may contain any number of
pre, post, and exit condition rules. Here is an example of the syntax:
<imsss:sequencingRules>
<imsss:preConditionRule>
<imsss:ruleConditions conditionCombination="all|any">
<imsss:ruleCondition condition="someCondition" />
<imsss:ruleCondition condition="someOtherCondition" />
</imsss:ruleConditions>
<imsss:ruleAction action=
"skip|disabled|hiddenFromChoice|stopForwardTraversal" />
</imsss:preConditionRule>
<imsss:postConditionRule>
<imsss:ruleConditions conditionCombination="all|any">
<imsss:ruleCondition condition="someCondition" />
</imsss:ruleConditions>
<imsss:ruleAction action=
"exitParent|exitAll|retry|retryAll|continue|previous" />
</imsss:postConditionRule>
<imsss:exitConditionRule>
<imsss:ruleConditions conditionCombination="all|any">
<imsss:ruleCondition condition="someCondition" />
</imsss:ruleConditions>
<imsss:ruleAction action="exit" />
</imsss:exitConditionRule>
</imsss:sequencingRules>
Let's break it down into the components of a sequencing rule.
First, rule conditions are either combined using AND or OR logic. This is done using the
conditionCombination attribute in the imsss:ruleConditions element. The values of "all" and
"any" correspond to AND and OR.
Conditions are listed as children of the imsss:ruleConditions element, using the
imsss:ruleCondition elements. There are three important attributes used in this element:
condition - the condition being tested
operator - may have a value of "not" to add logical NOT to condition
44