Picture of Paul Rhodes
Help understanding Protocol
by Paul Rhodes - Monday, 13 August 2018, 10:40 AM
 
We are creating an LMS and we are struggling to understand the logic in this protocol to track the course.
 
Can anyone help us to understand this logic?  When the course is complete zeros turn into ones but the algorthythm behind it is unclear.
 
completion\":\"11111111110111111111111111111111101111110110000000\", наверно если все 1 то 100% { "cmi.core.lesson_status": "incomplete", "cmi.core.lesson_mode": "normal", "cmi.core.lesson_location": "", "cmi.suspend_data": "{\"lang\":\"en\",\"completion\":\"11111111110111111111111111111111101111110110000000\",\"questions\":\"\",\"_isCourseComplete\":false,\"_isAssessmentPassed\":false,\"assessment\":{\"Introduction to First Aid Quiz\":[0,0,null,0,1,{\"5b68059a90ff5844bf624092\":null,\"5b68059a90ff5844bf624093\":null,\"5b68059a90ff5844bf624091\":null,\"5b68059a90ff5844bf62408f\":null,\"5b68059a90ff5844bf624090\":null,\"5b68059a90ff5844bf62408e\":null,\"5b68059a90ff5844bf62408d\":null,\"5b68059a90ff5844bf624099\":null,\"5b68059a90ff5844bf62408a\":null,\"5b68059a90ff5844bf624094\":null,\"5b68059a90ff5844bf62408b\":null}]}}", "cmi.core.session_time": "0008:32:43.66", "cmi.core.exit": "", "cmi.interactions.undefined.id": "5b68059a90ff5844bf62407e", "cmi.interactions.undefined.type": "choice", "cmi.interactions.undefined.student_response": "1,5,2", "cmi.interactions.undefined.result": "wrong", "cmi.interactions.undefined.time": "21:09:21" } }
 
Thanks in advance !!
Paul
Picture of Matt Leathes
Re: Help understanding Protocol
by Matt Leathes - Monday, 13 August 2018, 11:27 AM
 

Hi Paul

Each of those 1s and 0s represents a 'block' in the course. The index of each particular 1 or 0 is matched to a block via the block's _trackingId.

If it helps, the code to write that data to/read it from the LMS is here.

The reason we only track to block level and do so in this fashion is so that we need the smallest amount of data for storing the course's state: you only get 4KB of storage to work with in SCORM 1.2, which isn't a lot.

If you've ever used Articulate/Storyline you'll know it's relatively easy to create a course that exceeds the storage capacity of SCORM 1.2 because the tracking data it writes out is pretty verbose. We decided on a more minimalist implementation so as to allow for larger courses.

Picture of Paul Rhodes
Re: Help understanding Protocol
by Paul Rhodes - Monday, 13 August 2018, 12:35 PM
 

Thanks for your reply Matt, really helpful!  Ill pass this onto the developer and let you know if I have any questions.

 

Paul

Picture of Lars Halkjær
Re: Help understanding Protocol
by Lars Halkjær - Monday, 13 August 2018, 12:51 PM
 

This raised an issue for me:

Let us say I have a block with two media components and I complete the first one, leave the course and resumes later.
If completion is tracked at the block level, then I would need to complete the first one again and then the second, before the block is completed?

This is not a problem as such - it is just nice to know the inner workings of these things.

Picture of Matt Leathes
Re: Help understanding Protocol
by Matt Leathes - Monday, 13 August 2018, 1:54 PM
 
I would need to complete the first one again and then the second, before the block is completed?

Yes, that's exactly right. Naturally it's not ideal but it's a good compromise between data usage and tracking detail - and rarely seems to be a problem for anyone.

Picture of Lars Halkjær
Re: Help understanding Protocol
by Lars Halkjær - Monday, 13 August 2018, 2:20 PM
 

Thanks Matt

And you are right: Not really an issue (but good to know, so you don't come to rely on anything else).

One final question:

Let us say I upload a couse to an LMS and completes a number of blocks.

If I make a new version of the course in the AT, where I have switched the order of two blocks (or maybe deleted or inserted a block) - how would this affect the completion tracking?

Picture of Matt Leathes
Re: Help understanding Protocol
by Matt Leathes - Monday, 13 August 2018, 3:13 PM
 
If I make a new version of the course in the AT, where I have switched the order of two blocks (or maybe deleted or inserted a block) - how would this affect the completion tracking?

That's why we have the _trackingId property associated with each block... so long as you don't mess with the _trackingId of any block once the course has gone live you'll be fine. It can cope with a block being deleted, just don't 'recycle' that _trackingId.

Picture of Lars Halkjær
Re: Help understanding Protocol
by Lars Halkjær - Tuesday, 14 August 2018, 7:39 AM
 

That makes sense, but if you create a course in the AT with 3 blocks, their id will be numbered 1, 2 and 3.

If you delete the middle block in a new edition, the remaining two blocks will be numbered 1 and 2, and that means that the former third block has changed its id.

If I wanted to changed the way the completion is tracked in the suspend data field, would it be a question of just replacing/subclassing the "default.js" serializer?

Picture of Matt Leathes
Re: Help understanding Protocol
by Matt Leathes - Tuesday, 14 August 2018, 9:01 AM
 
If you delete the middle block in a new edition, the remaining two blocks will be numbered 1 and 2, and that means that the former third block has changed its id.

No, that's not how it works. Each block is assigned a unique, 0-based _trackingId, so the first block will have a _trackingId of 0, the second 1 and the third 2.

If you delete the second block, the _trackingId of the other two does not change, you simply no longer have any block with a _trackingId of 1. In the suspend_data this will be represented by - instead of 1 or 0.

If I wanted to changed the way the completion is tracked in the suspend data field, would it be a question of just replacing/subclassing the "default.js" serializer?

Mostly, yes.

Picture of Lars Halkjær
Re: Help understanding Protocol
by Lars Halkjær - Tuesday, 14 August 2018, 9:31 AM
 

I did a test where I created a course with 3 blocks on a page in the AT, exported it, deleted the middle block and exported it again.

When I compare the "blocks.json" files, I get this result (with some fields removed for clarity):

First version exported from AT:
[
  {
    "_id": "5b7283d6706dee577a81019f",
    "_trackingId": 1,
  },
  {
    "_id": "5b7283e3706dee577a8101a1",
    "_trackingId": 2,
  },
  {
    "_id": "5b7283fe706dee577a8101a3",
    "_trackingId": 3,
  }
]

Second version exported from AT (with block 5b7283e3706dee577a8101a1 removed):
[
  {
    "_id": "5b7283d6706dee577a81019f",
    "_trackingId": 1,
  },
  {
    "_id": "5b7283fe706dee577a8101a3",
    "_trackingId": 2,
  }
]

The 5b7283fe706dee577a8101a3 block has changed its _trackingId.

Picture of Matt Leathes
Re: Help understanding Protocol
by Matt Leathes - Tuesday, 14 August 2018, 10:19 AM
 

Then that's a bug in the authoring tool, please could you log a ticket?

Picture of Lars Halkjær
Re: Help understanding Protocol
by Lars Halkjær - Tuesday, 14 August 2018, 10:49 AM
 

Thanks for the help.

I have logged the issue.

Picture of Lars Halkjær
Re: Help understanding Protocol
by Lars Halkjær - Wednesday, 15 August 2018, 9:09 AM
 

FYI: https://github.com/adaptlearning/adapt_authoring/issues/2048#issuecomment-413137139