Picture of Matt Leathes
Re: Assessment with 3 attempts last should only fail
by Matt Leathes - Friday, 1 February 2019, 5:23 PM
 

actually it doesn't really involve the assessmentResult component at all. the assessment extension triggers an event when the assessment is completed, this triggers behaviour both in the results component and in the tracking code - so they act independently of each other.

In the v2 framework version of spoor, it listens out for the assessment completion event and, when it's received, does this.

If you know your course only has one assessment, it's relatively easy to add in a bit of code there to check that assessment to see if it has any attempts left - something like Adapt.assessment._assessments[0].get('_attemptsLeft'); would do the trick.

The problem that's more difficult to solve is that the assessment extension allows for there to be more than one assessment, so what do you do if that's the setup?

Hope this helps