Picture of Niall Deighan
Linked Confidence Slider problems
by Niall Deighan - Tuesday, 16 December 2014, 4:12 PM
 

Hi all,

I am having an issue with the Linked Confidence Slider where it will not display any feedback when the user submits a value on the scale, there is a js error when the user clicks the first submit button:

TypeError: i.mediator is undefined
 
...dbackMessage",this.getFeedbackString()),i.mediator.defaultCallback("questionView...

The submit button on the linked slider does not appear either.

I can comment out the 'showFeedback' function on the confidenceSlider.js and the error disappears, but the second submit button still does not render.

This linked confidence slider is a great component, it creates a certain level of user realization in the learning process, I'd hate to leave it out of our current project. Can anyone shed some light on this problem for me?

Picture of Matt Leathes
Re: Linked Confidence Slider problems
by Matt Leathes - Tuesday, 16 December 2014, 8:25 PM
 

The lines

Adapt.mediator.defaultCallback('questionView:feedback', function(feedback) { 
   Adapt.trigger('questionView:showFeedback', feedback);
});

Are the problem here.

Adapt.mediator was removed back in May - for v1.1.0 I think.

Looks like confidenceSlider didn't get updated though.

I can see that it was changed in this commit:

https://github.com/adaptlearning/adapt-contrib-confidenceSlider/commit/c2bd00412556dc6a4dbd3312efb15efc1923b138

But I'm not sure how much of that is dependent on the current 'develop' branch of the Adapt Framework

Let me see if anyone's available tomorrow to look at this and maybe do a hotfix for you.

Picture of Niall Deighan
Re: Linked Confidence Slider problems
by Niall Deighan - Wednesday, 17 December 2014, 11:31 AM
 

Hi Matt,

Thanks for your help. The changes is this adapt-contrib-confidenceSlider.js has removed the error and feedback now appears on screen as planned.

The submit on the linked slider is still an issue and on page load we now get this message:

Error: This component already exists in your project
 
 
...ction(e,t){if(n.componentStore[e])throw Error("This component already exists in ...

 

Picture of Tom Taylor
Re: Linked Confidence Slider problems
by Tom Taylor - Thursday, 18 December 2014, 10:57 AM
 

Morning Niall,

I've submitted two pull requests which should hopefully fix your problem (the second one fixes an issue whereby the submit button would stay hidden even after the first slider had been completed): 

If you could try pulling these fixes into your code, and let me know if this sorts your problem (leaving any relevant comments).

Picture of Niall Deighan
Re: Linked Confidence Slider problems
by Niall Deighan - Thursday, 18 December 2014, 12:35 PM
 

Hi Thomas,

Thank you all so much for your help.

I've integrated the code updates and it functions as expected now. There are no errors on load and both submit buttons trigger the feedback.

The feedback overlay seems to be doubled though. I need to click the close icon twice. On the first click the background opacity appears to half, on the second click the feedback finally disappears. Admittedly a minor issue compared to the amount of banging-my-head-of-the-table I was doing before.

Thanks!

Picture of Tom Taylor
Re: Linked Confidence Slider problems
by Tom Taylor - Thursday, 18 December 2014, 5:42 PM
 

That's no problem, glad to hear we're almost there with the solution :)

I'm not able to replicate the doubled popup issue you describe (although it's one I'm familiar with from the early days of Adapt). Are you using the latest from GitHub's master branch?

Picture of Niall Deighan
Re: Linked Confidence Slider problems
by Niall Deighan - Friday, 19 December 2014, 10:30 AM
 

When I integrated the two new js files into a standalone framework to test them I was getting the double pop-up, but when I copied the two components into our work-in-prorgess, that issue disappeared. 

We are using version 1.1.0 dated 30th of July, downloaded from the master branch on github. 

Picture of Matt Leathes
Re: Linked Confidence Slider problems
by Matt Leathes - Friday, 19 December 2014, 11:49 AM
 

Glad to hear it's all resolved now.

Thanks for alerting us to this issue, Tom's fix has now been pushed into the master branch of those two components.