Finally, I’ll add the code which connects the item and resource data together to create the data that the “imaginary” LMS needs.
// array for the results $SCOdata = array(); // loop through the list of items foreach ($itemData as $identifier => $item) { // find the linked resource $identifierref = $item['identifierref']; // is the linked resource a SCO? if not, skip this item if (strtolower($resourceData[$identifierref]['scormtype']) != 'sco') { continue; } // save data that we want to the output array $SCOdata[$identifier]['title'] = $item['title']; $SCOdata[$identifier]['masteryscore'] = $item['masteryscore']; $SCOdata[$identifier]['datafromlms'] = $item['datafromlms']; $SCOdata[$identifier]['href'] = $resourceData[$identifierref]['href']; $SCOdata[$identifier]['files'] = $resourceData[$identifierref]['files']; }
Next post … I’ll run some tests, and post a full copy of the code for you to download if you want to try it out for yourself.
Great document thanks, I’m sure you are helping a lot of people, I guess only left explain save and restore student navigation track.
If only it were that simple! 🙂 There’s quite a lot left to look at including handling content package uploads, adding optional data elements to the RTE, error reporting in the RTE, performance issues …
great document!
please tell me ,how to use the “data from lms”? tks
Not sure I can help you there. According to the JCA Solutions website, it’s:
Other than that, I can’t find much information about it.