Moodle

SCORM 1.2 :: cmi.launch_data not set

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.3
  • Fix Version/s: 1.8.7, 1.9.3
  • Component/s: SCORM
  • Labels:
    None
  • Environment:
    IE 7 and FF 2.0
  • Database:
    Any
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Using doLMSGetValue("cmi.launch_data"); return always an empty string in moodle 1.8.3 for SCORM 1.2 packages

1.In mod/SCORM files scorm_12*.php (as in scorm_13*) there is this line but it seems that $userdata->datafromlms is never set

'cmi.launch_data':{'defaultvalue':'<?php echo isset($userdata->datafromlms)?$userdata->datafromlms:'' ?>', 'mod':'r', 'writeerror':'403'},

2.I've searched on the db structure and I didn't find a table with a field for datafromlms or launch_data field

3. The package I've used pass the ADL conformance test. this is an extract of the manifest.xml used

<organization identifier="ORG-4F034FDB-9055-7E2F-B820-C3209F45412A" structure="hierarchical">
<title>Demo</title>
<item identifier="ITEM-0605EB90-1C31-6DDC-F3A4-6ACB2C5EBB5B" isvisible="true">
<title>Package di collaudo</title>
<item identifier="ITEM-AE1B3699-E255-120E-04F0-F1321617685D" isvisible="true" identifierref="RES-83D04D3B-7A65-6DCC-1178-69D369848FF1">
<title>Test</title>
<adlcp:datafromlms>LAUNCH DATA</adlcp:datafromlms>
</item>

Activity

Hide
Eric Villard added a comment -

hi, I've exactly the same problem on Moodle 1.9 + (Build: 20080325)
and no field seems to exist in the db structure.

Show
Eric Villard added a comment - hi, I've exactly the same problem on Moodle 1.9 + (Build: 20080325) and no field seems to exist in the db structure.
Hide
Roberto Pinna added a comment -

All data taken from manifest and not stored in scorm_scoes are stored in scorm_scoes_data

Show
Roberto Pinna added a comment - All data taken from manifest and not stored in scorm_scoes are stored in scorm_scoes_data
Hide
Eric Villard added a comment -

Not on mine.
And i've seen that the masteryscore field i've specified in my imsmanifest is also not stored.

Show
Eric Villard added a comment - Not on mine. And i've seen that the masteryscore field i've specified in my imsmanifest is also not stored.
Hide
Marco Loche added a comment -

Neither the launchdata is stored on my db table. A problem while parsing the manifest?

Show
Marco Loche added a comment - Neither the launchdata is stored on my db table. A problem while parsing the manifest?
Hide
Keith Starling added a comment -

I can't seem to reproduce this problem in Moodle 1.8, it looks like the code that's making it work for me was introduced in r1.5 of mod/scorm/datatypes/libscorm.php, which was in Moodle 1.8, but not 1.7.

Show
Keith Starling added a comment - I can't seem to reproduce this problem in Moodle 1.8, it looks like the code that's making it work for me was introduced in r1.5 of mod/scorm/datatypes/libscorm.php, which was in Moodle 1.8, but not 1.7.
Hide
Eric Villard added a comment -

hi, i think i've found the problem but i've no time to resolve it now.

In my version of moodle (1.9 + (Build: 20080325) ), there's no more mod/scorm/datatypes/libscorm.php but mod/scorm/datamodels/scormlib.php.

in this file, the scorm_get_manifest function has a switch case statement that use for datafromlms and others the adlcp tag with its namespace.
Or in scorm_parse_scorm function from the same file, the call of scorm_get_manifest function has for first argument $manifests in which datafromlms is referenced without its namespace.

so in $manifests datafromlms key is 'DATAFROMLMS' switch case statement 'ADLCP:DATAFROMLMS'.

is xml2Array can parse XML keeping namespaces ?

Show
Eric Villard added a comment - hi, i think i've found the problem but i've no time to resolve it now. In my version of moodle (1.9 + (Build: 20080325) ), there's no more mod/scorm/datatypes/libscorm.php but mod/scorm/datamodels/scormlib.php. in this file, the scorm_get_manifest function has a switch case statement that use for datafromlms and others the adlcp tag with its namespace. Or in scorm_parse_scorm function from the same file, the call of scorm_get_manifest function has for first argument $manifests in which datafromlms is referenced without its namespace. so in $manifests datafromlms key is 'DATAFROMLMS' switch case statement 'ADLCP:DATAFROMLMS'. is xml2Array can parse XML keeping namespaces ?
Hide
Piers Harding added a comment -

This has been tested in conjunction with the SCORM 1.2 compliance work and is behaving correctly in 1.8, 1.9, and HEAD.

Show
Piers Harding added a comment - This has been tested in conjunction with the SCORM 1.2 compliance work and is behaving correctly in 1.8, 1.9, and HEAD.
Hide
Dan Marsden added a comment -

closing this off - thanks for the report!

Show
Dan Marsden added a comment - closing this off - thanks for the report!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: