Skip to content
Merged

master #3039

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,32 @@
"@jest/test-sequencer": "29.7.0",
"@types/d3-array": "3.0.3",
"@pie-lib/categorize": "2.0.2",
"@pie-lib/charting": "7.0.6",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/charting": "7.0.7",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/controller-utils": "2.0.2",
"@pie-lib/correct-answer-toggle": "4.0.3",
"@pie-lib/drag": "4.0.3",
"@pie-lib/editable-html": "13.0.3",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/correct-answer-toggle": "4.0.4",
"@pie-lib/drag": "4.0.4",
"@pie-lib/editable-html": "13.0.4",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"@pie-lib/feedback": "2.0.2",
"@pie-lib/graphing-solution-set": "4.0.6",
"@pie-lib/graphing-solution-set": "4.0.7",
"@pie-lib/graphing-utils": "3.0.2",
"@pie-lib/graphing": "4.0.7",
"@pie-lib/icons": "4.0.2",
"@pie-lib/mask-markup": "3.0.6",
"@pie-lib/graphing": "4.0.8",
"@pie-lib/icons": "4.0.3",
"@pie-lib/mask-markup": "3.0.7",
"@pie-lib/math-evaluator": "4.0.2",
"@pie-lib/math-input": "8.1.0",
"@pie-lib/math-input": "8.1.1",
"@pie-lib/math-rendering-accessible": "5.0.2",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/math-toolbar": "3.0.3",
"@pie-lib/plot": "4.0.6",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/rubric": "2.0.6",
"@pie-lib/scoring-config": "5.0.2",
"@pie-lib/math-toolbar": "3.0.4",
"@pie-lib/plot": "4.0.7",
"@pie-lib/render-ui": "6.1.2",
"@pie-lib/rubric": "2.0.7",
"@pie-lib/scoring-config": "5.0.3",
"@pie-lib/style-utils": "2.0.2",
"@pie-lib/test-utils": "2.0.2",
"@pie-lib/text-select": "3.0.3",
"@pie-lib/tools": "2.0.2",
"@pie-lib/text-select": "3.0.4",
"@pie-lib/tools": "2.0.3",
"@pie-lib/translator": "4.0.2",
"@pie-framework/mathquill": "1.2.1-beta.1",
"@tiptap/core": "3.20.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/boilerplate-item-type/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"@pie-lib/render-ui": "6.1.2",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
"prop-types": "^15.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/boilerplate-item-type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"prop-types": "^15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/calculator/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@mui/material": "^7.3.4",
"@pie-framework/material-ui-calculator": "4.0.0",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/config-ui": "13.0.7",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/categorize/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/categorize": "2.0.2",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/drag": "4.0.3",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/drag": "4.0.4",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"@pie-lib/translator": "4.0.2",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
Expand Down
28 changes: 20 additions & 8 deletions packages/categorize/controller/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

const { translator } = Translator;
import defaults from './defaults';
import { getCompleteResponseDetails, isAlternateDuplicated, isCorrectResponseDuplicated } from './utils';
import { getCompleteResponseDetails, isAlternateDuplicated, isCorrectResponseDuplicated, multiplePlacements } from './utils';

// eslint-disable-next-line no-console

Expand Down Expand Up @@ -154,6 +154,18 @@
choices = await getShuffledChoices(choices, session, updateSession, 'id');
}

choices = (choices || []).map((c) => {
let categoryCount;
if (normalizedQuestion.allowMultiplePlacementsEnabled === multiplePlacements.enabled) {
categoryCount = 0;
} else if (normalizedQuestion.allowMultiplePlacementsEnabled === multiplePlacements.disabled) {
categoryCount = 1;
} else {
categoryCount = c.categoryCount || 0;
}
return { ...c, categoryCount };
});

if (!note) {
note = translator.t('common:commonCorrectAnswerWithAlternates', { lng: language });
}
Expand Down Expand Up @@ -235,7 +247,7 @@
if (draggedChoices > 0) {
traceLog.push(`Student placed ${draggedChoices} choice(s) into categories.`);

(categories || []).forEach((category, categoryIndex) => {
(categories || []).forEach((category) => {
const categoryId = category.id;
const builtCategory = builtCategories.find(c => c.id === categoryId);
const studentChoices = builtCategory ? builtCategory.choices || [] : [];
Expand Down Expand Up @@ -264,15 +276,15 @@
}

if (hasAlternates) {
traceLog.push(`Alternate response combinations are accepted for this question.`);

Check warning on line 279 in packages/categorize/controller/src/index.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote

Check warning on line 279 in packages/categorize/controller/src/index.js

View workflow job for this annotation

GitHub Actions / build-next

Strings must use singlequote

Check warning on line 279 in packages/categorize/controller/src/index.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
}

if (hasAlternates) {
traceLog.push(`Score calculated using all-or-nothing scoring (alternate responses disable partial scoring).`);
traceLog.push(`Student must get all categories completely correct to receive full credit.`);
traceLog.push('Score calculated using all-or-nothing scoring (alternate responses disable partial scoring).');
traceLog.push('Student must get all categories completely correct to receive full credit.');
} else if (partialScoringEnabled) {
traceLog.push(`Score calculated using partial scoring.`);
traceLog.push(`Student receives credit for each correct placement, with deductions for incorrect placements beyond required amount.`);
traceLog.push('Score calculated using partial scoring.');
traceLog.push('Student receives credit for each correct placement, with deductions for incorrect placements beyond required amount.');

if (draggedChoices > 0) {
const totalCorrect = builtCategories.reduce((sum, cat) =>
Expand All @@ -289,8 +301,8 @@
}
}
} else {
traceLog.push(`Score calculated using all-or-nothing scoring.`);
traceLog.push(`Student must get all categories completely correct to receive full credit.`);
traceLog.push('Score calculated using all-or-nothing scoring.');
traceLog.push('Student must get all categories completely correct to receive full credit.');
}

const score = getTotalScore(model, session, env);
Expand Down
8 changes: 4 additions & 4 deletions packages/categorize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/categorize": "2.0.2",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/correct-answer-toggle": "4.0.3",
"@pie-lib/drag": "4.0.3",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/correct-answer-toggle": "4.0.4",
"@pie-lib/drag": "4.0.4",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"@pie-lib/translator": "4.0.2",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
Expand Down
8 changes: 4 additions & 4 deletions packages/charting/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/charting": "7.0.6",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/charting": "7.0.7",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"debug": "^4.1.1",
"prop-types": "^15.8.1",
"react": "18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/charting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/charting": "7.0.6",
"@pie-lib/correct-answer-toggle": "4.0.3",
"@pie-lib/charting": "7.0.7",
"@pie-lib/correct-answer-toggle": "4.0.4",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
"react": "18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/complex-rubric/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"@pie-element/multi-trait-rubric": "^8.1.0",
"@pie-element/rubric": "^8.1.0",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/rubric": "2.0.6",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/render-ui": "6.1.2",
"@pie-lib/rubric": "2.0.7",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
"prop-types": "^15.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/complex-rubric/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@pie-element/multi-trait-rubric": "^8.1.0",
"@pie-element/rubric": "^8.1.0",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/rubric": "2.0.6",
"@pie-lib/rubric": "2.0.7",
"classnames": "^2.2.6",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
Expand Down
6 changes: 3 additions & 3 deletions packages/drag-in-the-blank/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/drag": "4.0.3",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/drag": "4.0.4",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"@pie-lib/math-rendering": "5.0.2",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
Expand Down
8 changes: 4 additions & 4 deletions packages/drag-in-the-blank/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/correct-answer-toggle": "4.0.3",
"@pie-lib/drag": "4.0.3",
"@pie-lib/mask-markup": "3.0.6",
"@pie-lib/correct-answer-toggle": "4.0.4",
"@pie-lib/drag": "4.0.4",
"@pie-lib/mask-markup": "3.0.7",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"lodash-es": "^4.17.23",
"prop-types": "^15.8.1",
"react": "18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/drawing-response/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
"prop-types": "^15.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/drawing-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"@pie-lib/translator": "4.0.2",
"konva": "8.3.0",
"lodash-es": "^4.17.23",
Expand Down
2 changes: 1 addition & 1 deletion packages/ebsr/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@mui/material": "^7.3.4",
"@pie-element/multiple-choice": "^13.2.0",
"@pie-framework/pie-configure-events": "^1.2.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/config-ui": "13.0.7",
"lodash-es": "^4.17.23",
"prop-types": "^15.8.1",
"react": "18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/explicit-constructed-response/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"classnames": "^2.2.6",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
Expand Down
6 changes: 3 additions & 3 deletions packages/explicit-constructed-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/correct-answer-toggle": "4.0.3",
"@pie-lib/mask-markup": "3.0.6",
"@pie-lib/correct-answer-toggle": "4.0.4",
"@pie-lib/mask-markup": "3.0.7",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"@pie-lib/translator": "4.0.2",
"classnames": "^2.2.6",
"he": "^1.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/extended-text-entry/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"lodash-es": "^4.17.23",
"prop-types": "^15.8.1",
"react": "18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/extended-text-entry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"classnames": "^2.2.6",
"debug": "^4.1.1",
"lodash.throttle": "^4.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/fraction-model/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"debug": "^4.1.1",
"lodash-es": "^4.17.23",
"prop-types": "^15.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/fraction-model/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "lib/index.js",
"module": "src/index.js",
"dependencies": {
"@pie-lib/text-select": "3.0.3",
"@pie-lib/text-select": "3.0.4",
"debug": "^4.1.1",
"lodash-es": "^4.17.23"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/fraction-model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/correct-answer-toggle": "4.0.3",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/correct-answer-toggle": "4.0.4",
"@pie-lib/math-rendering": "5.0.2",
"@pie-lib/render-ui": "6.1.1",
"@pie-lib/render-ui": "6.1.2",
"@pie-lib/test-utils": "2.0.2",
"prop-types": "^15.8.1",
"react": "18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/graphing-solution-set/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"@mui/icons-material": "^7.3.4",
"@mui/material": "^7.3.4",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/config-ui": "13.0.6",
"@pie-lib/editable-html-tip-tap": "2.1.4",
"@pie-lib/graphing-solution-set": "4.0.6",
"@pie-lib/config-ui": "13.0.7",
"@pie-lib/editable-html-tip-tap": "2.1.5",
"@pie-lib/graphing-solution-set": "4.0.7",
"@pie-lib/math-rendering": "5.0.2",
"classnames": "^2.2.6",
"debug": "^4.1.1",
Expand Down
Loading
Loading