Skip navigation
cubsfan2010
Currently Being Moderated

Importing LMS variables into Captivate

May 15, 2012 9:13 PM

I would like to retrieve data from the LMS (Moodle) running my Captivate course - specifically, capture the students name from LMS and display it in Captivate. I have read a previous discussion on this, but it ended without a definitive answer it seemed.

 

Looks like first the SCORM data in the variable first has to be passed to an embedded Flash file through javascript, then passed on to Captivate from Flash. One suggestion from the post hinted it could be done without the javascript step.

 

Has anyone had success with this? And with SCORM 1.2 or 2004? I would greatly appreciate some advice if anyone has pulled this off...

 

SCORM variable (student's name) -> Javascript -> embedded Flash file -> displayed in Captivate....

 

Thank you in advance to anyone who can help!

 
Replies
  • Currently Being Moderated
    May 18, 2012 1:01 AM   in reply to cubsfan2010

    It can definitely not be done without using JavaScript. SCORM relies on JavaScripts to do all of the communication so this is a key part of the solution.

     

    Basically you want to create a JavaScript function that can grab the data from your LMS. Keep in mind that there are differences between the naming and location of SCORM database fields for SCORM 1.2 and SCORM 2004. Once you have a working function (just add an "alert" that will display what the javascript function returns when it is executed) you can go to the next step, which is getting the data into Captivate.

     

    You probably want to create a Flash SWF that will do some processing on the retrieved value first. You see the SCORM specifications does not state HOW the LMS providers should implement the student name format so this will vary from LMS to LMS. The majority of LMS's would return something like "{lang=en}Doe, John" so you wouldn't be able to use that in Captivate.

     

    Your flash file should strip away the language tag and probably also reverse the order of the names so you get "John Doe" as a result instead. Once you have done the processing in Flash you would create a user defined variable in Captivate to store the name in. The Flash file should then "pass" the data over to this variable and you could then use it in your course. Here - http://www.cpguru.com/adobe-captivate-5-system-variables/ - you can see a way to have a Flash file communicate with Captitvate.

     

    Good luck ;o)


    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more..

     
    |
    Mark as:
  • Currently Being Moderated
    May 20, 2012 2:11 AM   in reply to cubsfan2010

    I guess that you could put the JavaScripts in the Execute JavaScript directly in Captivate, but I would add them to the standard.js or scorm.js file that Captivate produces.

     

    In order to strip away the languag tag etc. you would need to get the value into your Flash file, so if you have the JS function in the standard.js you can just call that from your Flash file and get the return value for further processing.

     


    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more..

     
    |
    Mark as:
  • Currently Being Moderated
    May 21, 2012 5:52 PM   in reply to cubsfan2010

    Hello,

    For more information on Michael's suggestion, you might want to visit and read further information on this thread.

    This is in connection to what you want to achieve.

     

    Cheers!

     

    -Miguel

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2012 12:25 PM   in reply to cubsfan2010

    Okay - can you mark the topic as answered so that other users will find it more easily.

     

    Also - it would be very helpful if you could post a brief explanation of how you got it to work. I'm especially interested in how you got the Flash file to pull the data without adding any Javascript, but perhaps you are calling the JS directly from the SWF?

     

     


    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more..

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 22, 2013 10:13 AM   in reply to cubsfan2010

    Any thoughts as to how to make this work in HTML5? Pure js and Advanced Actions maybe? Thanks in advance!

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 26, 2013 6:25 AM   in reply to www.cpguru.com

    Thank you Michael and Jim! I also posted on your site but I will repeat it here just in case you or someone else has the answer. Is the patch that to linked to recommended for 6.1 users or just 6.0?

     

    Thanks,

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 26, 2013 6:34 AM   in reply to bremnerr

    The fix in Michael's article is just for 6.0.1.240, just got confirmation about that from Adobe. Fix for 6.1 will be there soon, I hope.

     

    Lilybiri

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2013 4:35 AM   in reply to cubsfan2010

    cubsfan2010 ...I could kiss you.

     

    Although for anyone else using this, I noticed that there is a space in this line which should not be there:

     

    var UserName:String = String(ExternalInterface.call('g_objAPI.LMSGetValue','cmi.core.studen t_name'));

     

    Should be

     

    var UserName:String = String(ExternalInterface.call('g_objAPI.LMSGetValue','cmi.core.student_name'));

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points