<?xml version="1.0" standalone="no" ?>
<!--
Sequencing example demonstrating rollup using either a pre-test or a post-test. SCORM 2004 3rd Edition.

Provided by Rustici Software - http://www.scorm.com

Sequencing Strategy:

Free form navigation is allowed. The pre-test can only be attempted one time. Once
a test is satisfied, both the pre and post tests are disabled. The post test can not
be attempted until all of the content is completed.

Rollup Strategy:
The course can only be completed and satisfied either by passing the pretest (testing out)
or by completing the entire course and passing the post test.
-->

<manifest identifier="com.scorm.golfsamples.sequencing.preorposttestrollup.20043rd" version="1"
          xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_v1p3"
          xmlns:adlseq="http://www.adlnet.org/xsd/adlseq_v1p3"
          xmlns:adlnav="http://www.adlnet.org/xsd/adlnav_v1p3"
          xmlns:imsss="http://www.imsglobal.org/xsd/imsss"
          xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd
                              http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd
                              http://www.adlnet.org/xsd/adlseq_v1p3 adlseq_v1p3.xsd
                              http://www.adlnet.org/xsd/adlnav_v1p3 adlnav_v1p3.xsd
                              http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd">

  <metadata>
    <schema>ADL SCORM</schema>
    <schemaversion>2004 3rd Edition</schemaversion>
  </metadata>

  <organizations default="golf_sample_default_org">

    <organization identifier="golf_sample_default_org" adlseq:objectivesGlobalToSystem="false">
      <title>Golf Explained - Sequencing Pre or Post Test Rollup</title>

      <!--
      Add a dummy wrapper item around all content. Make it invisible so it doesn't
      affect the user. Since the top level course has only this one child, the status for the
      course as a whole will be dependent on this dummy item.
      -->
      <item identifier="dummy_item" isvisible="false">
        <title>Dummy Item</title>
       
        <item identifier="pretest_item" identifierref="assessment_resource">
          <title>Pre Test</title>

          <imsss:sequencing>

            <!--  Rule to disable the pre test after exceeding attempt limit  -->
            <imsss:sequencingRules>
              <imsss:preConditionRule>
                <imsss:ruleConditions>
                  <imsss:ruleCondition condition="attemptLimitExceeded"/>
                </imsss:ruleConditions>
                <imsss:ruleAction action="disabled"/>
              </imsss:preConditionRule>

              <!-- If any test (pre or post) has been satisfied, disable the tests-->
              <imsss:preConditionRule>
                <imsss:ruleConditions>
                  <imsss:ruleCondition referencedObjective="assessment_satisfied" condition="satisfied"/>
                </imsss:ruleConditions>
                <imsss:ruleAction action="disabled"/>
              </imsss:preConditionRule>

            </imsss:sequencingRules>

            <!--  The attempt limit ensures that the pre-test is only attempted one time.  -->
            <imsss:limitConditions attemptLimit="1"/>

            <imsss:objectives>
              <imsss:primaryObjective objectiveID="assessment_satisfied">
                <!-- Write the satisfaction status of the pretest to a global objective-->
                <imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.preorposttestrollup.assessment_satisfied" writeNormalizedMeasure="true" writeSatisfiedStatus="true"/>
              </imsss:primaryObjective>
            </imsss:objectives>

            <imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true"/>
          </imsss:sequencing>
        </item>

        <!-- 
        Create a dummy invisible wrapper around the content to make it easy to write a sequencing rule
        that limits the post test's availability until all content is completed.
        -->
        <item identifier="content_wrapper" isvisible="false">
          <title>Content Wrapper</title>

          <item identifier="playing_item" identifierref="playing_resource">
            <title>Playing the Game</title>
            <imsss:sequencing>
              <imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true"/>
            </imsss:sequencing>
          </item>
          <item identifier="etuqiette_item" identifierref="etiquette_resource">
            <title>Etiquette</title>
            <imsss:sequencing>
              <imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true"/>
            </imsss:sequencing>
          </item>
          <item identifier="handicapping_item" identifierref="handicapping_resource">
            <title>Handicapping</title>
            <imsss:sequencing>
              <imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true"/>
            </imsss:sequencing>
          </item>
          <item identifier="havingfun_item" identifierref="havingfun_resource">
            <title>Having Fun</title>
            <imsss:sequencing>
              <imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true"/>
            </imsss:sequencing>
          </item>

          <imsss:sequencing>
            <imsss:controlMode choice="true" flow="true"/>
            <!--
            Once all of the SCOs are completed, this dummy content wrapper is satisfied.
            -->
            <imsss:rollupRules>
            
              <imsss:rollupRule childActivitySet="all">
                <imsss:rollupConditions>
                  <imsss:rollupCondition condition="completed"/>
                </imsss:rollupConditions>
                <imsss:rollupAction action="satisfied"/>
              </imsss:rollupRule>
            </imsss:rollupRules>

            <!-- Write this objective's satisfaction status to a global that we can use as a prerequisite for accessing the post test.-->
            <imsss:objectives>
              <imsss:primaryObjective objectiveID="content_completed">
                <imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.preorposttestrollup.content_completed" writeSatisfiedStatus="true"/>
              </imsss:primaryObjective>
            </imsss:objectives>

          </imsss:sequencing>
        </item>

        <item identifier="posttest_item" identifierref="assessment_resource">
          <title>Post Test</title>

          <imsss:sequencing>

            <imsss:sequencingRules>

              <!-- Once a test (pre or post) has been satisfied, disable it so it can't be taken again.-->
              <imsss:preConditionRule>
                <imsss:ruleConditions>
                  <imsss:ruleCondition referencedObjective="assessment_satisfied" condition="satisfied"/>
                </imsss:ruleConditions>
                <imsss:ruleAction action="disabled"/>
              </imsss:preConditionRule>

              <!-- If the content is not completed, then don't allow access to the post test -->
              <imsss:preConditionRule>
                <imsss:ruleConditions conditionCombination="any">
                  <imsss:ruleCondition referencedObjective="content_completed" operator="not" condition="satisfied"/>
                  <imsss:ruleCondition referencedObjective="content_completed" operator="not" condition="objectiveStatusKnown"/>
                </imsss:ruleConditions>
                <imsss:ruleAction action="disabled"/>
              </imsss:preConditionRule>
            </imsss:sequencingRules>

            <imsss:objectives>
              <imsss:primaryObjective objectiveID="assessment_satisfied">
                <!-- Write the satisfaction status of the posttest to a global objective-->
                <imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.preorposttestrollup.assessment_satisfied" writeNormalizedMeasure="true" writeSatisfiedStatus="true"/>
              </imsss:primaryObjective>

              <!-- Read from the content completed global to disable the post test until the content is completed-->
              <imsss:objective objectiveID="content_completed">
                <imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.preorposttestrollup.content_completed" readSatisfiedStatus="true"/>
              </imsss:objective>

            </imsss:objectives>

            <imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true"/>
          </imsss:sequencing>
        </item>
        
        <!-- Sequencing rules for the dummy wrapper item-->
        <imsss:sequencing>
          <imsss:controlMode choice="true" flow="true"/>

          <!-- 
          Include some rollup rules so that the dummy aggregation's status will change after the pretest is completed
          so that rollup proceeds to the top level
          -->
          <imsss:rollupRules>
            <imsss:rollupRule childActivitySet="any">
              <imsss:rollupConditions>
                <imsss:rollupCondition condition="completed"/>
              </imsss:rollupConditions>
              <imsss:rollupAction action="incomplete"/>
            </imsss:rollupRule>
            <imsss:rollupRule childActivitySet="all">
              <imsss:rollupConditions>
                <imsss:rollupCondition condition="completed"/>
              </imsss:rollupConditions>
              <imsss:rollupAction action="completed"/>
            </imsss:rollupRule>
          </imsss:rollupRules>
          
          <!-- Set up a read map so that this dummy wrapper's satisfaction and measure are pulled from the test global. -->
          <imsss:objectives>
            <imsss:primaryObjective objectiveID="assessment_satisfied">
              <imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.preorposttestrollup.assessment_satisfied" readNormalizedMeasure="true" readSatisfiedStatus="true"/>
            </imsss:primaryObjective>
          </imsss:objectives>

        </imsss:sequencing>
      </item>
      
      <imsss:sequencing>

        <imsss:controlMode choice="true" flow="true"/>

        <imsss:rollupRules>
          <imsss:rollupRule childActivitySet="any">
            <imsss:rollupConditions>
              <imsss:rollupCondition condition="satisfied"/>
            </imsss:rollupConditions>
            <imsss:rollupAction action="completed"/>
          </imsss:rollupRule>
        </imsss:rollupRules>
        
      </imsss:sequencing>
    </organization>
  </organizations>
  <resources>
    <resource identifier="playing_resource" type="webcontent" adlcp:scormType="sco" href="shared/launchpage.html?content=playing">
      <file href="Playing/otherscoreing.jpg"/>
      <file href="Playing/OtherScoring.html"/>
      <file href="Playing/Par.html"/>
      <file href="Playing/par.jpg"/>
      <file href="Playing/Playing.html"/>
      <file href="Playing/playing.jpg"/>
      <file href="Playing/rules.jpg"/>
      <file href="Playing/RulesOfGolf.html"/>
      <file href="Playing/Scoring.html"/>
      <file href="Playing/scoring.jpg"/>
      <dependency identifierref="common_files"/>
    </resource>
    <resource identifier="etiquette_resource" type="webcontent" adlcp:scormType="sco" href="shared/launchpage.html?content=etiquette">
      <file href="Etiquette/Course.html"/>
      <file href="Etiquette/course.jpg"/>
      <file href="Etiquette/Distracting.html"/>
      <file href="Etiquette/distracting.jpg"/>
      <file href="Etiquette/Play.html"/>
      <file href="Etiquette/play.jpg"/>
      <dependency identifierref="common_files"/>
    </resource>
    <resource identifier="handicapping_resource" type="webcontent" adlcp:scormType="sco" href="shared/launchpage.html?content=handicapping">
      <file href="Handicapping/calchandi.jpg"/>
      <file href="Handicapping/calcscore.jpg"/>
      <file href="Handicapping/CalculatingHandicap.html"/>
      <file href="Handicapping/CalculatingScore.html"/>
      <file href="Handicapping/Example.html"/>
      <file href="Handicapping/example.jpg"/>
      <file href="Handicapping/Overview.html"/>
      <file href="Handicapping/overview.jpg"/>
      <dependency identifierref="common_files"/>
    </resource>
    <resource identifier="havingfun_resource" type="webcontent" adlcp:scormType="sco" href="shared/launchpage.html?content=havingfun">
      <file href="HavingFun/friends.jpg"/>
      <file href="HavingFun/fun.jpg"/>
      <file href="HavingFun/HowToBeStylish.html"/>
      <file href="HavingFun/HowToHaveFun.html"/>
      <file href="HavingFun/MakeFriends.html"/>
      <file href="HavingFun/stylish.jpg"/>
      <dependency identifierref="common_files"/>
    </resource>
    <resource identifier="assessment_resource" type="webcontent" adlcp:scormType="sco" href="shared/launchpage.html?content=assessment">
      <file href="Playing/questions.js"/>
      <file href="Etiquette/questions.js"/>
      <file href="Handicapping/questions.js"/>
      <file href="HavingFun/questions.js"/>
      <dependency identifierref="common_files"/>
    </resource>
    <resource identifier="common_files" type="webcontent" adlcp:scormType="asset">
      <file href="shared/assessmenttemplate.html"/>
      <file href="shared/background.jpg"/>
      <file href="shared/cclicense.png"/>
      <file href="shared/contentfunctions.js"/>
      <file href="shared/launchpage.html"/>
      <file href="shared/scormfunctions.js"/>
      <file href="shared/style.css"/>
    </resource>
  </resources>

</manifest>
