Skip to content

Commit

Permalink
fix: improve calculation of score
Browse files Browse the repository at this point in the history
  • Loading branch information
tikhanovichA committed Oct 29, 2024
1 parent 1ee1c95 commit 551e50d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/qtiItem/helper/maxScore.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ export default {
//try setting the computed normal maximum only if the processing type is known, i.e. 'templateDriven'
if (scoreOutcome && item.responseProcessing && item.responseProcessing.processingType === 'templateDriven') {
const interactions = item.getInteractions();
const isAllResponseProcessingRulesNone = !interactions.some(interaction => {
const responseDeclaration = interaction.getResponseDeclaration();
const template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);
return template !== 'NONE';
});
maxScore = _.reduce(
interactions,
function (acc, interaction) {
Expand Down Expand Up @@ -159,6 +154,12 @@ export default {
}
}

const isAllResponseProcessingRulesNone = !interactions.some(interaction => {
const responseDeclaration = interaction.getResponseDeclaration();
const template = responseHelper.getTemplateNameFromUri(responseDeclaration.template);
return template !== 'NONE';
});

const outcomesWithExternalScored = customOutcomes.filter(outcome => {
return externalScoredValues.includes(outcome.attr('externalScored'));
});
Expand Down

0 comments on commit 551e50d

Please sign in to comment.