Skip to content
Merged

merge #2556

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
132f906
fix(image-cloze-association): refactor in order to speed up load time…
PatriciaRomaniuc Apr 11, 2025
5a80cfd
fix(multiple-choice): isSelectionButtonBelow - fix styling for keyboa…
PatriciaRomaniuc Apr 14, 2025
2ac35ec
fix(inline-dropdown): create custom label for choices rationale for b…
PatriciaRomaniuc Apr 17, 2025
cfd4323
fix: tests
PatriciaRomaniuc Apr 17, 2025
111a014
fix(inline-dropdown): lint issue PD-4926
PatriciaRomaniuc Apr 17, 2025
b54b223
fix: tests
PatriciaRomaniuc Apr 17, 2025
dc44310
Merge pull request #2548 from pie-framework/master
CarlaCostea Apr 18, 2025
36404cf
fix(graphing): hide incomplete background marks PD-4911
andreeimiron Apr 18, 2025
de1356f
fix(categorize, hotspot, multiple-choice, drag-in-the-blank): prevent…
PatriciaRomaniuc Apr 23, 2025
10dbc46
Merge pull request #2554 from pie-framework/fix/PD-4975
CarlaCostea Apr 24, 2025
ccf7412
fix: update pie-lib/pie-toolbox PD-4976
CarlaCostea Apr 24, 2025
8b13a17
Merge pull request #2555 from pie-framework/fix/PD-4976
CarlaCostea Apr 24, 2025
a4075cf
fix(graphing): merge default config with new config at set PD-3556
arimieandreea Apr 24, 2025
627840f
fix(graphing): add spacing
arimieandreea Apr 24, 2025
4b56c43
fix(categorize): fix multiple dnd backend issue PD-4978
PatriciaRomaniuc Apr 25, 2025
5673c4c
fix(drag-in-the-blank): set correctAnswer back to false when correctR…
arimieandreea Apr 25, 2025
f1133e5
Merge pull request #2558 from pie-framework/fix/PD-4978
CarlaCostea Apr 25, 2025
adab664
Merge pull request #2559 from pie-framework/fix/PD-4979
CarlaCostea Apr 25, 2025
090ee16
Merge pull request #2533 from pie-framework/fix/PD-4941
CarlaCostea Apr 28, 2025
154742a
Merge pull request #2557 from pie-framework/fix/PD-3556
CarlaCostea Apr 28, 2025
b8a4ff2
Merge pull request #2549 from pie-framework/fix/PD-4911
CarlaCostea Apr 28, 2025
b8b5727
Merge pull request #2543 from pie-framework/fix/PD-4926
CarlaCostea Apr 28, 2025
b06e761
Merge pull request #2534 from pie-framework/fix/PD-4834-below
CarlaCostea Apr 28, 2025
a001d12
fix: update pie-lib/pie-toolbox PD-4976, PD-4980, PD-3496
CarlaCostea Apr 28, 2025
4b7a009
Merge pull request #2562 from pie-framework/fix/update-pie-toolbox-25APR
CarlaCostea Apr 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/boilerplate-item-type/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^3.1.0",
"lodash": "^4.17.15",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/boilerplate-item-type/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "lib/index.js",
"module": "src/index.js",
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^3.1.0",
"lodash": "^4.17.15"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/boilerplate-item-type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"prop-types": "^15.6.1",
"react": "^16.8.1",
"react-dom": "^16.8.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/calculator/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"react": "^16.8.1",
"react-dom": "^16.8.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/categorize/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.1",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^3.1.0",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/categorize/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@pie-element/categorize-controller",
"private": true,
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"lodash": "^4.17.15"
},
"version": "7.8.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/categorize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"lodash": "^4.17.15",
Expand Down
11 changes: 2 additions & 9 deletions packages/categorize/src/categorize/choice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import classNames from 'classnames';
import { DragSource, DndProvider } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import { DragSource } from 'react-dnd';
import { uid } from '@pie-lib/pie-toolbox/drag';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
Expand Down Expand Up @@ -160,10 +159,4 @@ const DraggableChoice = DragSource(
}),
)(Choice);

const DraggableChoiceWithProvider = (props) => (
<DndProvider backend={HTML5Backend}>
<DraggableChoice {...props} />
</DndProvider>
);

export default uid.withUid(DraggableChoiceWithProvider);
export default uid.withUid(DraggableChoice);
6 changes: 6 additions & 0 deletions packages/categorize/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default class Categorize extends HTMLElement {

this.eliminateBlindAnswersFromSession();
this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));
// reset the audioInitialized to false since the model changed, and we might need to reinitialize the audio
this._audioInitialized = false;

this.render();
}

Expand Down Expand Up @@ -110,6 +113,7 @@ export default class Categorize extends HTMLElement {
const observer = new MutationObserver((mutationsList, observer) => {
mutationsList.forEach((mutation) => {
if (mutation.type === 'childList') {
if (this._audioInitialized) return;
const audio = this.querySelector('audio');
const isInsidePrompt = audio && audio.closest('#preview-prompt');

Expand Down Expand Up @@ -180,6 +184,8 @@ export default class Categorize extends HTMLElement {
this._handlePlaying = handlePlaying;
this._handleEnded = handleEnded;
this._enableAudio = enableAudio;
// set to true to prevent multiple initializations
this._audioInitialized = true;

observer.disconnect();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/charting/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/charting/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "./node_modules/.bin/jest"
},
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^4.1.1",
"lodash": "^4.17.15"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/charting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/complex-rubric/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"lodash": "^4.17.15"
},
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/drag-in-the-blank/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.1",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^3.1.0",
"lodash": "^4.17.15",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/drag-in-the-blank/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^3.1.0",
"lodash": "^4.17.15",
"type-of": "^2.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/drag-in-the-blank/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"lodash": "^4.17.10",
"prop-types": "^15.6.1",
Expand Down
7 changes: 6 additions & 1 deletion packages/drag-in-the-blank/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ export default class DragInTheBlank extends HTMLElement {
super();
this._model = null;
this._session = null;
this._audioInitialized = false;
this.audioComplete = false;
}

set model(m) {
this._model = m;
this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), isComplete(this._session, this._model, this.audioComplete), !!this._model));

// reset the audioInitialized to false since the model changed, and we might need to reinitialize the audio
this._audioInitialized = false;
this._render();
}

Expand Down Expand Up @@ -105,6 +107,7 @@ export default class DragInTheBlank extends HTMLElement {
const observer = new MutationObserver((mutationsList, observer) => {
mutationsList.forEach((mutation) => {
if (mutation.type === 'childList') {
if (this._audioInitialized) return;
const audio = this.querySelector('audio');
const isInsidePrompt = audio && audio.closest('#preview-prompt');

Expand Down Expand Up @@ -174,6 +177,8 @@ export default class DragInTheBlank extends HTMLElement {
this._handlePlaying = handlePlaying;
this._handleEnded = handleEnded;
this._enableAudio = enableAudio;
// set to true to prevent multiple initializations
this._audioInitialized = true;

observer.disconnect();
}
Expand Down
8 changes: 8 additions & 0 deletions packages/drag-in-the-blank/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ export class Main extends React.Component {
this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
};

UNSAFE_componentWillReceiveProps(nextProps) {
const { model: nextModel } = nextProps;

if(nextModel && !nextModel.correctResponse && this.state.showCorrectAnswer !== false){
this.setState({ showCorrectAnswer: false });
}
}

render() {
const { showCorrectAnswer } = this.state;
const { model, onChange, value, classes } = this.props;
Expand Down
2 changes: 1 addition & 1 deletion packages/drawing-response/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.6",
"debug": "^3.1.0",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/drawing-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@mdi/js": "^3.6.95",
"@mdi/react": "^1.1.1",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.6",
"enzyme-to-json": "^3.3.5",
"konva": "^3.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ebsr/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@material-ui/core": "^3.9.2",
"@pie-element/multiple-choice": "^9.15.3",
"@pie-framework/pie-configure-events": "^1.2.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"lodash": "^4.17.15",
"prop-types": "^15.6.2",
"react": "^16.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ebsr/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"lodash": "^4.17.15"
},
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/ebsr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@pie-element/multiple-choice": "^9.15.3",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"lodash": "^4.17.11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.1",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.6",
"debug": "^3.1.0",
"lodash": "^4.17.15",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^3.1.0",
"he": "^1.2.0",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/explicit-constructed-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"he": "^1.2.0",
"lodash": "^4.17.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/extended-text-entry/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"lodash": "^4.17.15",
"prop-types": "^15.6.2",
"react": "^16.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/extended-text-entry/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "lib/index.js",
"module": "src/index.js",
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3"
"@pie-lib/pie-toolbox": "2.14.5"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
2 changes: 1 addition & 1 deletion packages/extended-text-entry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"lodash.throttle": "^4.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/fraction-model/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^3.1.0",
"lodash": "^4.17.15",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/fraction-model/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "lib/index.js",
"module": "src/index.js",
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^3.1.0",
"lodash": "^4.17.15"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/fraction-model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"prop-types": "^15.6.1",
"react": "^16.8.1",
"react-dom": "^16.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphing-solution-set/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphing-solution-set/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "./node_modules/.bin/jest"
},
"dependencies": {
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"debug": "^4.1.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/graphing-solution-set/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-player-events": "^0.1.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"react": "^16.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphing/configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"@pie-framework/pie-configure-events": "^1.3.0",
"@pie-lib/pie-toolbox": "2.14.3",
"@pie-lib/pie-toolbox": "2.14.5",
"classnames": "^2.2.5",
"debug": "^4.1.1",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphing/configure/src/correct-response.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export class CorrectResponse extends React.Component {
<Graph
className={correctAnswerErrors[key] && classes.graphError}
axesSettings={{ includeArrows: arrows }}
backgroundMarks={backgroundMarks}
backgroundMarks={backgroundMarks.filter((mark) => !mark.building)}
coordinatesOnHover={coordinatesOnHover}
disabledLabels={true}
disabledTitle={true}
Expand Down
Loading
Loading