Forum Discussion
Saving checkboxes in Rise
Hi all,
I haven't been an Articulate user for a good few years now but recently found this thread while looking for information about RISE and using checkboxes for a project in work. It's a shame that this still seems to be an issue.
I have been playing with the original code posted by Ben and think I have this working so thought I'd share it in case it helps anyone else. Massive thanks to Ben for the original code as without it I wouldn't have known where to even start. Worth pointing out that the vast majority of the code in the attached file is Ben's work!!
The main changes I have made are commented in the attached JavaScript file if anyone is interested but in short they are:
- Created a click event listener on the <li></li> elements of the checkBox component. This updates the 'checkboxMap' value on each checkbox click to ensure that checkbox state is captured regardless of how a user exist the lesson - close button, browser close button or navigating to a new block or lesson.
- Identifies the checkboxes using updated classes and attributes as the checkbox list component seems to have changed since Ben's original solution.
- Implemented the changed from Meagan earlier in this thread.
Works exactly as per Bens instructions except point 7 which I changed to:
function concatLMSData(data) {
//Wrap in a 500ms delay to allow the 'checkboxMap' value to update before sending data to the LMS
setTimeout(function () {
assign(cache, data);
saveCheckboxes();
checkboxData = JSON.stringify(checkboxMap);
LMSProxy.SetDataChunk(compress(cache) + "checkbox" + checkboxData);
}, 500);
}