Picture of Ludovic Bas
assessment questions
by Ludovic Bas - Thursday, 13 July 2017, 6:41 PM
 

I have encountered 2 problems with the assessment extension and assessment result component.

I have 4 pages in my course. Each page has his own assessment.

  1. When I complete an assessment, I would like to be blocked if I did not passed it (I want to be forced to retry). But it seems Trickle relies on component completion and the button 'continue' appears even if I fail. How can I do to keep the Trickle button hidden  (by overriding assessment result component or Trickle, any clue?)?
  2. I want the course be passed (scorm variable) when the 4 assessments are passed. But it seems that the Adapt variable _isAssessmentPassed is set to true when the total score is passed. I just want to rely on assessment success and not total score. Is it possible?

Thanks in advance for your answer :)

Picture of Matt Leathes
Re: assessment questions
by Matt Leathes - Thursday, 13 July 2017, 7:46 PM
 

are you working in the framework or the authoring tool?

Picture of Ludovic Bas
Re: assessment questions
by Ludovic Bas - Thursday, 13 July 2017, 9:49 PM
 

I'm using directly the framework.

Picture of Matt Leathes
Re: assessment questions
by Matt Leathes - Friday, 14 July 2017, 9:23 AM
 

OK well you should able to amend the assessmentResults component so that it will only set itself as completed if the user passed the assessment, by changing this line to:

if(this.model.get('_state') && this.model.get('_state').isPass) {
    this.setCompletionStatus();
}

For the second issue you'll need to modify this function so that it checks each individual assessment to see if it is passed or not.

Picture of Ludovic Bas
Re: assessment questions
by Ludovic Bas - Tuesday, 25 July 2017, 9:55 PM
 

For the second issue, I've made :

adapt-contrib-assessment/js/assessment.js

var assessmentsComplete = 0;
var assessmentsPass = 0;

for (var id in states) {
 var state = states[id];
 if (!state.includeInTotalScore) continue;
 if (state.isComplete) assessmentsComplete++;
 totalAssessments++;
 maxScore += state.maxScore / state.assessmentWeight;
 score += state.score / state.assessmentWeight;
 isPass = isPass === false ? false : state.isPass;
 if (state.isPass) assessmentsPass++;
}

adapt-contrib-spoor/js/adapt-stateful-session.js

onAssessmentComplete: function(stateModel) {
 Adapt.course.set('_isAssessmentPassed', stateModel.assessmentsPass);

Thank you very much for your help!

Picture of Ludovic Bas
Re: assessment questions
by Ludovic Bas - Friday, 28 July 2017, 2:15 PM
 

Oops, it's more like that:

Adapt.course.set('_isAssessmentPassed', stateModel.assessmentsPass == stateModel.assessments);

 

and don't forget to add assessmentsPass in the return in assessments.js

 

return {
 isComplete: isComplete,
 isPercentageBased: assessmentsConfig._isPercentageBased,
 requireAssessmentPassed: assessmentsConfig._requireAssessmentPassed,
 isPass: isPass,
 scoreAsPercent: scoreAsPercent,
 maxScore: maxScore,
 score: score,
 assessmentsComplete: assessmentsComplete,
 assessmentsPass: assessmentsPass,
 assessments: totalAssessments
};