@pie-element/categorize 13.1.1-next.54 → 13.1.1-next.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure/lib/defaults.js +0 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/design/index.js +17 -3
- package/configure/lib/design/index.js.map +1 -1
- package/configure/package.json +5 -5
- package/controller/lib/defaults.js +0 -2
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +17 -4
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/package.json +7 -7
|
@@ -4,12 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _utils = require("./utils");
|
|
8
7
|
var _default = exports.default = {
|
|
9
8
|
model: {
|
|
10
9
|
allowAlternateEnabled: true,
|
|
11
10
|
allowMaxChoicesPerCategory: false,
|
|
12
|
-
allowMultiplePlacementsEnabled: _utils.multiplePlacements.disabled,
|
|
13
11
|
alternates: [],
|
|
14
12
|
categories: [],
|
|
15
13
|
categoriesPerRow: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["
|
|
1
|
+
{"version":3,"file":"defaults.js","names":["model","allowAlternateEnabled","allowMaxChoicesPerCategory","alternates","categories","categoriesPerRow","choices","choicesLabel","choicesPosition","correctResponse","feedbackEnabled","lockChoiceOrder","maxAnswerChoices","maxChoicesPerCategory","partialScoring","promptEnabled","rationaleEnabled","rowLabels","studentInstructionsEnabled","teacherInstructionsEnabled","toolbarEditorPosition","minRowHeight","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","spellCheck","label","settings","enabled","feedback","allowMultiplePlacements","maxPlacements","allowAlternate","prompt","required","inputConfiguration","rationale","scoringType","settingsPanelDisabled","studentInstructions","teacherInstructions","headers","maxImageWidth","rowLabel","categoryLabel","maxImageHeight","withRubric","minCategoriesPerRow","allowMaxAnswerChoices","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n model: {\n allowAlternateEnabled: true,\n allowMaxChoicesPerCategory: false,\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n promptEnabled: true,\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true,\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n choicesPosition: {\n settings: true,\n label: 'Choices Position',\n },\n allowMultiplePlacements: {\n settings: true,\n label: 'Allow Multiple Placements',\n },\n maxPlacements: {\n settings: true,\n label: 'Max choices per category',\n },\n allowAlternate: {\n settings: true,\n label: 'Allow Alternate Correct Answers',\n },\n categoriesPerRow: {\n settings: true,\n label: 'Categories per row',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n settingsPanelDisabled: false,\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n headers: {\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: false },\n },\n },\n rowLabels: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 200,\n categoryLabel: 260,\n choices: 240,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 100,\n categoryLabel: 100,\n choices: 150,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n minCategoriesPerRow: 1,\n allowMaxAnswerChoices: {\n settings: true,\n label: 'Max answer choices',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"mappings":";;;;;;iCAAe;EACbA,KAAK,EAAE;IACLC,qBAAqB,EAAE,IAAI;IAC3BC,0BAA0B,EAAE,KAAK;IACjCC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,EAAE;IACdC,gBAAgB,EAAE,CAAC;IACnBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,OAAO;IACxBC,eAAe,EAAE,EAAE;IACnBC,eAAe,EAAE,KAAK;IACtBC,eAAe,EAAE,IAAI;IACrBC,gBAAgB,EAAE,CAAC;IACnBC,qBAAqB,EAAE,CAAC;IACxBC,cAAc,EAAE,IAAI;IACpBC,aAAa,EAAE,IAAI;IACnBC,gBAAgB,EAAE,IAAI;IACtBC,SAA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zBG,KAAK,EAAE;UAAEH,QAAQ,EAAE;QAAM;MAC3B;IACF,CAAC;IACDR,SAAS,EAAE;MACTyB,kBAAkB,EAAE;QAClBhB,KAAK,EAAE;UAAED,QAAQ,EAAE;QAAM,CAAC;QAC1BE,KAAK,EAAE;UAAEF,QAAQ,EAAE;QAAM,CAAC;QAC1BG,KAAK,EAAE;UAAEH,QAAQ,EAAE;QAAM;MAC3B;IACF,CAAC;IACDL,qBAAqB,EAAE;MACrBc,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE;IACT,CAAC;IACDgB,aAAa,EAAE;MACbF,mBAAmB,EAAE,GAAG;MACxBP,MAAM,EAAE,GAAG;MACXG,SAAS,EAAE,GAAG;MACdO,QAAQ,EAAE,GAAG;MACbC,aAAa,EAAE,GAAG;MAClB7C,OAAO,EAAE;IACX,CAAC;IACD8C,cAAc,EAAE;MACdL,mBAAmB,EAAE,GAAG;MACxBP,MAAM,EAAE,GAAG;MACXG,SAAS,EAAE,GAAG;MACdO,QAAQ,EAAE,GAAG;MACbC,aAAa,EAAE,GAAG;MAClB7C,OAAO,EAAE;IACX,CAAC;IACD+C,UAAU,EAAE;MACVnB,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE;IACT,CAAC;IACDqB,mBAAmB,EAAE,CAAC;IACtBC,qBAAqB,EAAE;MACrBrB,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAE;IACT,CAAC;IACDuB,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRzB,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE,kBAAkB;MACzBE,OAAO,EAAE;IACX,CAAC;IACDyB,eAAe,EAAE;MACf3B,KAAK,EAAE,kBAAkB;MACzB4B,OAAO,EAAE;IACX;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -520,10 +520,18 @@ class Design extends _react.default.Component {
|
|
|
520
520
|
};
|
|
521
521
|
const categories = (0, _builder.buildCategories)(model.categories || [], model.choices || [], model.correctResponse || []);
|
|
522
522
|
const alternateResponses = (0, _builder.buildAlternateResponses)(model.categories || [], model.choices || [], model.correctResponse || []);
|
|
523
|
+
const resolvedAllowMultiplePlacements = (() => {
|
|
524
|
+
if (model.allowMultiplePlacementsEnabled != null) {
|
|
525
|
+
return model.allowMultiplePlacementsEnabled;
|
|
526
|
+
}
|
|
527
|
+
const allChoiceIds = (model.correctResponse || []).flatMap(cr => cr.choices || []);
|
|
528
|
+
const isExclusive = allChoiceIds.length === new Set(allChoiceIds).size;
|
|
529
|
+
return isExclusive ? _utils2.multiplePlacements.disabled : _utils2.multiplePlacements.enabled;
|
|
530
|
+
})();
|
|
523
531
|
const choices = model.choices.map(c => {
|
|
524
532
|
c.correctResponseCount = this.countChoiceInCorrectResponse(c);
|
|
525
533
|
// ensure categoryCount is set even though updatedModel hasn't been called
|
|
526
|
-
c.categoryCount = this.checkAllowMultiplePlacements(
|
|
534
|
+
c.categoryCount = this.checkAllowMultiplePlacements(resolvedAllowMultiplePlacements, c);
|
|
527
535
|
return c;
|
|
528
536
|
});
|
|
529
537
|
const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
|
|
@@ -578,7 +586,10 @@ class Design extends _react.default.Component {
|
|
|
578
586
|
dimensions: contentDimensions,
|
|
579
587
|
hideSettings: settingsPanelDisabled,
|
|
580
588
|
settings: /*#__PURE__*/_react.default.createElement(Panel, {
|
|
581
|
-
model:
|
|
589
|
+
model: {
|
|
590
|
+
...model,
|
|
591
|
+
allowMultiplePlacementsEnabled: resolvedAllowMultiplePlacements
|
|
592
|
+
},
|
|
582
593
|
onChangeModel: this.updateModel,
|
|
583
594
|
configuration: configuration,
|
|
584
595
|
onChangeConfiguration: onConfigurationChanged,
|
|
@@ -650,7 +661,10 @@ class Design extends _react.default.Component {
|
|
|
650
661
|
imageSupport: imageSupport,
|
|
651
662
|
uploadSoundSupport: uploadSoundSupport,
|
|
652
663
|
choices: choices,
|
|
653
|
-
model:
|
|
664
|
+
model: {
|
|
665
|
+
...model,
|
|
666
|
+
allowMultiplePlacementsEnabled: resolvedAllowMultiplePlacements
|
|
667
|
+
},
|
|
654
668
|
onModelChanged: this.updateModel,
|
|
655
669
|
toolbarOpts: toolbarOpts,
|
|
656
670
|
spellCheck: spellCheckEnabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_utils","require","_react","_interopRequireDefault","_propTypes","_styles","_core","_configUi","_categorize","_editableHtmlTipTap","_drag","_mathRendering","_categories","_alternateResponses","_choices","_choice","_choicePreview","_builder","_header","_utils2","_translator","translator","Translator","dropdown","Panel","toggle","radio","numberField","settings","Provider","IdProvider","uid","DragPreviewWrapper","React","Component","constructor","args","_defineProperty2","default","createRef","componentDidMount","containerRef","current","setTimeout","renderMath","render","createElement","ref","props","children","StyledHeader","styled","Header","theme","marginBottom","spacing","StyledInputContainer","InputContainer","width","paddingTop","marginTop","ErrorText","fontSize","typography","color","palette","error","main","Design","model","onChange","updatedModel","choices","map","c","categoryCount","checkAllowMultiplePlacements","allowMultiplePlacementsEnabled","correctResponse","ensureNoExtraChoicesInAnswer","ensureNoExtraChoicesInAlternate","categories","id","label","h","content","maxChoicesPerCategory","allowMaxChoicesPerCategory","rationale","teacherInstructions","feedback","updateModel","cr","alternateResponses","prompt","index","filter","alt","altIndex","choice","countInAnswer","allowMultiplePlacements","multiplePlacements","enabled","disabled","maxChoices","getMaxCategoryChoices","event","active","draggedItem","data","setState","activeDragItem","over","scrollX","window","scrollY","requestAnimationFrame","scrollTo","allowAlternateEnabled","activeData","overData","choiceIndex","overType","type","isPreview","isNewChoice","choiceId","split","removeChoiceFromSource","moveChoice","categoryId","addChoiceToCategory","moveChoiceInAlternate","alternateResponseIndex","addChoiceToAlternateCategory","isAlternateSource","undefined","deleteChoiceFromCategory","category","find","deleteChoiceFromAlternateCategory","addedChoice","newCorrectResponse","moveChoiceToCategory","verifyAllowMultiplePlacements","maxCategoryChoices","removeChoiceFromCategory","from","to","forEach","a","push","reduce","acc","currentValue","foundIndex","findIndex","alternateIndex","moveChoiceToAlternate","removeChoiceFromAlternate","state","configuration","generateId","imageSupport","uploadSoundSupport","onConfigurationChanged","allowAlternate","baseInputConfiguration","categoriesPerRow","choicesPosition","contentDimensions","lockChoiceOrder","maxImageHeight","maxImageWidth","maxPlacements","minCategoriesPerRow","partialScoring","scoringType","settingsPanelDisabled","spellCheck","studentInstructions","withRubric","mathMlOptions","language","languageChoices","allowMaxAnswerChoices","errors","feedbackEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","extraCSSRules","promptError","rationaleError","teacherInstructionsError","toolbarOpts","position","config","columns","buildCategories","buildAlternateResponses","correctResponseCount","countChoiceInCorrectResponse","defaultImageMaxWidth","defaultImageMaxHeight","panelSettings","min","max","perChoice","maxAnswerChoices","length","options","panelProperties","studentInstructionsEnabled","rubricEnabled","isOpened","isAlertModalOpened","alertMaxChoicesMsg","t","lng","DragProvider","onDragStart","onDragEnd","value","layout","ConfigLayout","dimensions","hideSettings","onChangeModel","onChangeConfiguration","groups","Settings","Properties","modal","AlertDialog","title","text","open","onClose","onAlertModalCancel","markup","changeTeacherInstructions","nonEmpty","pluginProps","getPluginProps","inputConfiguration","languageCharactersProps","onPromptChanged","disableUnderline","onModelChanged","buttonLabel","onAdd","onAddAlternateResponse","categoriesList","Fragment","key","variant","onRemoveAlternateResponse","changeRationale","FeedbackConfig","changeFeedback","DragOverlay","renderDragOverlay","exports","PropTypes","object","className","string","func","isRequired","shape","add","delete","_default"],"sources":["../../src/design/index.jsx"],"sourcesContent":["import { getPluginProps } from './utils';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { DragOverlay } from '@dnd-kit/core';\nimport { FeedbackConfig, InputContainer, layout, settings } from '@pie-lib/config-ui';\nimport {\n countInAnswer,\n ensureNoExtraChoicesInAnswer,\n ensureNoExtraChoicesInAlternate,\n moveChoiceToCategory,\n moveChoiceToAlternate,\n removeChoiceFromCategory,\n removeChoiceFromAlternate,\n verifyAllowMultiplePlacements,\n} from '@pie-lib/categorize';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { DragProvider, uid } from '@pie-lib/drag';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nimport Categories from './categories';\nimport AlternateResponses from './categories/alternateResponses';\nimport Choices from './choices';\nimport Choice from './choices/choice';\nimport ChoicePreview from './categories/choice-preview';\nimport { buildAlternateResponses, buildCategories } from './builder';\nimport Header from './header';\nimport { getMaxCategoryChoices, multiplePlacements } from '../utils';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\nconst { dropdown, Panel, toggle, radio, numberField } = settings;\nconst { Provider: IdProvider } = uid;\n\n// Simple wrapper to render math in DragOverlay portal\nclass DragPreviewWrapper extends React.Component {\n containerRef = React.createRef();\n\n componentDidMount() {\n if (this.containerRef.current) {\n setTimeout(() => renderMath(this.containerRef.current), 0);\n }\n }\n\n render() {\n return <div ref={this.containerRef}>{this.props.children}</div>;\n }\n}\n\nconst StyledHeader = styled(Header)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst StyledInputContainer = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nexport class Design extends React.Component {\n static propTypes = {\n configuration: PropTypes.object,\n className: PropTypes.string,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n uid: PropTypes.string,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n constructor(props) {\n super(props);\n this.uid = props.uid || uid.generateId();\n this.state = {\n activeDragItem: null,\n };\n }\n\n updateModel = (props) => {\n const { model, onChange } = this.props;\n\n const updatedModel = {\n ...model,\n ...props,\n };\n\n updatedModel.choices = updatedModel.choices.map((c) => ({\n ...c,\n categoryCount: this.checkAllowMultiplePlacements(updatedModel.allowMultiplePlacementsEnabled, c),\n }));\n\n //Ensure that there are no extra choices in correctResponse, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAnswer(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //Ensure that there are no extra choices in alternate responses, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAlternate(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //clean categories\n updatedModel.categories = updatedModel.categories.map((c) => ({\n id: c.id,\n label: c.label,\n }));\n\n updatedModel.choices = updatedModel.choices.map((h) => ({\n id: h.id,\n content: h.content,\n categoryCount: h.categoryCount,\n }));\n\n // ensure that maxChoicesPerCategory is reset if author switch back the corresponding switch (allowMaxChoicesPerCategory)\n updatedModel.maxChoicesPerCategory = updatedModel.allowMaxChoicesPerCategory\n ? updatedModel.maxChoicesPerCategory\n : 0;\n\n onChange(updatedModel);\n };\n\n changeRationale = (rationale) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n rationale,\n });\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n teacherInstructions,\n });\n };\n\n changeFeedback = (feedback) => {\n this.updateModel({ feedback });\n };\n\n onAddAlternateResponse = () => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: [...(cr.alternateResponses || []), []],\n })),\n });\n };\n\n onPromptChanged = (prompt) => this.updateModel({ prompt });\n\n onRemoveAlternateResponse = (index) => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: (cr.alternateResponses || []).filter((alt, altIndex) => altIndex !== index),\n })),\n });\n };\n\n countChoiceInCorrectResponse = (choice) => {\n const { model } = this.props;\n\n return countInAnswer(choice.id, model.correctResponse);\n };\n\n checkAllowMultiplePlacements = (allowMultiplePlacements, c) => {\n if (allowMultiplePlacements === multiplePlacements.enabled) {\n return 0;\n }\n\n if (allowMultiplePlacements === multiplePlacements.disabled) {\n return 1;\n }\n\n return c.categoryCount || 0;\n };\n\n isAlertModalOpened = () => {\n const { model } = this.props;\n const { maxChoicesPerCategory = 0 } = model || {};\n const maxChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so modal should not be opened\n return maxChoicesPerCategory !== 0 ? maxChoices > maxChoicesPerCategory : false;\n };\n\n onAlertModalCancel = () => {\n const { model } = this.props;\n const maxChoices = getMaxCategoryChoices(model);\n this.updateModel({ maxChoicesPerCategory: maxChoices });\n };\n\n onDragStart = (event) => {\n const { active } = event;\n const draggedItem = active.data.current;\n\n this.setState({\n activeDragItem: draggedItem,\n });\n };\n\n onDragEnd = ({ active, over }) => {\n // scrolls back to the original draggable element (scrollIntoViewIfNeeded).\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n\n this.setState({ activeDragItem: null });\n if (!active) {\n return;\n }\n\n // Restore scroll position after dnd-kit's drop animation fires scrollIntoViewIfNeeded.\n // Two rAF frames are needed: dnd-kit uses one rAF internally for focus/scroll restoration.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n });\n });\n\n const { model } = this.props;\n const { allowAlternateEnabled, categories = [], choices = [] } = model;\n\n const activeData = active?.data?.current;\n const overData = over?.data?.current;\n\n if (!activeData) return;\n\n const choiceIndex = activeData.choiceIndex || 0;\n const overType = overData?.type;\n const isPreview = activeData.type === 'choice-preview';\n const isNewChoice = activeData.type === 'choice';\n\n const choiceId =\n activeData.choice?.id || (typeof activeData.id === 'string' ? activeData.id.split('-')[0] : activeData.id);\n\n if (isPreview && (!overData || overType === 'choice')) {\n this.removeChoiceFromSource(activeData, choiceIndex, { allowAlternateEnabled, categories, choices });\n return;\n }\n\n if (isPreview && overType === 'category') {\n return this.moveChoice(choiceId, activeData.categoryId, overData.id, choiceIndex);\n }\n\n if (isNewChoice && overType === 'category') {\n return this.addChoiceToCategory({ id: activeData.id }, overData.id);\n }\n\n if (isPreview && overType === 'category-alternate') {\n return this.moveChoiceInAlternate(\n choiceId,\n activeData.categoryId,\n overData.id,\n choiceIndex,\n overData.alternateResponseIndex,\n );\n }\n\n if (allowAlternateEnabled && isNewChoice && overType === 'category-alternate') {\n return this.addChoiceToAlternateCategory({ id: activeData.id }, overData.id, overData.alternateResponseIndex);\n }\n };\n\n removeChoiceFromSource = (activeData, choiceIndex, { allowAlternateEnabled, categories, choices }) => {\n const isAlternateSource = activeData.alternateResponseIndex !== undefined;\n\n if (!isAlternateSource) {\n this.deleteChoiceFromCategory(activeData.categoryId, activeData.choiceId, choiceIndex);\n return;\n }\n\n if (!allowAlternateEnabled) return;\n\n const category = categories?.find((c) => c.id === activeData.categoryId);\n const choice = choices?.find((c) => c.id === activeData.choiceId);\n\n if (category && choice) {\n this.deleteChoiceFromAlternateCategory(category, choice, choiceIndex, activeData.alternateResponseIndex);\n }\n };\n\n addChoiceToCategory = (addedChoice, categoryId) => {\n const { model } = this.props;\n let { choices = [], correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === addedChoice.id);\n\n let newCorrectResponse = moveChoiceToCategory(addedChoice.id, undefined, categoryId, 0, correctResponse);\n\n if (choice.categoryCount !== 0) {\n newCorrectResponse = verifyAllowMultiplePlacements(addedChoice, categoryId, newCorrectResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n\n this.updateModel({\n correctResponse: newCorrectResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromCategory = (categoryId, choiceId, choiceIndex) => {\n const { model } = this.props;\n const correctResponse = removeChoiceFromCategory(choiceId, categoryId, choiceIndex, model.correctResponse);\n\n this.updateModel({ correctResponse });\n };\n\n moveChoice = (choiceId, from, to, choiceIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n if (to === from || !choice) {\n return;\n }\n if (choice.categoryCount !== 0) {\n correctResponse = moveChoiceToCategory(choice.id, from, to, choiceIndex, correctResponse);\n correctResponse = verifyAllowMultiplePlacements(choice, to, correctResponse);\n } else if (choice.categoryCount === 0) {\n correctResponse = moveChoiceToCategory(choice.id, undefined, to, 0, correctResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n // methods for alternate responses\n addChoiceToAlternateCategory = (addedChoice, categoryId, altIndex) => {\n const { model } = this.props;\n const { correctResponse, choices, maxChoicesPerCategory = 0 } = model;\n\n const choice = choices.find((c) => c.id === addedChoice.id);\n\n correctResponse.forEach((a) => {\n if (a.category === categoryId) {\n a.alternateResponses = a.alternateResponses || [];\n\n if (a.alternateResponses[altIndex] === undefined) {\n a.alternateResponses[altIndex] = [];\n }\n\n a.alternateResponses[altIndex].push(addedChoice.id);\n if (choice.categoryCount && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].reduce((acc, currentValue) => {\n if (currentValue === choice.id) {\n const foundIndex = acc.findIndex((c) => c === choice.id);\n if (foundIndex === -1) {\n acc.push(currentValue);\n }\n } else {\n acc.push(currentValue);\n }\n\n return acc;\n }, []);\n }\n\n return a;\n } else {\n if (a.alternateResponses[altIndex] && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].filter((c) => c !== addedChoice.id);\n return a;\n }\n }\n\n return a;\n });\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n moveChoiceInAlternate = (choiceId, from, to, choiceIndex, alternateIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n correctResponse = moveChoiceToAlternate(\n choiceId,\n from,\n to,\n choiceIndex,\n correctResponse,\n alternateIndex,\n choice?.categoryCount,\n );\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromAlternateCategory = (category, choice, choiceIndex, altIndex) => {\n const { model } = this.props;\n\n const correctResponse = removeChoiceFromAlternate(\n choice.id,\n category.id,\n choiceIndex,\n altIndex,\n model.correctResponse,\n );\n\n this.updateModel({ correctResponse });\n };\n\n renderDragOverlay = () => {\n const { activeDragItem } = this.state;\n const { model, configuration } = this.props;\n\n if (!activeDragItem) return null;\n\n if (activeDragItem.type === 'choice') {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n\n return <Choice choice={choice} configuration={configuration} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex === undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex !== undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} alternateResponseIndex={activeDragItem.alternateResponseIndex} />;\n }\n\n return null;\n };\n\n render() {\n const { configuration, imageSupport, model, uploadSoundSupport, onConfigurationChanged } = this.props;\n const {\n allowAlternate = {},\n allowMultiplePlacements = {},\n baseInputConfiguration = {},\n categoriesPerRow = {},\n choicesPosition = {},\n contentDimensions = {},\n feedback = {},\n lockChoiceOrder = {},\n maxImageHeight = {},\n maxImageWidth = {},\n maxPlacements = {},\n minCategoriesPerRow = 1,\n partialScoring = {},\n prompt = {},\n rationale = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n allowMaxAnswerChoices = {},\n } = configuration || {};\n const {\n allowAlternateEnabled,\n allowMaxChoicesPerCategory,\n errors,\n feedbackEnabled,\n maxChoicesPerCategory,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n extraCSSRules,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const config = model.config || {};\n config.choices = config.choices || { label: '', columns: 2 };\n\n const categories = buildCategories(model.categories || [], model.choices || [], model.correctResponse || []);\n\n const alternateResponses = buildAlternateResponses(\n model.categories || [],\n model.choices || [],\n model.correctResponse || [],\n );\n\n const choices = model.choices.map((c) => {\n c.correctResponseCount = this.countChoiceInCorrectResponse(c);\n // ensure categoryCount is set even though updatedModel hasn't been called\n c.categoryCount = this.checkAllowMultiplePlacements(model.allowMultiplePlacementsEnabled, c);\n return c;\n });\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const panelSettings = {\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n categoriesPerRow:\n categoriesPerRow.settings &&\n numberField(categoriesPerRow.label, {\n label: categoriesPerRow.label,\n min: minCategoriesPerRow,\n max: 6,\n }),\n choicesPosition: choicesPosition.settings && radio(choicesPosition.label, ['below', 'above', 'left', 'right']),\n allowMultiplePlacementsEnabled:\n allowMultiplePlacements.settings &&\n dropdown(allowMultiplePlacements.label, [\n multiplePlacements.enabled,\n multiplePlacements.disabled,\n multiplePlacements.perChoice,\n ]),\n maxAnswerChoices:\n allowMaxAnswerChoices.settings &&\n numberField(allowMaxAnswerChoices.label, {\n label: '',\n min: choices?.length || 0,\n max: 30,\n }),\n allowMaxChoicesPerCategory: maxPlacements.settings && toggle(maxPlacements.label),\n maxChoicesPerCategory:\n allowMaxChoicesPerCategory === true &&\n numberField(maxPlacements.label, {\n label: '',\n min: 0,\n max: 30,\n }),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n allowAlternateEnabled: allowAlternate.settings && toggle(allowAlternate.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const isOpened = this.isAlertModalOpened();\n const alertMaxChoicesMsg = translator.t('translation:categorize:maxChoicesPerCategoryRestriction', {\n lng: model.language,\n maxChoicesPerCategory,\n });\n\n return (\n <DragProvider onDragStart={this.onDragStart} onDragEnd={this.onDragEnd}>\n <IdProvider value={this.uid}>\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={this.updateModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n modal={\n <AlertDialog\n title={'Warning'}\n text={alertMaxChoicesMsg}\n open={isOpened}\n onClose={this.onAlertModalCancel}\n />\n }\n />\n }\n >\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {promptEnabled && (\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n error={promptError}\n nonEmpty={false}\n disableUnderline\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.prompt}\n maxImageHeight={maxImageHeight && maxImageHeight.prompt}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <Categories\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n model={model}\n categories={categories || []}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n />\n\n <Choices\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n choices={choices}\n model={model}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n />\n\n {allowAlternateEnabled && (\n <StyledHeader\n label=\"Alternate Responses\"\n buttonLabel=\"ADD AN ALTERNATE RESPONSE\"\n onAdd={this.onAddAlternateResponse}\n />\n )}\n {allowAlternateEnabled &&\n alternateResponses.map((categoriesList, index) => {\n return (\n <React.Fragment key={index}>\n <StyledHeader\n variant={'subtitle1'}\n label=\"Alternate Response\"\n buttonLabel=\"REMOVE ALTERNATE RESPONSE\"\n onAdd={() => this.onRemoveAlternateResponse(index)}\n />\n <AlternateResponses\n altIndex={index}\n imageSupport={imageSupport}\n model={model}\n configuration={configuration}\n categories={categoriesList}\n onModelChanged={this.updateModel}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n </React.Fragment>\n );\n })}\n\n {rationaleEnabled && (\n <StyledInputContainer label={rationale.label}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={this.changeRationale}\n imageSupport={imageSupport}\n error={rationaleError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <ErrorText>{rationaleError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {feedbackEnabled && (\n <FeedbackConfig feedback={model.feedback} onChange={this.changeFeedback} toolbarOpts={toolbarOpts} />\n )}\n </layout.ConfigLayout>\n <DragOverlay>\n <DragPreviewWrapper>{this.renderDragOverlay()}</DragPreviewWrapper>\n </DragOverlay>\n </IdProvider>\n </DragProvider>\n );\n }\n}\n\nexport default Design;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAUA,IAAAQ,mBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AAEA,IAAAW,WAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,mBAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,QAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,OAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,cAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AACA,IAAAiB,OA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AACC,OAAA,CAAAtM,MAAA,GAAAA,MAAA;AAAA,IAAA/B,gBAAA,CAAAC,OAAA,EA3rBY8B,MAAM,eACE;EACjB8F,aAAa,EAAEyG,kBAAS,CAACC,MAAM;EAC/BC,SAAS,EAAEF,kBAAS,CAACG,MAAM;EAC3BxG,sBAAsB,EAAEqG,kBAAS,CAACI,IAAI;EACtC1M,KAAK,EAAEsM,kBAAS,CAACC,MAAM,CAACI,UAAU;EAClC1M,QAAQ,EAAEqM,kBAAS,CAACI,IAAI,CAACC,UAAU;EACnCjP,GAAG,EAAE4O,kBAAS,CAACG,MAAM;EACrB1G,YAAY,EAAEuG,kBAAS,CAACM,KAAK,CAAC;IAC5BC,GAAG,EAAEP,kBAAS,CAACI,IAAI,CAACC,UAAU;IAC9BG,MAAM,EAAER,kBAAS,CAACI,IAAI,CAACC;EACzB,CAAC,CAAC;EACF3G,kBAAkB,EAAEsG,kBAAS,CAACM,KAAK,CAAC;IAClCC,GAAG,EAAEP,kBAAS,CAACI,IAAI,CAACC,UAAU;IAC9BG,MAAM,EAAER,kBAAS,CAACI,IAAI,CAACC;EACzB,CAAC;AACH,CAAC;AAAA,IAAAI,QAAA,GAAAV,OAAA,CAAApO,OAAA,GA6qBY8B,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_utils","require","_react","_interopRequireDefault","_propTypes","_styles","_core","_configUi","_categorize","_editableHtmlTipTap","_drag","_mathRendering","_categories","_alternateResponses","_choices","_choice","_choicePreview","_builder","_header","_utils2","_translator","translator","Translator","dropdown","Panel","toggle","radio","numberField","settings","Provider","IdProvider","uid","DragPreviewWrapper","React","Component","constructor","args","_defineProperty2","default","createRef","componentDidMount","containerRef","current","setTimeout","renderMath","render","createElement","ref","props","children","StyledHeader","styled","Header","theme","marginBottom","spacing","StyledInputContainer","InputContainer","width","paddingTop","marginTop","ErrorText","fontSize","typography","color","palette","error","main","Design","model","onChange","updatedModel","choices","map","c","categoryCount","checkAllowMultiplePlacements","allowMultiplePlacementsEnabled","correctResponse","ensureNoExtraChoicesInAnswer","ensureNoExtraChoicesInAlternate","categories","id","label","h","content","maxChoicesPerCategory","allowMaxChoicesPerCategory","rationale","teacherInstructions","feedback","updateModel","cr","alternateResponses","prompt","index","filter","alt","altIndex","choice","countInAnswer","allowMultiplePlacements","multiplePlacements","enabled","disabled","maxChoices","getMaxCategoryChoices","event","active","draggedItem","data","setState","activeDragItem","over","scrollX","window","scrollY","requestAnimationFrame","scrollTo","allowAlternateEnabled","activeData","overData","choiceIndex","overType","type","isPreview","isNewChoice","choiceId","split","removeChoiceFromSource","moveChoice","categoryId","addChoiceToCategory","moveChoiceInAlternate","alternateResponseIndex","addChoiceToAlternateCategory","isAlternateSource","undefined","deleteChoiceFromCategory","category","find","deleteChoiceFromAlternateCategory","addedChoice","newCorrectResponse","moveChoiceToCategory","verifyAllowMultiplePlacements","maxCategoryChoices","removeChoiceFromCategory","from","to","forEach","a","push","reduce","acc","currentValue","foundIndex","findIndex","alternateIndex","moveChoiceToAlternate","removeChoiceFromAlternate","state","configuration","generateId","imageSupport","uploadSoundSupport","onConfigurationChanged","allowAlternate","baseInputConfiguration","categoriesPerRow","choicesPosition","contentDimensions","lockChoiceOrder","maxImageHeight","maxImageWidth","maxPlacements","minCategoriesPerRow","partialScoring","scoringType","settingsPanelDisabled","spellCheck","studentInstructions","withRubric","mathMlOptions","language","languageChoices","allowMaxAnswerChoices","errors","feedbackEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","extraCSSRules","promptError","rationaleError","teacherInstructionsError","toolbarOpts","position","config","columns","buildCategories","buildAlternateResponses","resolvedAllowMultiplePlacements","allChoiceIds","flatMap","isExclusive","length","Set","size","correctResponseCount","countChoiceInCorrectResponse","defaultImageMaxWidth","defaultImageMaxHeight","panelSettings","min","max","perChoice","maxAnswerChoices","options","panelProperties","studentInstructionsEnabled","rubricEnabled","isOpened","isAlertModalOpened","alertMaxChoicesMsg","t","lng","DragProvider","onDragStart","onDragEnd","value","layout","ConfigLayout","dimensions","hideSettings","onChangeModel","onChangeConfiguration","groups","Settings","Properties","modal","AlertDialog","title","text","open","onClose","onAlertModalCancel","markup","changeTeacherInstructions","nonEmpty","pluginProps","getPluginProps","inputConfiguration","languageCharactersProps","onPromptChanged","disableUnderline","onModelChanged","buttonLabel","onAdd","onAddAlternateResponse","categoriesList","Fragment","key","variant","onRemoveAlternateResponse","changeRationale","FeedbackConfig","changeFeedback","DragOverlay","renderDragOverlay","exports","PropTypes","object","className","string","func","isRequired","shape","add","delete","_default"],"sources":["../../src/design/index.jsx"],"sourcesContent":["import { getPluginProps } from './utils';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { DragOverlay } from '@dnd-kit/core';\nimport { FeedbackConfig, InputContainer, layout, settings } from '@pie-lib/config-ui';\nimport {\n countInAnswer,\n ensureNoExtraChoicesInAnswer,\n ensureNoExtraChoicesInAlternate,\n moveChoiceToCategory,\n moveChoiceToAlternate,\n removeChoiceFromCategory,\n removeChoiceFromAlternate,\n verifyAllowMultiplePlacements,\n} from '@pie-lib/categorize';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { DragProvider, uid } from '@pie-lib/drag';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nimport Categories from './categories';\nimport AlternateResponses from './categories/alternateResponses';\nimport Choices from './choices';\nimport Choice from './choices/choice';\nimport ChoicePreview from './categories/choice-preview';\nimport { buildAlternateResponses, buildCategories } from './builder';\nimport Header from './header';\nimport { getMaxCategoryChoices, multiplePlacements } from '../utils';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\nconst { dropdown, Panel, toggle, radio, numberField } = settings;\nconst { Provider: IdProvider } = uid;\n\n// Simple wrapper to render math in DragOverlay portal\nclass DragPreviewWrapper extends React.Component {\n containerRef = React.createRef();\n\n componentDidMount() {\n if (this.containerRef.current) {\n setTimeout(() => renderMath(this.containerRef.current), 0);\n }\n }\n\n render() {\n return <div ref={this.containerRef}>{this.props.children}</div>;\n }\n}\n\nconst StyledHeader = styled(Header)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst StyledInputContainer = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nexport class Design extends React.Component {\n static propTypes = {\n configuration: PropTypes.object,\n className: PropTypes.string,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n uid: PropTypes.string,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n constructor(props) {\n super(props);\n this.uid = props.uid || uid.generateId();\n this.state = {\n activeDragItem: null,\n };\n }\n\n updateModel = (props) => {\n const { model, onChange } = this.props;\n\n const updatedModel = {\n ...model,\n ...props,\n };\n\n updatedModel.choices = updatedModel.choices.map((c) => ({\n ...c,\n categoryCount: this.checkAllowMultiplePlacements(updatedModel.allowMultiplePlacementsEnabled, c),\n }));\n\n //Ensure that there are no extra choices in correctResponse, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAnswer(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //Ensure that there are no extra choices in alternate responses, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAlternate(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //clean categories\n updatedModel.categories = updatedModel.categories.map((c) => ({\n id: c.id,\n label: c.label,\n }));\n\n updatedModel.choices = updatedModel.choices.map((h) => ({\n id: h.id,\n content: h.content,\n categoryCount: h.categoryCount,\n }));\n\n // ensure that maxChoicesPerCategory is reset if author switch back the corresponding switch (allowMaxChoicesPerCategory)\n updatedModel.maxChoicesPerCategory = updatedModel.allowMaxChoicesPerCategory\n ? updatedModel.maxChoicesPerCategory\n : 0;\n\n onChange(updatedModel);\n };\n\n changeRationale = (rationale) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n rationale,\n });\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n teacherInstructions,\n });\n };\n\n changeFeedback = (feedback) => {\n this.updateModel({ feedback });\n };\n\n onAddAlternateResponse = () => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: [...(cr.alternateResponses || []), []],\n })),\n });\n };\n\n onPromptChanged = (prompt) => this.updateModel({ prompt });\n\n onRemoveAlternateResponse = (index) => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: (cr.alternateResponses || []).filter((alt, altIndex) => altIndex !== index),\n })),\n });\n };\n\n countChoiceInCorrectResponse = (choice) => {\n const { model } = this.props;\n\n return countInAnswer(choice.id, model.correctResponse);\n };\n\n checkAllowMultiplePlacements = (allowMultiplePlacements, c) => {\n if (allowMultiplePlacements === multiplePlacements.enabled) {\n return 0;\n }\n\n if (allowMultiplePlacements === multiplePlacements.disabled) {\n return 1;\n }\n\n return c.categoryCount || 0;\n };\n\n isAlertModalOpened = () => {\n const { model } = this.props;\n const { maxChoicesPerCategory = 0 } = model || {};\n const maxChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so modal should not be opened\n return maxChoicesPerCategory !== 0 ? maxChoices > maxChoicesPerCategory : false;\n };\n\n onAlertModalCancel = () => {\n const { model } = this.props;\n const maxChoices = getMaxCategoryChoices(model);\n this.updateModel({ maxChoicesPerCategory: maxChoices });\n };\n\n onDragStart = (event) => {\n const { active } = event;\n const draggedItem = active.data.current;\n\n this.setState({\n activeDragItem: draggedItem,\n });\n };\n\n onDragEnd = ({ active, over }) => {\n // scrolls back to the original draggable element (scrollIntoViewIfNeeded).\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n\n this.setState({ activeDragItem: null });\n if (!active) {\n return;\n }\n\n // Restore scroll position after dnd-kit's drop animation fires scrollIntoViewIfNeeded.\n // Two rAF frames are needed: dnd-kit uses one rAF internally for focus/scroll restoration.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n });\n });\n\n const { model } = this.props;\n const { allowAlternateEnabled, categories = [], choices = [] } = model;\n\n const activeData = active?.data?.current;\n const overData = over?.data?.current;\n\n if (!activeData) return;\n\n const choiceIndex = activeData.choiceIndex || 0;\n const overType = overData?.type;\n const isPreview = activeData.type === 'choice-preview';\n const isNewChoice = activeData.type === 'choice';\n\n const choiceId =\n activeData.choice?.id || (typeof activeData.id === 'string' ? activeData.id.split('-')[0] : activeData.id);\n\n if (isPreview && (!overData || overType === 'choice')) {\n this.removeChoiceFromSource(activeData, choiceIndex, { allowAlternateEnabled, categories, choices });\n return;\n }\n\n if (isPreview && overType === 'category') {\n return this.moveChoice(choiceId, activeData.categoryId, overData.id, choiceIndex);\n }\n\n if (isNewChoice && overType === 'category') {\n return this.addChoiceToCategory({ id: activeData.id }, overData.id);\n }\n\n if (isPreview && overType === 'category-alternate') {\n return this.moveChoiceInAlternate(\n choiceId,\n activeData.categoryId,\n overData.id,\n choiceIndex,\n overData.alternateResponseIndex,\n );\n }\n\n if (allowAlternateEnabled && isNewChoice && overType === 'category-alternate') {\n return this.addChoiceToAlternateCategory({ id: activeData.id }, overData.id, overData.alternateResponseIndex);\n }\n };\n\n removeChoiceFromSource = (activeData, choiceIndex, { allowAlternateEnabled, categories, choices }) => {\n const isAlternateSource = activeData.alternateResponseIndex !== undefined;\n\n if (!isAlternateSource) {\n this.deleteChoiceFromCategory(activeData.categoryId, activeData.choiceId, choiceIndex);\n return;\n }\n\n if (!allowAlternateEnabled) return;\n\n const category = categories?.find((c) => c.id === activeData.categoryId);\n const choice = choices?.find((c) => c.id === activeData.choiceId);\n\n if (category && choice) {\n this.deleteChoiceFromAlternateCategory(category, choice, choiceIndex, activeData.alternateResponseIndex);\n }\n };\n\n addChoiceToCategory = (addedChoice, categoryId) => {\n const { model } = this.props;\n let { choices = [], correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === addedChoice.id);\n\n let newCorrectResponse = moveChoiceToCategory(addedChoice.id, undefined, categoryId, 0, correctResponse);\n\n if (choice.categoryCount !== 0) {\n newCorrectResponse = verifyAllowMultiplePlacements(addedChoice, categoryId, newCorrectResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n\n this.updateModel({\n correctResponse: newCorrectResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromCategory = (categoryId, choiceId, choiceIndex) => {\n const { model } = this.props;\n const correctResponse = removeChoiceFromCategory(choiceId, categoryId, choiceIndex, model.correctResponse);\n\n this.updateModel({ correctResponse });\n };\n\n moveChoice = (choiceId, from, to, choiceIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n if (to === from || !choice) {\n return;\n }\n if (choice.categoryCount !== 0) {\n correctResponse = moveChoiceToCategory(choice.id, from, to, choiceIndex, correctResponse);\n correctResponse = verifyAllowMultiplePlacements(choice, to, correctResponse);\n } else if (choice.categoryCount === 0) {\n correctResponse = moveChoiceToCategory(choice.id, undefined, to, 0, correctResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n // methods for alternate responses\n addChoiceToAlternateCategory = (addedChoice, categoryId, altIndex) => {\n const { model } = this.props;\n const { correctResponse, choices, maxChoicesPerCategory = 0 } = model;\n\n const choice = choices.find((c) => c.id === addedChoice.id);\n\n correctResponse.forEach((a) => {\n if (a.category === categoryId) {\n a.alternateResponses = a.alternateResponses || [];\n\n if (a.alternateResponses[altIndex] === undefined) {\n a.alternateResponses[altIndex] = [];\n }\n\n a.alternateResponses[altIndex].push(addedChoice.id);\n if (choice.categoryCount && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].reduce((acc, currentValue) => {\n if (currentValue === choice.id) {\n const foundIndex = acc.findIndex((c) => c === choice.id);\n if (foundIndex === -1) {\n acc.push(currentValue);\n }\n } else {\n acc.push(currentValue);\n }\n\n return acc;\n }, []);\n }\n\n return a;\n } else {\n if (a.alternateResponses[altIndex] && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].filter((c) => c !== addedChoice.id);\n return a;\n }\n }\n\n return a;\n });\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n moveChoiceInAlternate = (choiceId, from, to, choiceIndex, alternateIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n correctResponse = moveChoiceToAlternate(\n choiceId,\n from,\n to,\n choiceIndex,\n correctResponse,\n alternateIndex,\n choice?.categoryCount,\n );\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromAlternateCategory = (category, choice, choiceIndex, altIndex) => {\n const { model } = this.props;\n\n const correctResponse = removeChoiceFromAlternate(\n choice.id,\n category.id,\n choiceIndex,\n altIndex,\n model.correctResponse,\n );\n\n this.updateModel({ correctResponse });\n };\n\n renderDragOverlay = () => {\n const { activeDragItem } = this.state;\n const { model, configuration } = this.props;\n\n if (!activeDragItem) return null;\n\n if (activeDragItem.type === 'choice') {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n\n return <Choice choice={choice} configuration={configuration} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex === undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex !== undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} alternateResponseIndex={activeDragItem.alternateResponseIndex} />;\n }\n\n return null;\n };\n\n render() {\n const { configuration, imageSupport, model, uploadSoundSupport, onConfigurationChanged } = this.props;\n const {\n allowAlternate = {},\n allowMultiplePlacements = {},\n baseInputConfiguration = {},\n categoriesPerRow = {},\n choicesPosition = {},\n contentDimensions = {},\n feedback = {},\n lockChoiceOrder = {},\n maxImageHeight = {},\n maxImageWidth = {},\n maxPlacements = {},\n minCategoriesPerRow = 1,\n partialScoring = {},\n prompt = {},\n rationale = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n allowMaxAnswerChoices = {},\n } = configuration || {};\n const {\n allowAlternateEnabled,\n allowMaxChoicesPerCategory,\n errors,\n feedbackEnabled,\n maxChoicesPerCategory,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n extraCSSRules,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const config = model.config || {};\n config.choices = config.choices || { label: '', columns: 2 };\n\n const categories = buildCategories(model.categories || [], model.choices || [], model.correctResponse || []);\n\n const alternateResponses = buildAlternateResponses(\n model.categories || [],\n model.choices || [],\n model.correctResponse || [],\n );\n\n const resolvedAllowMultiplePlacements = (() => {\n if (model.allowMultiplePlacementsEnabled != null) {\n return model.allowMultiplePlacementsEnabled;\n }\n const allChoiceIds = (model.correctResponse || []).flatMap((cr) => cr.choices || []);\n const isExclusive = allChoiceIds.length === new Set(allChoiceIds).size;\n return isExclusive ? multiplePlacements.disabled : multiplePlacements.enabled;\n })();\n\n const choices = model.choices.map((c) => {\n c.correctResponseCount = this.countChoiceInCorrectResponse(c);\n // ensure categoryCount is set even though updatedModel hasn't been called\n c.categoryCount = this.checkAllowMultiplePlacements(resolvedAllowMultiplePlacements, c);\n return c;\n });\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const panelSettings = {\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n categoriesPerRow:\n categoriesPerRow.settings &&\n numberField(categoriesPerRow.label, {\n label: categoriesPerRow.label,\n min: minCategoriesPerRow,\n max: 6,\n }),\n choicesPosition: choicesPosition.settings && radio(choicesPosition.label, ['below', 'above', 'left', 'right']),\n allowMultiplePlacementsEnabled:\n allowMultiplePlacements.settings &&\n dropdown(allowMultiplePlacements.label, [\n multiplePlacements.enabled,\n multiplePlacements.disabled,\n multiplePlacements.perChoice,\n ]),\n maxAnswerChoices:\n allowMaxAnswerChoices.settings &&\n numberField(allowMaxAnswerChoices.label, {\n label: '',\n min: choices?.length || 0,\n max: 30,\n }),\n allowMaxChoicesPerCategory: maxPlacements.settings && toggle(maxPlacements.label),\n maxChoicesPerCategory:\n allowMaxChoicesPerCategory === true &&\n numberField(maxPlacements.label, {\n label: '',\n min: 0,\n max: 30,\n }),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n allowAlternateEnabled: allowAlternate.settings && toggle(allowAlternate.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const isOpened = this.isAlertModalOpened();\n const alertMaxChoicesMsg = translator.t('translation:categorize:maxChoicesPerCategoryRestriction', {\n lng: model.language,\n maxChoicesPerCategory,\n });\n\n return (\n <DragProvider onDragStart={this.onDragStart} onDragEnd={this.onDragEnd}>\n <IdProvider value={this.uid}>\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={{ ...model, allowMultiplePlacementsEnabled: resolvedAllowMultiplePlacements }}\n onChangeModel={this.updateModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n modal={\n <AlertDialog\n title={'Warning'}\n text={alertMaxChoicesMsg}\n open={isOpened}\n onClose={this.onAlertModalCancel}\n />\n }\n />\n }\n >\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {promptEnabled && (\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n error={promptError}\n nonEmpty={false}\n disableUnderline\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.prompt}\n maxImageHeight={maxImageHeight && maxImageHeight.prompt}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <Categories\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n model={model}\n categories={categories || []}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n />\n\n <Choices\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n choices={choices}\n model={{ ...model, allowMultiplePlacementsEnabled: resolvedAllowMultiplePlacements }}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n />\n\n {allowAlternateEnabled && (\n <StyledHeader\n label=\"Alternate Responses\"\n buttonLabel=\"ADD AN ALTERNATE RESPONSE\"\n onAdd={this.onAddAlternateResponse}\n />\n )}\n {allowAlternateEnabled &&\n alternateResponses.map((categoriesList, index) => {\n return (\n <React.Fragment key={index}>\n <StyledHeader\n variant={'subtitle1'}\n label=\"Alternate Response\"\n buttonLabel=\"REMOVE ALTERNATE RESPONSE\"\n onAdd={() => this.onRemoveAlternateResponse(index)}\n />\n <AlternateResponses\n altIndex={index}\n imageSupport={imageSupport}\n model={model}\n configuration={configuration}\n categories={categoriesList}\n onModelChanged={this.updateModel}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n </React.Fragment>\n );\n })}\n\n {rationaleEnabled && (\n <StyledInputContainer label={rationale.label}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={this.changeRationale}\n imageSupport={imageSupport}\n error={rationaleError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <ErrorText>{rationaleError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {feedbackEnabled && (\n <FeedbackConfig feedback={model.feedback} onChange={this.changeFeedback} toolbarOpts={toolbarOpts} />\n )}\n </layout.ConfigLayout>\n <DragOverlay>\n <DragPreviewWrapper>{this.renderDragOverlay()}</DragPreviewWrapper>\n </DragOverlay>\n </IdProvider>\n </DragProvider>\n );\n }\n}\n\nexport default Design;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAUA,IAAAQ,mBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AAEA,IAAAW,WAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,mBAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,QAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,OAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,cAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AACA,IAAAiB,OAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,OAAA,GAAAlB,OAAA;AAEA,IAAAmB,WAAA,GAAAjB,sBAAA,CAAAF,OAAA;AAEA,MAAM;EAAEoB;AAAW,CAAC,GAAGC,mBAAU;AACjC,MAAM;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,MAAM;EAAEC,KAAK;EAAEC;AAAY,CAAC,GAAGC,kBAAQ;AAChE,MAAM;EAAEC,QAAQ,EAAEC;AAAW,CAAC,GAAGC,S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WAAW,EAAEA;IAAY,CAAE,CAEnF,CAAC,eACtBpM,MAAA,CAAAoC,OAAA,CAAAQ,aAAA,CAACxC,KAAA,CAAAwQ,WAAW,qBACV5Q,MAAA,CAAAoC,OAAA,CAAAQ,aAAA,CAACd,kBAAkB,QAAE,IAAI,CAAC+O,iBAAiB,CAAC,CAAsB,CACvD,CACH,CACA,CAAC;EAEnB;AACF;AAACC,OAAA,CAAA5M,MAAA,GAAAA,MAAA;AAAA,IAAA/B,gBAAA,CAAAC,OAAA,EApsBY8B,MAAM,eACE;EACjB8F,aAAa,EAAE+G,kBAAS,CAACC,MAAM;EAC/BC,SAAS,EAAEF,kBAAS,CAACG,MAAM;EAC3B9G,sBAAsB,EAAE2G,kBAAS,CAACI,IAAI;EACtChN,KAAK,EAAE4M,kBAAS,CAACC,MAAM,CAACI,UAAU;EAClChN,QAAQ,EAAE2M,kBAAS,CAACI,IAAI,CAACC,UAAU;EACnCvP,GAAG,EAAEkP,kBAAS,CAACG,MAAM;EACrBhH,YAAY,EAAE6G,kBAAS,CAACM,KAAK,CAAC;IAC5BC,GAAG,EAAEP,kBAAS,CAACI,IAAI,CAACC,UAAU;IAC9BG,MAAM,EAAER,kBAAS,CAACI,IAAI,CAACC;EACzB,CAAC,CAAC;EACFjH,kBAAkB,EAAE4G,kBAAS,CAACM,KAAK,CAAC;IAClCC,GAAG,EAAEP,kBAAS,CAACI,IAAI,CAACC,UAAU;IAC9BG,MAAM,EAAER,kBAAS,CAACI,IAAI,CAACC;EACzB,CAAC;AACH,CAAC;AAAA,IAAAI,QAAA,GAAAV,OAAA,CAAA1O,OAAA,GAsrBY8B,MAAM","ignoreList":[]}
|
package/configure/package.json
CHANGED
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"@mui/material": "^7.3.4",
|
|
17
17
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
18
18
|
"@pie-lib/categorize": "2.0.2",
|
|
19
|
-
"@pie-lib/config-ui": "13.0.
|
|
20
|
-
"@pie-lib/drag": "4.0.
|
|
21
|
-
"@pie-lib/editable-html-tip-tap": "2.1.
|
|
22
|
-
"@pie-lib/math-rendering": "5.0
|
|
23
|
-
"@pie-lib/render-ui": "6.1.
|
|
19
|
+
"@pie-lib/config-ui": "13.0.11",
|
|
20
|
+
"@pie-lib/drag": "4.0.6",
|
|
21
|
+
"@pie-lib/editable-html-tip-tap": "2.1.9",
|
|
22
|
+
"@pie-lib/math-rendering": "5.1.0",
|
|
23
|
+
"@pie-lib/render-ui": "6.1.3",
|
|
24
24
|
"@pie-lib/translator": "4.0.2",
|
|
25
25
|
"debug": "^4.1.1",
|
|
26
26
|
"lodash-es": "^4.17.23",
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _utils = require("./utils");
|
|
8
7
|
var _default = exports.default = {
|
|
9
|
-
allowMultiplePlacementsEnabled: _utils.multiplePlacements.disabled,
|
|
10
8
|
alternates: [],
|
|
11
9
|
categories: [],
|
|
12
10
|
categoriesPerRow: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["
|
|
1
|
+
{"version":3,"file":"defaults.js","names":["alternates","categories","categoriesPerRow","choices","choicesLabel","choicesPosition","correctResponse","feedbackEnabled","lockChoiceOrder","maxAnswerChoices","maxChoicesPerCategory","partialScoring","prompt","promptEnabled","rationale","rationaleEnabled","rowLabels","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition","minRowHeight"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n};\n"],"mappings":";;;;;;iCAAe;EACbA,UAAU,EAAE,EAAE;EACdC,UAAU,EAAE,EAAE;EACdC,gBAAgB,EAAE,CAAC;EACnBC,OAAO,EAAE,EAAE;EACXC,YAAY,EAAE,EAAE;EAChBC,eAAe,EAAE,OAAO;EACxBC,eAAe,EAAE,EAAE;EACnBC,eAAe,EAAE,KAAK;EACtBC,eAAe,EAAE,IAAI;EACrBC,gBAAgB,EAAE,CAAC;EACnBC,qBAAqB,EAAE,CAAC;EACxBC,cAAc,EAAE,IAAI;EACpBC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,IAAI;EACtBC,SAAS,EAAE,CAAC,EAAE,CAAC;EACfC,0BAA0B,EAAE,IAAI;EAChCC,mBAAmB,EAAE,EAAE;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,qBAAqB,EAAE,QAAQ;EAC/BC,YAAY,EAAE;AAChB,CAAC","ignoreList":[]}
|
package/controller/lib/index.js
CHANGED
|
@@ -185,13 +185,23 @@ const model = async (question, session, env, updateSession) => {
|
|
|
185
185
|
if (!lockChoiceOrder) {
|
|
186
186
|
choices = await (0, _controllerUtils.getShuffledChoices)(choices, session, updateSession, 'id');
|
|
187
187
|
}
|
|
188
|
+
const resolvedAllowMultiple = (() => {
|
|
189
|
+
if (question.allowMultiplePlacementsEnabled != null) {
|
|
190
|
+
return question.allowMultiplePlacementsEnabled;
|
|
191
|
+
}
|
|
192
|
+
// Derive from correct response: if any choice id appears in more than one category, reuse is required
|
|
193
|
+
const allChoiceIds = (correctResponse || []).flatMap(cr => cr.choices || []);
|
|
194
|
+
const isExclusive = allChoiceIds.length === new Set(allChoiceIds).size;
|
|
195
|
+
return isExclusive ? _utils.multiplePlacements.disabled : _utils.multiplePlacements.enabled;
|
|
196
|
+
})();
|
|
188
197
|
choices = (choices || []).map(c => {
|
|
189
198
|
let categoryCount;
|
|
190
|
-
if (
|
|
199
|
+
if (resolvedAllowMultiple === _utils.multiplePlacements.enabled) {
|
|
191
200
|
categoryCount = 0;
|
|
192
|
-
} else if (
|
|
201
|
+
} else if (resolvedAllowMultiple === _utils.multiplePlacements.disabled) {
|
|
193
202
|
categoryCount = 1;
|
|
194
203
|
} else {
|
|
204
|
+
// perChoice — use the value set on each choice individually
|
|
195
205
|
categoryCount = c.categoryCount || 0;
|
|
196
206
|
}
|
|
197
207
|
return {
|
|
@@ -236,7 +246,10 @@ const model = async (question, session, env, updateSession) => {
|
|
|
236
246
|
customAudioButton,
|
|
237
247
|
possibleResponses,
|
|
238
248
|
responseAreasToBeFilled,
|
|
239
|
-
hasUnplacedChoices
|
|
249
|
+
hasUnplacedChoices,
|
|
250
|
+
...(question.allowMultiplePlacementsEnabled == null && {
|
|
251
|
+
allowMultiplePlacementsEnabled: resolvedAllowMultiple
|
|
252
|
+
})
|
|
240
253
|
};
|
|
241
254
|
if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {
|
|
242
255
|
out.rationale = rationaleEnabled ? rationale : null;
|
|
@@ -300,7 +313,7 @@ const getLogTrace = (model, session, env) => {
|
|
|
300
313
|
traceLog.push('Student did not place any choices into categories.');
|
|
301
314
|
}
|
|
302
315
|
if (hasAlternates) {
|
|
303
|
-
traceLog.push(
|
|
316
|
+
traceLog.push('Alternate response combinations are accepted for this question.');
|
|
304
317
|
}
|
|
305
318
|
if (hasAlternates) {
|
|
306
319
|
traceLog.push('Score calculated using all-or-nothing scoring (alternate responses disable partial scoring).');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_lodashEs","require","_categorize","_feedback","_controllerUtils","_translator","_interopRequireDefault","_defaults","_utils","translator","Translator","getPartialScore","correctResponse","builtCategories","placements","score","reduce","acc","choices","length","filter","ch","correct","maxScore","extraPlacements","totalScore","parseFloat","toFixed","exports","getAlternates","map","c","alternateResponses","alternate","getTotalScore","question","session","env","Object","keys","categories","answers","buildState","alternates","enabled","partialScoring","getCorrectness","Promise","resolve","mode","undefined","createDefaultModel","model","defaults","normalize","updateSession","normalizedQuestion","answerCorrectness","role","categoriesPerRow","choicesLabel","choicesPosition","feedback","feedbackEnabled","promptEnabled","prompt","rowLabels","rationaleEnabled","rationale","teacherInstructionsEnabled","teacherInstructions","language","maxChoicesPerCategory","extraCSSRules","minRowHeight","fontSizeFactor","autoplayAudioEnabled","completeAudioEnabled","customAudioButton","note","fb","lockChoiceOrder","lockChoices","filteredCorrectResponse","response","filteredChoices","choice","getFeedbackForCorrectness","getShuffledChoices","categoryCount","allowMultiplePlacementsEnabled","multiplePlacements","disabled","t","lng","responseAreasToBeFilled","possibleResponses","hasUnplacedChoices","getCompleteResponseDetails","allowAlternateEnabled","out","correctness","showNote","getLogTrace","traceLog","draggedChoices","sum","a","hasAlternates","partialScoringEnabled","builtState","push","forEach","category","categoryId","id","builtCategory","find","studentChoices","correctResponseForCategory","cr","expectedChoices","correctCount","incorrectCount","totalCorrect","cat","totalIncorrect","maxPossible","outcome","reject","Error","isEmpty","empty","createCorrectResponseSession","getInnerText","html","replaceAll","getContent","replace","validate","config","maxAnswerChoices","minChoices","minCategories","maxCategories","maxLengthPerChoice","maxLengthPerCategory","reversedChoices","reverse","errors","choicesErrors","categoriesErrors","field","required","label","index","content","identicalAnswer","slice","some","nbOfCategories","nbOfChoices","categoriesError","choicesError","hasAssociations","duplicateAlternateIndex","duplicateCategory","isCorrectResponseDuplicated","isAlternateDuplicated","duplicateAlternate","associationError"],"sources":["../src/index.js"],"sourcesContent":["import { isEmpty } from 'lodash-es';\nimport { buildState, score } from '@pie-lib/categorize';\nimport { getFeedbackForCorrectness } from '@pie-lib/feedback';\nimport { lockChoices, getShuffledChoices, partialScoring } from '@pie-lib/controller-utils';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\nimport defaults from './defaults';\nimport { getCompleteResponseDetails, isAlternateDuplicated, isCorrectResponseDuplicated, multiplePlacements } from './utils';\n\n// eslint-disable-next-line no-console\n\nexport { score };\n\nexport const getPartialScore = (correctResponse, builtCategories) => {\n // in the resulted best scenario we make a sum with all the correct responses\n // and all the placements\n const { placements, score } = builtCategories.reduce(\n (acc, { choices = [] }) => ({\n placements: acc.placements + choices.length,\n score: acc.score + choices.filter((ch) => ch.correct).length,\n }),\n { placements: 0, score: 0 },\n );\n\n // in the correct response, we make a sum of the max possible score\n const { maxScore } = correctResponse.reduce(\n (acc, { choices }) => ({\n maxScore: acc.maxScore + choices.length,\n }),\n { maxScore: 0 },\n );\n\n // if there are any extra placements, we subtract from the obtained score\n const extraPlacements = placements > maxScore ? placements - maxScore : 0;\n const totalScore = (score - extraPlacements) / maxScore;\n\n return totalScore < 0 ? 0 : parseFloat(totalScore.toFixed(2));\n};\n\nconst getAlternates = (correctResponse) =>\n correctResponse.map((c) => c.alternateResponses).filter((alternate) => alternate);\n\nexport const getTotalScore = (question, session, env) => {\n if (!session) {\n return 0;\n }\n\n if (Object.keys(session).length === 0) {\n return 0;\n }\n const { categories, choices } = question || {};\n let { correctResponse } = question || {};\n let { answers } = session || {};\n answers = answers || [];\n correctResponse = correctResponse || [];\n\n // this function is used in pie-ui/categorize as well, in order to get the best scenario\n // so we get the best scenario and calculate the score\n const { categories: builtCategories, correct } = buildState(categories, choices, answers, correctResponse);\n\n const alternates = getAlternates(correctResponse);\n const enabled = partialScoring.enabled(question, env);\n\n // if there are any alternates, there will be no partial scoring!\n if (enabled && !alternates.length) {\n // we apply partial scoring\n return getPartialScore(correctResponse, builtCategories);\n }\n\n // else we apply dichotomous\n return correct ? 1 : 0;\n};\n\nexport const getCorrectness = (question, session, env) => {\n return new Promise((resolve) => {\n if (env.mode === 'evaluate') {\n const score = getTotalScore(question, session, env);\n if (score === 1) {\n resolve('correct');\n } else if (score === 0) {\n resolve('incorrect');\n } else {\n resolve('partially-correct');\n }\n } else {\n resolve(undefined);\n }\n });\n};\n\nexport const createDefaultModel = (model = {}) =>\n new Promise((resolve) => {\n resolve({\n ...defaults,\n ...model,\n });\n });\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport const model = async (question, session, env, updateSession) => {\n const normalizedQuestion = normalize(question);\n const answerCorrectness = await getCorrectness(normalizedQuestion, session, env);\n\n const { mode, role } = env || {};\n\n const {\n categories,\n categoriesPerRow,\n choicesLabel,\n choicesPosition,\n correctResponse,\n feedback,\n feedbackEnabled,\n promptEnabled,\n prompt,\n rowLabels,\n rationaleEnabled,\n rationale,\n teacherInstructionsEnabled,\n teacherInstructions,\n language,\n maxChoicesPerCategory,\n extraCSSRules,\n minRowHeight,\n fontSizeFactor,\n autoplayAudioEnabled,\n completeAudioEnabled,\n customAudioButton,\n } = normalizedQuestion;\n let { choices, note } = normalizedQuestion;\n let fb;\n\n const lockChoiceOrder = lockChoices(normalizedQuestion, session, env);\n\n const filteredCorrectResponse = correctResponse.map((response) => {\n const filteredChoices = (response.choices || []).filter((choice) => choice !== 'null');\n return { ...response, choices: filteredChoices };\n });\n\n if (mode === 'evaluate' && feedbackEnabled) {\n fb = await getFeedbackForCorrectness(answerCorrectness, feedback);\n }\n\n if (!lockChoiceOrder) {\n choices = await getShuffledChoices(choices, session, updateSession, 'id');\n }\n\n choices = (choices || []).map((c) => {\n let categoryCount;\n if (normalizedQuestion.allowMultiplePlacementsEnabled === multiplePlacements.enabled) {\n categoryCount = 0;\n } else if (normalizedQuestion.allowMultiplePlacementsEnabled === multiplePlacements.disabled) {\n categoryCount = 1;\n } else {\n categoryCount = c.categoryCount || 0;\n }\n return { ...c, categoryCount };\n });\n\n if (!note) {\n note = translator.t('common:commonCorrectAnswerWithAlternates', { lng: language });\n }\n\n const alternates = getAlternates(filteredCorrectResponse);\n const { responseAreasToBeFilled, possibleResponses, hasUnplacedChoices } = getCompleteResponseDetails(\n filteredCorrectResponse,\n normalizedQuestion.allowAlternateEnabled ? alternates : [],\n normalizedQuestion.choices,\n );\n const out = {\n categories: categories || [],\n categoriesPerRow: categoriesPerRow || 2,\n maxChoicesPerCategory,\n correctness: answerCorrectness,\n choices: choices || [],\n choicesLabel: choicesLabel || '',\n choicesPosition,\n disabled: mode !== 'gather',\n feedback: fb,\n lockChoiceOrder,\n prompt: promptEnabled ? prompt : null,\n rowLabels,\n note,\n env,\n showNote: alternates && alternates.length > 0,\n correctResponse: mode === 'evaluate' ? filteredCorrectResponse : undefined,\n language,\n extraCSSRules,\n fontSizeFactor,\n minRowHeight: minRowHeight,\n autoplayAudioEnabled,\n completeAudioEnabled,\n customAudioButton,\n possibleResponses,\n responseAreasToBeFilled,\n hasUnplacedChoices,\n };\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.rationale = rationaleEnabled ? rationale : null;\n out.teacherInstructions = teacherInstructionsEnabled ? teacherInstructions : null;\n } else {\n out.rationale = null;\n out.teacherInstructions = null;\n }\n\n return out;\n};\n\n /**\n * Generates detailed trace log for scoring evaluation\n * @param {Object} model - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array} traceLog - array of trace messages\n */\nexport const getLogTrace = (model, session, env) => {\n const traceLog = [];\n const { answers } = session || {};\n const { categories, choices, correctResponse } = model || {};\n\n const draggedChoices = answers.reduce(\n (sum, a) => sum + (a.choices?.length || 0),\n 0\n );\n\n const alternates = getAlternates(correctResponse);\n const hasAlternates = alternates.length > 0;\n const partialScoringEnabled = partialScoring.enabled(model, env);\n\n const builtState =\n draggedChoices > 0\n ? buildState(categories, choices, answers, correctResponse)\n : null;\n\n const builtCategories = builtState?.categories || [];\n \n if (draggedChoices > 0) {\n traceLog.push(`Student placed ${draggedChoices} choice(s) into categories.`);\n \n (categories || []).forEach((category) => {\n const categoryId = category.id;\n const builtCategory = builtCategories.find(c => c.id === categoryId);\n const studentChoices = builtCategory ? builtCategory.choices || [] : [];\n const correctResponseForCategory = (correctResponse || []).find(cr => cr.category === categoryId);\n const expectedChoices = correctResponseForCategory ? correctResponseForCategory.choices || [] : [];\n \n if (expectedChoices.length > 0) {\n if (studentChoices.length === 0) {\n traceLog.push(`Category ${categoryId}: student left empty (should contain ${expectedChoices.length} choice(s)).`);\n } else {\n const correctCount = studentChoices.filter(choice => choice.correct).length;\n const incorrectCount = studentChoices.length - correctCount;\n \n if (correctCount > 0 && incorrectCount === 0) {\n traceLog.push(`Category ${categoryId}: student placed ${correctCount} correct choice(s).`);\n } else if (correctCount === 0 && incorrectCount > 0) {\n traceLog.push(`Category ${categoryId}: student placed ${incorrectCount} incorrect choice(s).`);\n } else {\n traceLog.push(`Category ${categoryId}: student placed ${correctCount} correct and ${incorrectCount} incorrect choice(s).`);\n }\n }\n }\n });\n } else {\n traceLog.push('Student did not place any choices into categories.');\n }\n\n if (hasAlternates) {\n traceLog.push(`Alternate response combinations are accepted for this question.`);\n }\n\n if (hasAlternates) {\n traceLog.push('Score calculated using all-or-nothing scoring (alternate responses disable partial scoring).');\n traceLog.push('Student must get all categories completely correct to receive full credit.');\n } else if (partialScoringEnabled) {\n traceLog.push('Score calculated using partial scoring.');\n traceLog.push('Student receives credit for each correct placement, with deductions for incorrect placements beyond required amount.');\n \n if (draggedChoices > 0) {\n const totalCorrect = builtCategories.reduce((sum, cat) => \n sum + (cat.choices || []).filter(choice => choice.correct).length, 0);\n const totalIncorrect = draggedChoices - totalCorrect;\n const maxPossible = (correctResponse || []).reduce((sum, cat) => \n sum + (cat.choices || []).length, 0);\n \n traceLog.push(`Partial scoring calculation: ${totalCorrect} correct placements, ${totalIncorrect} incorrect placements.`);\n \n if (draggedChoices > maxPossible) {\n const extraPlacements = draggedChoices - maxPossible;\n traceLog.push(`${extraPlacements} extra placement(s) beyond required amount will be deducted from score.`);\n }\n }\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n traceLog.push('Student must get all categories completely correct to receive full credit.');\n }\n\n const score = getTotalScore(model, session, env);\n traceLog.push(`Final score: ${score}.`);\n\n return traceLog;\n}\n\nexport const outcome = (question, session, env) => {\n if (env.mode !== 'evaluate') {\n return Promise.reject(new Error('Can not call outcome when mode is not evaluate'));\n } else {\n return new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({\n score: 0,\n empty: true,\n traceLog: ['Student did not place any choices into categories. Score is 0.'],\n });\n } else {\n const traceLog = getLogTrace(question, session, env);\n const score = getTotalScore(question, session, env);\n \n resolve({\n score,\n empty: false,\n traceLog,\n });\n }\n });\n }\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n const { mode, role } = env || {};\n\n if (mode !== 'evaluate' && role === 'instructor') {\n const { correctResponse } = question;\n\n resolve({ answers: correctResponse, id: 1 });\n } else {\n return resolve(null);\n }\n });\n};\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { categories, choices, correctResponse, maxAnswerChoices } = model;\n const {\n minChoices = 1,\n minCategories = 1,\n maxCategories = 12,\n maxLengthPerChoice = 300,\n maxLengthPerCategory = 150,\n } = config;\n const reversedChoices = [...(choices || [])].reverse();\n const errors = {};\n const choicesErrors = {};\n const categoriesErrors = {};\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n (categories || []).forEach((category) => {\n const { id, label } = category;\n\n if (getInnerText(label).length > maxLengthPerCategory) {\n categoriesErrors[id] = `Category labels should be no more than ${maxLengthPerCategory} characters long.`;\n }\n });\n\n (reversedChoices || []).forEach((choice, index) => {\n const { id, content } = choice;\n\n if (getInnerText(content).length > maxLengthPerChoice) {\n choicesErrors[id] = `Tokens should be no more than ${maxLengthPerChoice} characters long.`;\n }\n\n if (!getContent(content)) {\n choicesErrors[id] = 'Tokens should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some((c) => c.content === content);\n\n if (identicalAnswer) {\n choicesErrors[id] = 'Tokens content should be unique.';\n }\n }\n });\n\n const nbOfCategories = (categories || []).length;\n const nbOfChoices = (choices || []).length;\n\n if (nbOfCategories > maxCategories) {\n errors.categoriesError = `No more than ${maxCategories} categories should be defined.`;\n } else if (nbOfCategories < minCategories) {\n errors.categoriesError = `There should be at least ${minCategories} category defined.`;\n }\n\n if (nbOfChoices < minChoices) {\n errors.choicesError = `There should be at least ${minChoices} choices defined.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.choicesError = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (nbOfChoices && nbOfCategories) {\n let hasAssociations = false;\n\n (correctResponse || []).forEach((response) => {\n const { choices = [], alternateResponses = [] } = response;\n\n if (choices.length) {\n hasAssociations = true;\n } else {\n alternateResponses.forEach((alternate) => {\n if ((alternate || []).length) {\n hasAssociations = true;\n }\n });\n }\n });\n\n let duplicateAlternateIndex = -1;\n let duplicateCategory = '';\n (correctResponse || []).forEach((response) => {\n const { choices = [], alternateResponses = [], category } = response;\n\n if (duplicateAlternateIndex === -1) {\n duplicateAlternateIndex = isCorrectResponseDuplicated(choices, alternateResponses);\n\n if (duplicateAlternateIndex === -1) {\n duplicateAlternateIndex = isAlternateDuplicated(alternateResponses);\n }\n\n duplicateCategory = category;\n }\n });\n\n if (duplicateAlternateIndex > -1) {\n errors.duplicateAlternate = { index: duplicateAlternateIndex, category: duplicateCategory };\n }\n\n if (!hasAssociations) {\n errors.associationError = 'At least one token should be assigned to at least one category.';\n }\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choicesErrors = choicesErrors;\n }\n\n if (!isEmpty(categoriesErrors)) {\n errors.categoriesErrors = categoriesErrors;\n }\n\n return errors;\n};\n"],"mappings":";;;;;;;;;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B,CAAC,EAAE;IAC9BF,MAAM,CAACE,gBAAgB,GAAGA,gBAAgB;EAC5C;EAEA,OAAOF,MAAM;AACf,CAAC;AAACzH,OAAA,CAAA+G,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_lodashEs","require","_categorize","_feedback","_controllerUtils","_translator","_interopRequireDefault","_defaults","_utils","translator","Translator","getPartialScore","correctResponse","builtCategories","placements","score","reduce","acc","choices","length","filter","ch","correct","maxScore","extraPlacements","totalScore","parseFloat","toFixed","exports","getAlternates","map","c","alternateResponses","alternate","getTotalScore","question","session","env","Object","keys","categories","answers","buildState","alternates","enabled","partialScoring","getCorrectness","Promise","resolve","mode","undefined","createDefaultModel","model","defaults","normalize","updateSession","normalizedQuestion","answerCorrectness","role","categoriesPerRow","choicesLabel","choicesPosition","feedback","feedbackEnabled","promptEnabled","prompt","rowLabels","rationaleEnabled","rationale","teacherInstructionsEnabled","teacherInstructions","language","maxChoicesPerCategory","extraCSSRules","minRowHeight","fontSizeFactor","autoplayAudioEnabled","completeAudioEnabled","customAudioButton","note","fb","lockChoiceOrder","lockChoices","filteredCorrectResponse","response","filteredChoices","choice","getFeedbackForCorrectness","getShuffledChoices","resolvedAllowMultiple","allowMultiplePlacementsEnabled","allChoiceIds","flatMap","cr","isExclusive","Set","size","multiplePlacements","disabled","categoryCount","t","lng","responseAreasToBeFilled","possibleResponses","hasUnplacedChoices","getCompleteResponseDetails","allowAlternateEnabled","out","correctness","showNote","getLogTrace","traceLog","draggedChoices","sum","a","hasAlternates","partialScoringEnabled","builtState","push","forEach","category","categoryId","id","builtCategory","find","studentChoices","correctResponseForCategory","expectedChoices","correctCount","incorrectCount","totalCorrect","cat","totalIncorrect","maxPossible","outcome","reject","Error","isEmpty","empty","createCorrectResponseSession","getInnerText","html","replaceAll","getContent","replace","validate","config","maxAnswerChoices","minChoices","minCategories","maxCategories","maxLengthPerChoice","maxLengthPerCategory","reversedChoices","reverse","errors","choicesErrors","categoriesErrors","field","required","label","index","content","identicalAnswer","slice","some","nbOfCategories","nbOfChoices","categoriesError","choicesError","hasAssociations","duplicateAlternateIndex","duplicateCategory","isCorrectResponseDuplicated","isAlternateDuplicated","duplicateAlternate","associationError"],"sources":["../src/index.js"],"sourcesContent":["import { isEmpty } from 'lodash-es';\nimport { buildState, score } from '@pie-lib/categorize';\nimport { getFeedbackForCorrectness } from '@pie-lib/feedback';\nimport { lockChoices, getShuffledChoices, partialScoring } from '@pie-lib/controller-utils';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\nimport defaults from './defaults';\nimport { getCompleteResponseDetails, isAlternateDuplicated, isCorrectResponseDuplicated, multiplePlacements } from './utils';\n\n// eslint-disable-next-line no-console\n\nexport { score };\n\nexport const getPartialScore = (correctResponse, builtCategories) => {\n // in the resulted best scenario we make a sum with all the correct responses\n // and all the placements\n const { placements, score } = builtCategories.reduce(\n (acc, { choices = [] }) => ({\n placements: acc.placements + choices.length,\n score: acc.score + choices.filter((ch) => ch.correct).length,\n }),\n { placements: 0, score: 0 },\n );\n\n // in the correct response, we make a sum of the max possible score\n const { maxScore } = correctResponse.reduce(\n (acc, { choices }) => ({\n maxScore: acc.maxScore + choices.length,\n }),\n { maxScore: 0 },\n );\n\n // if there are any extra placements, we subtract from the obtained score\n const extraPlacements = placements > maxScore ? placements - maxScore : 0;\n const totalScore = (score - extraPlacements) / maxScore;\n\n return totalScore < 0 ? 0 : parseFloat(totalScore.toFixed(2));\n};\n\nconst getAlternates = (correctResponse) =>\n correctResponse.map((c) => c.alternateResponses).filter((alternate) => alternate);\n\nexport const getTotalScore = (question, session, env) => {\n if (!session) {\n return 0;\n }\n\n if (Object.keys(session).length === 0) {\n return 0;\n }\n const { categories, choices } = question || {};\n let { correctResponse } = question || {};\n let { answers } = session || {};\n answers = answers || [];\n correctResponse = correctResponse || [];\n\n // this function is used in pie-ui/categorize as well, in order to get the best scenario\n // so we get the best scenario and calculate the score\n const { categories: builtCategories, correct } = buildState(categories, choices, answers, correctResponse);\n\n const alternates = getAlternates(correctResponse);\n const enabled = partialScoring.enabled(question, env);\n\n // if there are any alternates, there will be no partial scoring!\n if (enabled && !alternates.length) {\n // we apply partial scoring\n return getPartialScore(correctResponse, builtCategories);\n }\n\n // else we apply dichotomous\n return correct ? 1 : 0;\n};\n\nexport const getCorrectness = (question, session, env) => {\n return new Promise((resolve) => {\n if (env.mode === 'evaluate') {\n const score = getTotalScore(question, session, env);\n if (score === 1) {\n resolve('correct');\n } else if (score === 0) {\n resolve('incorrect');\n } else {\n resolve('partially-correct');\n }\n } else {\n resolve(undefined);\n }\n });\n};\n\nexport const createDefaultModel = (model = {}) =>\n new Promise((resolve) => {\n resolve({\n ...defaults,\n ...model,\n });\n });\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport const model = async (question, session, env, updateSession) => {\n const normalizedQuestion = normalize(question);\n const answerCorrectness = await getCorrectness(normalizedQuestion, session, env);\n\n const { mode, role } = env || {};\n\n const {\n categories,\n categoriesPerRow,\n choicesLabel,\n choicesPosition,\n correctResponse,\n feedback,\n feedbackEnabled,\n promptEnabled,\n prompt,\n rowLabels,\n rationaleEnabled,\n rationale,\n teacherInstructionsEnabled,\n teacherInstructions,\n language,\n maxChoicesPerCategory,\n extraCSSRules,\n minRowHeight,\n fontSizeFactor,\n autoplayAudioEnabled,\n completeAudioEnabled,\n customAudioButton,\n } = normalizedQuestion;\n let { choices, note } = normalizedQuestion;\n let fb;\n\n const lockChoiceOrder = lockChoices(normalizedQuestion, session, env);\n\n const filteredCorrectResponse = correctResponse.map((response) => {\n const filteredChoices = (response.choices || []).filter((choice) => choice !== 'null');\n return { ...response, choices: filteredChoices };\n });\n\n if (mode === 'evaluate' && feedbackEnabled) {\n fb = await getFeedbackForCorrectness(answerCorrectness, feedback);\n }\n\n if (!lockChoiceOrder) {\n choices = await getShuffledChoices(choices, session, updateSession, 'id');\n }\n\n const resolvedAllowMultiple = (() => {\n if (question.allowMultiplePlacementsEnabled != null) {\n return question.allowMultiplePlacementsEnabled;\n }\n // Derive from correct response: if any choice id appears in more than one category, reuse is required\n const allChoiceIds = (correctResponse || []).flatMap((cr) => cr.choices || []);\n const isExclusive = allChoiceIds.length === new Set(allChoiceIds).size;\n return isExclusive ? multiplePlacements.disabled : multiplePlacements.enabled;\n })();\n\n choices = (choices || []).map((c) => {\n let categoryCount;\n if (resolvedAllowMultiple === multiplePlacements.enabled) {\n categoryCount = 0;\n } else if (resolvedAllowMultiple === multiplePlacements.disabled) {\n categoryCount = 1;\n } else {\n // perChoice — use the value set on each choice individually\n categoryCount = c.categoryCount || 0;\n }\n return { ...c, categoryCount };\n });\n\n if (!note) {\n note = translator.t('common:commonCorrectAnswerWithAlternates', { lng: language });\n }\n\n const alternates = getAlternates(filteredCorrectResponse);\n const { responseAreasToBeFilled, possibleResponses, hasUnplacedChoices } = getCompleteResponseDetails(\n filteredCorrectResponse,\n normalizedQuestion.allowAlternateEnabled ? alternates : [],\n normalizedQuestion.choices,\n );\n const out = {\n categories: categories || [],\n categoriesPerRow: categoriesPerRow || 2,\n maxChoicesPerCategory,\n correctness: answerCorrectness,\n choices: choices || [],\n choicesLabel: choicesLabel || '',\n choicesPosition,\n disabled: mode !== 'gather',\n feedback: fb,\n lockChoiceOrder,\n prompt: promptEnabled ? prompt : null,\n rowLabels,\n note,\n env,\n showNote: alternates && alternates.length > 0,\n correctResponse: mode === 'evaluate' ? filteredCorrectResponse : undefined,\n language,\n extraCSSRules,\n fontSizeFactor,\n minRowHeight: minRowHeight,\n autoplayAudioEnabled,\n completeAudioEnabled,\n customAudioButton,\n possibleResponses,\n responseAreasToBeFilled,\n hasUnplacedChoices,\n ...(question.allowMultiplePlacementsEnabled == null && { allowMultiplePlacementsEnabled: resolvedAllowMultiple }),\n };\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.rationale = rationaleEnabled ? rationale : null;\n out.teacherInstructions = teacherInstructionsEnabled ? teacherInstructions : null;\n } else {\n out.rationale = null;\n out.teacherInstructions = null;\n }\n\n return out;\n};\n\n /**\n * Generates detailed trace log for scoring evaluation\n * @param {Object} model - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array} traceLog - array of trace messages\n */\nexport const getLogTrace = (model, session, env) => {\n const traceLog = [];\n const { answers } = session || {};\n const { categories, choices, correctResponse } = model || {};\n\n const draggedChoices = answers.reduce(\n (sum, a) => sum + (a.choices?.length || 0),\n 0\n );\n\n const alternates = getAlternates(correctResponse);\n const hasAlternates = alternates.length > 0;\n const partialScoringEnabled = partialScoring.enabled(model, env);\n\n const builtState =\n draggedChoices > 0\n ? buildState(categories, choices, answers, correctResponse)\n : null;\n\n const builtCategories = builtState?.categories || [];\n \n if (draggedChoices > 0) {\n traceLog.push(`Student placed ${draggedChoices} choice(s) into categories.`);\n \n (categories || []).forEach((category) => {\n const categoryId = category.id;\n const builtCategory = builtCategories.find(c => c.id === categoryId);\n const studentChoices = builtCategory ? builtCategory.choices || [] : [];\n const correctResponseForCategory = (correctResponse || []).find(cr => cr.category === categoryId);\n const expectedChoices = correctResponseForCategory ? correctResponseForCategory.choices || [] : [];\n \n if (expectedChoices.length > 0) {\n if (studentChoices.length === 0) {\n traceLog.push(`Category ${categoryId}: student left empty (should contain ${expectedChoices.length} choice(s)).`);\n } else {\n const correctCount = studentChoices.filter(choice => choice.correct).length;\n const incorrectCount = studentChoices.length - correctCount;\n \n if (correctCount > 0 && incorrectCount === 0) {\n traceLog.push(`Category ${categoryId}: student placed ${correctCount} correct choice(s).`);\n } else if (correctCount === 0 && incorrectCount > 0) {\n traceLog.push(`Category ${categoryId}: student placed ${incorrectCount} incorrect choice(s).`);\n } else {\n traceLog.push(`Category ${categoryId}: student placed ${correctCount} correct and ${incorrectCount} incorrect choice(s).`);\n }\n }\n }\n });\n } else {\n traceLog.push('Student did not place any choices into categories.');\n }\n\n if (hasAlternates) {\n traceLog.push('Alternate response combinations are accepted for this question.');\n }\n\n if (hasAlternates) {\n traceLog.push('Score calculated using all-or-nothing scoring (alternate responses disable partial scoring).');\n traceLog.push('Student must get all categories completely correct to receive full credit.');\n } else if (partialScoringEnabled) {\n traceLog.push('Score calculated using partial scoring.');\n traceLog.push('Student receives credit for each correct placement, with deductions for incorrect placements beyond required amount.');\n \n if (draggedChoices > 0) {\n const totalCorrect = builtCategories.reduce((sum, cat) => \n sum + (cat.choices || []).filter(choice => choice.correct).length, 0);\n const totalIncorrect = draggedChoices - totalCorrect;\n const maxPossible = (correctResponse || []).reduce((sum, cat) => \n sum + (cat.choices || []).length, 0);\n \n traceLog.push(`Partial scoring calculation: ${totalCorrect} correct placements, ${totalIncorrect} incorrect placements.`);\n \n if (draggedChoices > maxPossible) {\n const extraPlacements = draggedChoices - maxPossible;\n traceLog.push(`${extraPlacements} extra placement(s) beyond required amount will be deducted from score.`);\n }\n }\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n traceLog.push('Student must get all categories completely correct to receive full credit.');\n }\n\n const score = getTotalScore(model, session, env);\n traceLog.push(`Final score: ${score}.`);\n\n return traceLog;\n}\n\nexport const outcome = (question, session, env) => {\n if (env.mode !== 'evaluate') {\n return Promise.reject(new Error('Can not call outcome when mode is not evaluate'));\n } else {\n return new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({\n score: 0,\n empty: true,\n traceLog: ['Student did not place any choices into categories. Score is 0.'],\n });\n } else {\n const traceLog = getLogTrace(question, session, env);\n const score = getTotalScore(question, session, env);\n \n resolve({\n score,\n empty: false,\n traceLog,\n });\n }\n });\n }\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n const { mode, role } = env || {};\n\n if (mode !== 'evaluate' && role === 'instructor') {\n const { correctResponse } = question;\n\n resolve({ answers: correctResponse, id: 1 });\n } else {\n return resolve(null);\n }\n });\n};\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { categories, choices, correctResponse, maxAnswerChoices } = model;\n const {\n minChoices = 1,\n minCategories = 1,\n maxCategories = 12,\n maxLengthPerChoice = 300,\n maxLengthPerCategory = 150,\n } = config;\n const reversedChoices = [...(choices || [])].reverse();\n const errors = {};\n const choicesErrors = {};\n const categoriesErrors = {};\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n (categories || []).forEach((category) => {\n const { id, label } = category;\n\n if (getInnerText(label).length > maxLengthPerCategory) {\n categoriesErrors[id] = `Category labels should be no more than ${maxLengthPerCategory} characters long.`;\n }\n });\n\n (reversedChoices || []).forEach((choice, index) => {\n const { id, content } = choice;\n\n if (getInnerText(content).length > maxLengthPerChoice) {\n choicesErrors[id] = `Tokens should be no more than ${maxLengthPerChoice} characters long.`;\n }\n\n if (!getContent(content)) {\n choicesErrors[id] = 'Tokens should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some((c) => c.content === content);\n\n if (identicalAnswer) {\n choicesErrors[id] = 'Tokens content should be unique.';\n }\n }\n });\n\n const nbOfCategories = (categories || []).length;\n const nbOfChoices = (choices || []).length;\n\n if (nbOfCategories > maxCategories) {\n errors.categoriesError = `No more than ${maxCategories} categories should be defined.`;\n } else if (nbOfCategories < minCategories) {\n errors.categoriesError = `There should be at least ${minCategories} category defined.`;\n }\n\n if (nbOfChoices < minChoices) {\n errors.choicesError = `There should be at least ${minChoices} choices defined.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.choicesError = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (nbOfChoices && nbOfCategories) {\n let hasAssociations = false;\n\n (correctResponse || []).forEach((response) => {\n const { choices = [], alternateResponses = [] } = response;\n\n if (choices.length) {\n hasAssociations = true;\n } else {\n alternateResponses.forEach((alternate) => {\n if ((alternate || []).length) {\n hasAssociations = true;\n }\n });\n }\n });\n\n let duplicateAlternateIndex = -1;\n let duplicateCategory = '';\n (correctResponse || []).forEach((response) => {\n const { choices = [], alternateResponses = [], category } = response;\n\n if (duplicateAlternateIndex === -1) {\n duplicateAlternateIndex = isCorrectResponseDuplicated(choices, alternateResponses);\n\n if (duplicateAlternateIndex === -1) {\n duplicateAlternateIndex = isAlternateDuplicated(alternateResponses);\n }\n\n duplicateCategory = category;\n }\n });\n\n if (duplicateAlternateIndex > -1) {\n errors.duplicateAlternate = { index: duplicateAlternateIndex, category: duplicateCategory };\n }\n\n if (!hasAssociations) {\n errors.associationError = 'At least one token should be assigned to at least one category.';\n }\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choicesErrors = choicesErrors;\n }\n\n if (!isEmpty(categoriesErrors)) {\n errors.categoriesErrors = categoriesErrors;\n }\n\n return errors;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAC,sBAAA,CAAAL,OAAA;AAGA,IAAAM,SAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAFA,MAAM;EAAEQ;AAAW,CAAC,GAAGC,mBAAU;;AAIjC;;AAIO,MAAMC,eAAe,GAAGA,CAACC,eAAe,EAAEC,eAAe,KAAK;EACnE;EACA;EACA,MAAM;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGF,eAAe,CAACG,MAAM,CAClD,CAACC,GAAG,EAAE;IAAEC,OAAO,GAAG;EAAG,CAAC,MAAM;IAC1BJ,UAAU,EAAEG,GAAG,CAACH,UAAU,GAAGI,OAAO,CAACC,MAA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AAM,CAACE,gBAAgB,GAAGA,gBAAgB;EAC5C;EAEA,OAAOF,MAAM;AACf,CAAC;AAAC/H,OAAA,CAAAqH,QAAA,GAAAA,QAAA","ignoreList":[]}
|
package/controller/package.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "13.1.1-next.
|
|
7
|
+
"version": "13.1.1-next.86+d03d4764f",
|
|
8
8
|
"description": "",
|
|
9
9
|
"author": "pie framework developers",
|
|
10
10
|
"license": "ISC",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"@mui/material": "^7.3.4",
|
|
17
17
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
18
18
|
"@pie-lib/categorize": "2.0.2",
|
|
19
|
-
"@pie-lib/config-ui": "13.0.
|
|
20
|
-
"@pie-lib/correct-answer-toggle": "4.0.
|
|
21
|
-
"@pie-lib/drag": "4.0.
|
|
22
|
-
"@pie-lib/math-rendering": "5.0
|
|
23
|
-
"@pie-lib/render-ui": "6.1.
|
|
19
|
+
"@pie-lib/config-ui": "13.0.11",
|
|
20
|
+
"@pie-lib/correct-answer-toggle": "4.0.5",
|
|
21
|
+
"@pie-lib/drag": "4.0.6",
|
|
22
|
+
"@pie-lib/math-rendering": "5.1.0",
|
|
23
|
+
"@pie-lib/render-ui": "6.1.3",
|
|
24
24
|
"@pie-lib/translator": "4.0.2",
|
|
25
25
|
"debug": "^4.1.1",
|
|
26
26
|
"lodash-es": "^4.17.23",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react": "18.3.1",
|
|
29
29
|
"react-dom": "18.3.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "d03d4764f3c906a9b251c7f5b6cb5fec50b3a898",
|
|
32
32
|
"scripts": {
|
|
33
33
|
"postpublish": "../../scripts/postpublish"
|
|
34
34
|
},
|