Picture of Misha G
Custom Trickle Button
by Misha G - Friday, 6 April 2018, 4:38 PM
 

Hello Community,

Sometimes I program custom exercises that Trickle can't record if the exercise was completed or not. So by default, if I enable the Trickle, users can skip the whole custom exercise.

Is there a way that I can add specific classes that are linked to my custom exercise so the Trickle record actions? For instance, make the Trickle button visible after x amount of clicks on these classes?

For a visual example, on the first attached image, I've made so that after selecting 3 items, a comment box appears. After entering a character in the comment box, a Continue button appears. Normally it would be ideal if that Continue button would go to the next section of the course.

 

Currently, my workaround is to create a new component located right under the custom exercise and enable Trickle. I make that component opacity 0 and lower the padding/margins. Upon writing in the comment box, the opacity of the component goes to 100% visible, thus letting users continue to the next component.

It's a very messy way of bypassing the Trickle limitation and I was curious if there was an alternative.

Thank you.



Picture of Matt Leathes
Re: Custom Trickle Button
by Matt Leathes - Friday, 6 April 2018, 5:16 PM
 

for non-question components you just need to call this.setCompletionStatus() from within your component once the user has done whatever it is they need to do in order to complete it. There's a good example in the Narrative component here.