Rustici Software

Rustici Software - We Make SCORM Easy SCORM Consultants
     Home HOME     SCORM Engine LMS STANDARDIZATION      SCORM Driver CONTENT STANDARDIZATION      SCORM Test Track TEST TRACK      Offline Delivery OFFLINE DELIVERY      SCORM Resources RESOURCES

Sequencing Tidbit #2 - Not Ain't Always Not
10.05.2007 - Mike Rustici

"It depends on what your definition of not isn't"

Us programmer geeks have a very well defined preconceived notion of what "not" means. If I say:

var person = Pick_A_Random_Person_Off_The_Street();

if ( NOT ( person.Thinks_Mike_Is_Cool() ) ) then
    print "mike is lame"
else
    print "holy cow"


In almost all cases that program will print "mike is lame". Only in the rare case that somebody explicitly states that I am cool will it print "holy cow". In most cases where the random person off the street has absolutely no knowledge of my coolness (my coolness is unknown), the program will still print "mike is lame" because NOT means "do this anytime the following statement is not true".

Simple, right, no no. SCORM 2004 Sequencing and Navigation takes a different slant on the meaning of the not operator. Instead of not meaning "any time the following statement is not true", in SCORM S&N it means "any time the opposite of the following statement is true". Notice the subtle difference, in SCORM the not operator covers the opposite case but not the unknown case. To write code equivalent to the code above using the SCORM definition of the not operator, you would have to write it like this:


if ((NOT(person.Thinks_Mike_Is_Cool())) OR
     person.Does_Not_Know_Mike()
   ) then
    print "mike is lame"
else
    print "holy cow"


In SCORM, NOT doesn't cover all the cases where mike isn't cool (person doesn't know mike or person thinks mike is lame), it only covers the explicit opposite case of coolness (lameness).

Ok, enough abstract, self-depricating analogies. How does this apply to real sequencing rules. Say you want to write a simple rule that says "unless the user satisfied an objective, disable the activity". Seems straight forward enough. Using traditional logic, you would write something like this:

<!--WARNING - incorrect code example -->
<imsss:postConditionRule>
    <imsss:ruleConditions>
        <imsss:ruleCondition referencedObjective="obj_make_mike_cool" operator="not" condition="satisfied"/>
    </imsss:ruleConditions>
    <imsss:ruleAction action="disabled"/>
    </imsss:postConditionRule>

But that doesn't do what you probably want it to. What that really says is "if the user attempted the objective and failed it, then disable the activity". If the user never attempted the objective, then this activity will still be enabled. To achieve what you're after, you'll need code like this:


<imsss:postConditionRule>
    <imsss:ruleConditions conditionCombination="any">
        <imsss:ruleCondition referencedObjective="obj_make_mike_cool" operator="not" condition="satisfied"/>
        <imsss:ruleCondition referencedObjective="obj_make_mike_cool" operator="not" condition="objectiveStatusKnown"/>
    </imsss:ruleConditions>
    <imsss:ruleAction action="disabled"/>
    </imsss:postConditionRule>


That code says, if the objective has an unknown status (has not been attempted) or if it was attempted and was not satisfied, then disable the activity.

In summary, the NOT operator does not cover the unknown state. Sequencing rule conditions need to explicitly account for the unknown state.

Labels:

8:52 AM

0 Comments:

Post a Comment

<< Home


Archives
August 2005
September 2005
October 2005
December 2005
January 2006
February 2006
April 2006
May 2006
June 2006
August 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
March 2008
May 2008
June 2008

Subscribe to
Posts [Atom]




Products

The ultimate tool for testing, developing and validating SCORM conformant content.


Case Studies

Wants the best of the best.



Call us for a Complimentary Consultation

(866) 49-SCORM  |  info@scorm.com
HOME |  LMS STANDARDIZATION |  CONTENT STANDARDIZATION |  TEST TRACK |  OFFLINE DELIVERY |  RESOURCES

CONTACT


Copyright © 2002-2008 Rustici Software, LLC. ALL RIGHTS RESERVED