Tahir Hussain Mir
Tahir Hussain Mir

Reputation: 2626

<adlcp:data> & <adlcp:map>element not understandable

I am working on the SCORM 2004 4th edition based LMS, where i am at the initial stage. Hence, i am reading SCORM based documents.
In the SCORM 2004 4th edition CAM document, i was stuck at the page CAM-3-37,
where the element adlcp:data is defined as

the container used to define sets of data shared associated with an activity.

and the child element of adlcp:data i.e; map is defined as

The element is the container used to describe how an activity will utilize a specific set of shared data.

I thought, I may understand it as I will move forward in the said book. But, I completed the CAM book and yet i am unable to get it how those two tags work.
And also, let's take an example into the consideration, which is as follows:

    <adlcp:data>
      <adlcp:map targetID="com.scorm.golfsamples.sequencing.forcedsequential.notesStorage" readSharedData="true" writeSharedData="true"/>
    </adlcp:data>

where, readSharedData attribute indicates that currently available shared data will be utilized by the activity while it is active.
and writeSharedData attribute indicates that shared data should be persisted (true or false) upon termination ( Terminate(“”) ) of the attempt on the activity.
Here in this case,

i didn't get what this targetID= com.scorm.golfsamples.sequencing.forcedsequential.notesStorage indicates.

i didn't get what is this shared data? and where is it located? what is it actually?
Can anyone help me in understanding the above described elements?

Upvotes: 1

Views: 417

Answers (2)

mumbaimerijaan
mumbaimerijaan

Reputation: 21

Tom Creightons answer is a very good explanation of the shared buckets implementation.

I am just adding a few pointers we found in our implentation.

  1. The data saved is for the "learner", and can be accessed and set across different SCO's or courses assigned to the learner. Beware though, if you are using SCORM Cloud, Clear GLobals button will clear the data for all courses assigned to the user.
  2. While Tom mentions that adlcp:sharedDataGlobalToSystem is attempt specific, SCORM Cloud support says that it is restricted to course/SCO. I have yet to get clarity on that.
  3. There might be a limit on the number of buckets being saved. I have yet to confirm this and will update this reply shortly.

For those looking for more info on implementation:

  1. Add this to your item (organisation > item) in the manifest:
    <adlcp:data> <adlcp:map targetID="mybucketname" readSharedData="true" writeSharedData="true"/> </adlcp:data>

    1. JS part (Use your API calls in place of LMSGetValue and LMSSetValue)

      var dataBucketsCount = LMSGetValue("adl.data._count"); dataBucketsCount = parseInt(dataBucketsCount); for (var i=0; i < dataBucketsCount; i++){ if (LMSGetValue("adl.data." + i + ".id") == "mybucketname"){ //do your processing with the data } }

I had to search a lot for this and try and fail multiple times until we got this right. So I have added this here, so in future it might help someone.

Upvotes: 2

tom creighton
tom creighton

Reputation: 487

adlcp:data is a way to define space on the LMS to store information that doesn't fit in the CMI data model, or that you want to make accessible across SCOs.

There are 3 pieces to defining this space.
1. adlcp:sharedDataGlobalToSystem attribute on the element, which says whether shared data is available for one attempt or for every attempt (aka is it wiped out each time the learner takes the course).. See CAM-3-27
2. adlcp:data & adlcp:map elements list the space(s) you want made available for that SCO. You define an ID for each storage space, and then add access controls meaning whether or not the SCO can read or write to the storage space. (See CAM-3-37)

Those two set up the LMS storage and behaviors for each SCO in the content package.

The final piece is described in section 4.3 of the RTE book. To access the data storage spaces, you use the SCORM API GetValue and SetValue requests and the data model element adl.data.n.store.

One additional note, since the id order is not necessarily maintained, you will need to loop through the adl.data stores in the SCO and determine which index goes to which ID.

Upvotes: 4

Related Questions