Picture of Dean Wilson
Can components talk to each other?
by Dean Wilson - Tuesday, 30 August 2016, 1:50 PM
 

This is a question about the Adapt framework capabilities.

After creating a basic course, and seeing other Adapt showcase examples, it seems to me that components cannot pass information to other components. In other words, every component is isolated from every other component. As in, if I wanted a user to make a selection in a multiple choice question, and then for the remaining course to change according to the answer, that would be impossible right? Am I right in thinking this?

 

Thank you
Dean

Picture of Chuck Lorenz
Re: Can components talk to each other?
by Chuck Lorenz - Tuesday, 30 August 2016, 3:03 PM
 

There is no functionality out of the box that allows this. However, there are a variety of techniques that can be used to pass data and to persist data.

The #wrapper div appears in index.html and index_lms.html. It is present no matter what page you route to and what components are present. It is possible to customize a component's javascript to set an attribute on #wrapper to act as a variable, with the customized code of another component reading it and acting upon it. With this technique it is important to remember that the data will not persist after the course session is ended.

There are ways to persist small amounts of data, including using SCORM suspend data.

Sorry, for the brief reply. Hope that it gets you started and that others jump in to fill it out. 

Picture of Dean Wilson
Re: Can components talk to each other?
by Dean Wilson - Wednesday, 31 August 2016, 7:54 AM
 

Thanks for getting me started, Chuck.

I don't suppose there's any documentation for these techniques?