Accessing DOM Elements of Captivate SCORM Export in Java-Script
Hi all,
we use Captivate 2017 (with fluid boxes) in order to create web-based trainings. We typically export the Captivate projects to SCORM 2004 and integrate them into our Moodle 3.1. For one of our current projects, there is the need to have a global glossary. I would like to implement it using a mouse-over jQuery-based tooltip library like Tipso [1], so whenever a word with an glossary record occurs in the SCORMs, it should be highlighted. By moving the mouse over it, it should present the explanatory text.
As I have all of the glossary records for all my SCORM WBTs in a list, my (maybe too simplistic) idea was to post-process Captivate's SCORM export. I thought that I could add the necessary CSS and JS parts for the tooltip lib and would then be able to use a little Bash or Perl script which parses through Captivate's text output. Whenever a word, which should be explained in the glossary, would be found, the Bash script would add a link to the tooltip and would deposit the explanation text. After then, I would repackage the SCORM and upload it to Moodle.
Modifying the output text doesn't seem to be an easy task, as everything is put into a single hard-to-read and even harder-to-edit CPM.js file. The second problem is that we haven't found out, yet, how I could get access to the DOM elements of Captivate slides' contents.
My questions therefore are:
- Has anyone done anything similar, yet? Maybe my approach is suboptimal and a completely different idea helps to solve my problem. What I don't want to do is to treat each glossary record manually in Captivate. One of the reason is that I need a maintainable solution. As it is a large multi-site academic and especially ongoing project, I know that there will be more words defined which should be integrated into the glossary at a later point in time. I don't want to touch all my Captivate projects manually again and again. Thus, an automatic solution is required, e.g. a Bash, Perl or Python script which runs through the export. Programming the script is not the problem. For simple HTML-based outputs, it works.
- Is there any possibility to force Captivate to produce the a more human-readable and human-understandable JavaScript and and slide-text output when publishing to a SCORM package?
- What is the event which notifies a user-defined JavaScript that a slide's contents are rendered completely and that the elements could be accessed in the DOM by using a self-defined JavaScript? At least, it doesn't work by adding the tags as described in [1] to the output text in CPM.js.
Thank you very much in advance for any helpful tips!
Kind Regards,
Steffen
