Picture of Chris Gillison
dragndrop partly correct
by Chris Gillison - Friday, 2 September 2022, 12:37 PM

Has any clever person in Adapt land managed to get _partlyCorrect feedback to display using the adapt-dragndrop component? It doesn't work for me!

Framework: 5.22.3
Component version: 1.4.0

Picture of Ignacio Cinalli
Re: dragndrop partly correct
by Ignacio Cinalli - Friday, 2 September 2022, 9:16 PM

Hi Chris, I believe you could change the isCorrect function and add isPartlyCorrect in the dragndropView.js.
Hope this helps.

isCorrect:function() {
      const numberOfCorrectAnswers = this.model.get('_items').filter(({ _isCorrect }) =>_isCorrect).length;

      this.model.set('_isAtLeastOneCorrectSelection', numberOfCorrectAnswers >0);
      this.model.set('_numberOfCorrectAnswers', numberOfCorrectAnswers);

      return this.model.get('_items').length === numberOfCorrectAnswers;
    isPartlyCorrect:function() {
      return this.model.get('_isAtLeastOneCorrectSelection');

Picture of Chris Gillison
Re: dragndrop partly correct
by Chris Gillison - Saturday, 3 September 2022, 2:02 PM

Oh wow. Many thanks Ignacio. Works perfectly!