Scenario 1

The Data data model element has two elements for each of its n children:

Because there are no requirements for the indexing of the data maps, the order that the data maps appear in the imsmanifest.xml will probably not be the order of the children 1 through n. As a matter of fact, the children 1 through n will change between sessions of the same SCO. The following exercise will show how to isolate the data store with the corresponding id.
Assume that the id we are looking for is “data_store_1".

Complete the dot notation below:


   int storecount = GetValue( "adl.data. ");
   int index_of_data_store_1 = 0;
   for (int i=0; i < storecount; i++){
      var datastore_id = GetValue( "adl.data." + i + ". ");
      if ( datastore_id.equals( "data_store_1" )){
         index_of_data_store_1 = i;
         break;
      }
   }

Click after you complete this exercise.