@instructure/quiz-core 17.46.2-rc.5 → 17.46.2-rc.7
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/es/banks/components/BankEntryRow/presenter.js +1 -3
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +1 -4
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +1 -3
- package/es/building/components/resources/quiz/instructions/Show/index.js +1 -3
- package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +1 -3
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +1 -3
- package/es/common/components/resources/item/ItemEdit/index.js +1 -2
- package/es/common/components/resources/item/ItemEdit/presenter.js +0 -2
- package/es/common/components/resources/item/ItemOverride/index.js +1 -2
- package/es/common/components/resources/item/ItemOverride/presenter.js +2 -4
- package/es/common/components/resources/quiz/instructions/Instructions.js +1 -3
- package/es/common/components/resources/sessionItemResult/ResultStimulus/index.js +1 -3
- package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +3 -7
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +1 -3
- package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +1 -3
- package/es/common/util/RceConfigProvider.js +11 -11
- package/es/common/util/interactionTypePropsHelper.js +2 -5
- package/es/common/util/windowChecks.js +3 -5
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +1 -3
- package/lib/banks/components/BankEntryRow/presenter.js +1 -4
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +1 -5
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +1 -4
- package/lib/building/components/resources/quiz/instructions/Show/index.js +1 -4
- package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +1 -4
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +1 -4
- package/lib/common/components/resources/item/ItemEdit/index.js +1 -2
- package/lib/common/components/resources/item/ItemEdit/presenter.js +0 -2
- package/lib/common/components/resources/item/ItemOverride/index.js +1 -2
- package/lib/common/components/resources/item/ItemOverride/presenter.js +2 -4
- package/lib/common/components/resources/quiz/instructions/Instructions.js +1 -4
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/index.js +1 -4
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +3 -8
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +1 -4
- package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +1 -4
- package/lib/common/util/RceConfigProvider.js +10 -10
- package/lib/common/util/interactionTypePropsHelper.js +2 -6
- package/lib/common/util/windowChecks.js +7 -7
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +1 -4
- package/package.json +9 -9
|
@@ -20,7 +20,6 @@ import { PresentationContent, ScreenReaderContent } from '@instructure/ui-a11y-c
|
|
|
20
20
|
import { Alert } from '@instructure/ui-alerts';
|
|
21
21
|
import { themeable } from '@instructure/ui-themeable';
|
|
22
22
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
23
|
-
import { isNewRCEEnabled } from "../../../common/util/rceChecker.js";
|
|
24
23
|
import { BUILD_TRAY_POSITION, COPY_MOVE_BANK_ENTRY_MODAL, SET_EDIT_BUTTON_FOCUS, withI18nSupport } from '@instructure/quiz-common';
|
|
25
24
|
import { extractTextFromHtml } from '@instructure/quiz-interactions';
|
|
26
25
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -280,8 +279,7 @@ export var BankEntryRow = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
280
279
|
if (itemOrStimulus.itemBody) {
|
|
281
280
|
return /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
282
281
|
customStyles: styles.stem,
|
|
283
|
-
content: itemOrStimulus.itemBody
|
|
284
|
-
useNewRce: isNewRCEEnabled()
|
|
282
|
+
content: itemOrStimulus.itemBody
|
|
285
283
|
});
|
|
286
284
|
} else {
|
|
287
285
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -12,7 +12,6 @@ import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
|
12
12
|
import { Heading } from '@instructure/ui-heading';
|
|
13
13
|
import { themeable } from '@instructure/ui-themeable';
|
|
14
14
|
import { RichContentRenderer, RCE_THREE_LINES_HEIGHT } from '@instructure/quiz-rce';
|
|
15
|
-
import { isNewRCEEnabled } from "../../../../common/util/rceChecker.js";
|
|
16
15
|
import { RichContentInput } from "../../../../common/components/RichContentInput/index.js";
|
|
17
16
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
18
17
|
import { Modal, ModalHeader, ModalBody, ModalFooter, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_FEEDBACK, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
@@ -108,7 +107,6 @@ export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
108
107
|
parentType: this.props.parentType,
|
|
109
108
|
parentId: this.props.parentId,
|
|
110
109
|
importModalCloseOverride: this.returnToFeedback,
|
|
111
|
-
useNewRce: isNewRCEEnabled(),
|
|
112
110
|
height: RCE_THREE_LINES_HEIGHT
|
|
113
111
|
}));
|
|
114
112
|
}
|
|
@@ -117,8 +115,7 @@ export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
117
115
|
value: function renderContent() {
|
|
118
116
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
119
117
|
customStyles: styles.itemStem,
|
|
120
|
-
content: this.props.item.itemBody
|
|
121
|
-
useNewRce: isNewRCEEnabled()
|
|
118
|
+
content: this.props.item.itemBody
|
|
122
119
|
}), this.renderRichContentInput('correct', t('For a correct answer')), this.renderRichContentInput('incorrect', t('For an incorrect answer')), this.renderRichContentInput('neutral', t('Provide general feedback (regardless of answer)')));
|
|
123
120
|
}
|
|
124
121
|
}, {
|
|
@@ -11,7 +11,6 @@ import { Button } from '@instructure/ui-buttons';
|
|
|
11
11
|
import { themeable } from '@instructure/ui-themeable';
|
|
12
12
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
13
13
|
import RichContentInput from "../../../../../../common/components/RichContentInput/index.js";
|
|
14
|
-
import { isNewRCEEnabled } from "../../../../../../common/util/rceChecker.js";
|
|
15
14
|
import wrapWithOutsideClick from "../../../../../../common/components/shared/functionality/componentWithOutsideClick.js";
|
|
16
15
|
import CustomPropTypes from "../../../../../../common/util/CustomPropTypes.js";
|
|
17
16
|
import elementsForSelectors from "../../../../../../common/util/ElementsForSelectors.js";
|
|
@@ -89,8 +88,7 @@ var QuizInstructionsEdit = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
89
88
|
onKeyUp: this.props.onInputChange,
|
|
90
89
|
onChange: this.props.onInputChange,
|
|
91
90
|
parentType: PARENT_TYPE_QUIZ,
|
|
92
|
-
parentId: this.props.quizId
|
|
93
|
-
useNewRce: isNewRCEEnabled()
|
|
91
|
+
parentId: this.props.quizId
|
|
94
92
|
}), /*#__PURE__*/React.createElement("div", {
|
|
95
93
|
className: styles.footer
|
|
96
94
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -9,7 +9,6 @@ import React, { Component } from 'react';
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import { themeable } from '@instructure/ui-themeable';
|
|
11
11
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
12
|
-
import { isNewRCEEnabled } from "../../../../../../common/util/rceChecker.js";
|
|
13
12
|
import Overlay from "../../../../../../common/components/shared/overlay/Overlay.js";
|
|
14
13
|
import makeScrollable from "../../../../../../common/components/shared/functionality/makeScrollable.js";
|
|
15
14
|
var styles = {
|
|
@@ -64,8 +63,7 @@ export var QuizInstructionsShow = (_dec = themeable(theme, styles), _dec(_class
|
|
|
64
63
|
"data-automation": "instructions-show-text"
|
|
65
64
|
}, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
66
65
|
customStyles: styles.instructionsShowText,
|
|
67
|
-
content: this.props.instructions || t('Add Instructions...')
|
|
68
|
-
useNewRce: isNewRCEEnabled()
|
|
66
|
+
content: this.props.instructions || t('Add Instructions...')
|
|
69
67
|
}))));
|
|
70
68
|
}
|
|
71
69
|
}]);
|
|
@@ -26,7 +26,6 @@ import ItemOverride from "../../../../../common/components/resources/item/ItemOv
|
|
|
26
26
|
import AddToBankOptions from "../../AddToBankOptions/index.js";
|
|
27
27
|
import TagDisplay from "../../../../../common/components/shared/TagDisplay/index.js";
|
|
28
28
|
import Item from "../../../../../common/records/Item.js";
|
|
29
|
-
import { isNewRCEEnabled } from "../../../../../common/util/rceChecker.js";
|
|
30
29
|
import { BUILD_TRAY_OPEN, PARENT_TYPE_QUIZ, REGRADE_MODAL, SHOULD_CLONE_ITEM } from '@instructure/quiz-common';
|
|
31
30
|
import QuizEntryShow from "../QuizEntryShow/index.js";
|
|
32
31
|
import QuizEntryEdit from "../QuizEntryEdit/index.js";
|
|
@@ -174,8 +173,7 @@ export var QuizEntry = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
174
173
|
initialFocusId: this.props.initialFocusId,
|
|
175
174
|
handleValidationErrorsFromApi: this.props.handleValidationErrorsFromApi,
|
|
176
175
|
clearValidationErrorsFromApi: this.props.clearValidationErrorsFromApi,
|
|
177
|
-
haveValidationErrorsFromApi: Boolean(Object.values(this.props.validationErrorsFromApi).length)
|
|
178
|
-
useNewRce: isNewRCEEnabled()
|
|
176
|
+
haveValidationErrorsFromApi: Boolean(Object.values(this.props.validationErrorsFromApi).length)
|
|
179
177
|
}, pick(this.props, ['displayPosition', 'guid', 'draggingOnBuild', 'newHoverPosition', 'quizEntry', 'quizEntries', 'quizId', 'isContentLockedByBlueprint', 'setUi', 'switchOffEditing', 'switchOnEditing', 'shouldClone', 'scrollKey', 'editQuizEntryToggle', 'onEditQuizEntryToggle', 'stimulusOrientation']));
|
|
180
178
|
}
|
|
181
179
|
}, {
|
|
@@ -17,7 +17,6 @@ import { themeable } from '@instructure/ui-themeable';
|
|
|
17
17
|
import PositionSummary from "../PositionSummary/index.js";
|
|
18
18
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
19
19
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
20
|
-
import { isNewRCEEnabled } from "../../../../util/rceChecker.js";
|
|
21
20
|
var styles = {
|
|
22
21
|
componentId: 'cwwgG',
|
|
23
22
|
template: function template(theme) {
|
|
@@ -160,8 +159,7 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
160
159
|
}, this.getPointsText(pointsPossible || 0))), /*#__PURE__*/React.createElement("div", {
|
|
161
160
|
className: styles.itemBody
|
|
162
161
|
}, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
163
|
-
content: this.props.itemBody
|
|
164
|
-
useNewRce: isNewRCEEnabled()
|
|
162
|
+
content: this.props.itemBody
|
|
165
163
|
})))), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
166
164
|
className: styles.pinWrapper
|
|
167
165
|
}, children))));
|
|
@@ -37,8 +37,7 @@ export function mapStateToProps(state, props) {
|
|
|
37
37
|
partialDeepScoringEnabled: featureOn('partial_deep_scoring'),
|
|
38
38
|
partialScoringEnabled: featureOn('partial_scoring'),
|
|
39
39
|
quizId: getActiveQuizId(state),
|
|
40
|
-
showCalculator: featureOn('calculator_per_question')
|
|
41
|
-
useNewRce: featureOn('use_new_rce')
|
|
40
|
+
showCalculator: featureOn('calculator_per_question')
|
|
42
41
|
};
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -180,7 +180,6 @@ ItemEdit.propTypes = {
|
|
|
180
180
|
setUploadStatus: PropTypes.func.isRequired,
|
|
181
181
|
initialFocusId: PropTypes.string,
|
|
182
182
|
showCalculator: PropTypes.bool,
|
|
183
|
-
useNewRce: PropTypes.bool,
|
|
184
183
|
clearValidationErrorsFromApi: PropTypes.func.isRequired,
|
|
185
184
|
validationErrorsFromApi: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.shape({
|
|
186
185
|
type: PropTypes.string,
|
|
@@ -199,7 +198,6 @@ ItemEdit.defaultProps = {
|
|
|
199
198
|
partialScoringEnabled: false,
|
|
200
199
|
initialFocusId: null,
|
|
201
200
|
showCalculator: false,
|
|
202
|
-
useNewRce: false,
|
|
203
201
|
validationErrorsFromApi: {}
|
|
204
202
|
};
|
|
205
203
|
export default ItemEdit;
|
|
@@ -18,8 +18,7 @@ function mapStateToProps(state, props) {
|
|
|
18
18
|
oneQuestionAtATime: isActiveQuizWorkingInstanceOneQuestionAtATime(state),
|
|
19
19
|
partialDeepScoringEnabled: featureOn('partial_deep_scoring'),
|
|
20
20
|
partialScoringEnabled: featureOn('partial_scoring'),
|
|
21
|
-
quizId: getActiveQuizId(state)
|
|
22
|
-
useNewRce: featureOn('use_new_rce')
|
|
21
|
+
quizId: getActiveQuizId(state)
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
24
|
|
|
@@ -76,13 +76,11 @@ ItemOverride.propTypes = {
|
|
|
76
76
|
partialScoringEnabled: PropTypes.bool,
|
|
77
77
|
quizId: PropTypes.string.isRequired,
|
|
78
78
|
screenreaderNotification: PropTypes.func.isRequired,
|
|
79
|
-
setOneQuestionAtATime: PropTypes.func.isRequired
|
|
80
|
-
useNewRce: PropTypes.bool
|
|
79
|
+
setOneQuestionAtATime: PropTypes.func.isRequired
|
|
81
80
|
};
|
|
82
81
|
ItemOverride.defaultProps = {
|
|
83
82
|
errorsAreShowing: false,
|
|
84
83
|
partialScoringEnabled: false,
|
|
85
|
-
partialDeepScoringEnabled: false
|
|
86
|
-
useNewRce: false
|
|
84
|
+
partialDeepScoringEnabled: false
|
|
87
85
|
};
|
|
88
86
|
export default ItemOverride;
|
|
@@ -10,7 +10,6 @@ import React, { Component } from 'react';
|
|
|
10
10
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
11
|
import { themeable } from '@instructure/ui-themeable';
|
|
12
12
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
13
|
-
import { isNewRCEEnabled } from "../../../../util/rceChecker.js";
|
|
14
13
|
import makeScrollable from "../../../shared/functionality/makeScrollable.js"; // ================================
|
|
15
14
|
// renders the quiz instructions on
|
|
16
15
|
// the Preview and Take pages
|
|
@@ -44,8 +43,7 @@ export var QuizInstructions = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
44
43
|
tabIndex: "-1"
|
|
45
44
|
}, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
46
45
|
customStyles: styles.text,
|
|
47
|
-
content: this.props.quiz.instructions
|
|
48
|
-
useNewRce: isNewRCEEnabled()
|
|
46
|
+
content: this.props.quiz.instructions
|
|
49
47
|
}));
|
|
50
48
|
}
|
|
51
49
|
}]);
|
|
@@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
11
|
import { themeable } from '@instructure/ui-themeable';
|
|
12
12
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
13
|
-
import { isNewRCEEnabled } from "../../../../util/rceChecker.js";
|
|
14
13
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
14
|
var styles = {
|
|
16
15
|
componentId: 'fcFqb',
|
|
@@ -66,8 +65,7 @@ export var ResultStimulus = (_dec = themeable(theme, styles), _dec(_class = (_te
|
|
|
66
65
|
}, /*#__PURE__*/React.createElement("div", {
|
|
67
66
|
className: styles.title
|
|
68
67
|
}, title)), /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
69
|
-
content: body
|
|
70
|
-
useNewRce: isNewRCEEnabled()
|
|
68
|
+
content: body
|
|
71
69
|
}));
|
|
72
70
|
}
|
|
73
71
|
}, {
|
|
@@ -18,7 +18,6 @@ import { View } from '@instructure/ui-view';
|
|
|
18
18
|
import { PresentationContent } from '@instructure/ui-a11y-content';
|
|
19
19
|
import { themeable } from '@instructure/ui-themeable';
|
|
20
20
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
21
|
-
import { isNewRCEEnabled } from "../../../../util/rceChecker.js";
|
|
22
21
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
23
22
|
import PositionBox from "../../positionBox/PositionBox.js";
|
|
24
23
|
import { COMPONENT_RESULT } from '@instructure/quiz-common';
|
|
@@ -191,8 +190,7 @@ export var SessionItemResult = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
191
190
|
className: styles.textPadding
|
|
192
191
|
}, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
193
192
|
customStyles: styles.itemFeedbackText,
|
|
194
|
-
content: feedbackContent
|
|
195
|
-
useNewRce: isNewRCEEnabled()
|
|
193
|
+
content: feedbackContent
|
|
196
194
|
})));
|
|
197
195
|
}
|
|
198
196
|
}
|
|
@@ -236,8 +234,7 @@ export var SessionItemResult = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
236
234
|
className: styles.itemFeedbackLabel
|
|
237
235
|
}, t('Feedback from grader')), /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
238
236
|
customStyles: styles.itemFeedbackText,
|
|
239
|
-
content: graderFeedback.content
|
|
240
|
-
useNewRce: isNewRCEEnabled()
|
|
237
|
+
content: graderFeedback.content
|
|
241
238
|
}));
|
|
242
239
|
} else {
|
|
243
240
|
return this.renderFeedbackBox(graderFeedback.content, t('Feedback from grader'));
|
|
@@ -277,8 +274,7 @@ export var SessionItemResult = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
277
274
|
properties: simpleItem.properties || {},
|
|
278
275
|
scoringData: simpleSessionItem.scoringData,
|
|
279
276
|
scoredData: simpleSessionItemResult.scoredData,
|
|
280
|
-
itemResultsModifications: simpleResultsModifications[simpleSessionItem.id]
|
|
281
|
-
useNewRce: isNewRCEEnabled()
|
|
277
|
+
itemResultsModifications: simpleResultsModifications[simpleSessionItem.id]
|
|
282
278
|
})), this.renderItemFeedback(simpleSessionItemResult));
|
|
283
279
|
}
|
|
284
280
|
}, {
|
|
@@ -16,7 +16,6 @@ import { themeable } from '@instructure/ui-themeable';
|
|
|
16
16
|
import { Heading } from '@instructure/ui-heading';
|
|
17
17
|
import RichContentInput from "../../../RichContentInput/index.js";
|
|
18
18
|
import { toErrors } from "../../../../util/instUIMessages.js";
|
|
19
|
-
import { isNewRCEEnabled } from "../../../../util/rceChecker.js";
|
|
20
19
|
import Errors from "../../../shared/errors/Errors.js";
|
|
21
20
|
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
22
21
|
import { IconUpdownLine } from '@instructure/ui-icons';
|
|
@@ -177,8 +176,7 @@ export var StimulusEditInfo = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
177
176
|
onKeyUp: this.onBodyChange,
|
|
178
177
|
onBlur: this.onBodyChange,
|
|
179
178
|
onChange: this.onBodyChange,
|
|
180
|
-
uploadPath: this.fileUploadUrl()
|
|
181
|
-
useNewRce: isNewRCEEnabled()
|
|
179
|
+
uploadPath: this.fileUploadUrl()
|
|
182
180
|
}), /*#__PURE__*/React.createElement(Errors, {
|
|
183
181
|
errorList: this.errorsList('body')
|
|
184
182
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -8,7 +8,6 @@ import { Heading } from '@instructure/ui-heading';
|
|
|
8
8
|
import { Text } from '@instructure/ui-text';
|
|
9
9
|
import { View } from '@instructure/ui-view';
|
|
10
10
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
11
|
-
import { isNewRCEEnabled } from "../../../../util/rceChecker.js";
|
|
12
11
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
13
12
|
|
|
14
13
|
var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
@@ -58,8 +57,7 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
|
58
57
|
}, this.props.stimulus.title), instructions, /*#__PURE__*/React.createElement("div", {
|
|
59
58
|
"data-automation": "sdk-stimulus-LeftPanelShow-content"
|
|
60
59
|
}, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
61
|
-
content: this.props.stimulus.body
|
|
62
|
-
useNewRce: isNewRCEEnabled()
|
|
60
|
+
content: this.props.stimulus.body
|
|
63
61
|
})));
|
|
64
62
|
}
|
|
65
63
|
}]);
|
|
@@ -14,7 +14,7 @@ import { RceConfigContext, RceConfigKeys } from '@instructure/quiz-common';
|
|
|
14
14
|
import { addError } from "../actions/alerts.js";
|
|
15
15
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
16
16
|
import { extractTextFromHtml } from '@instructure/quiz-interactions';
|
|
17
|
-
import {
|
|
17
|
+
import { isQuizTaking } from "./windowChecks.js";
|
|
18
18
|
|
|
19
19
|
var _ref4 = /*#__PURE__*/React.createElement(Card, {
|
|
20
20
|
wrapped: true
|
|
@@ -100,17 +100,17 @@ export var RceConfigProviderComponent = function RceConfigProviderComponent(prop
|
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
var getConfig = function getConfig() {
|
|
103
|
-
var
|
|
103
|
+
var _featureFlags, _ref2;
|
|
104
104
|
|
|
105
105
|
return {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
featureFlags: (_featureFlags = {}, _defineProperty(_featureFlags, RceConfigKeys.isNewRCEEnabled, props.isNewRCEEnabled), _defineProperty(_featureFlags, RceConfigKeys.rce5Renderer, props.rce5Renderer), _defineProperty(_featureFlags, RceConfigKeys.isNewRCEAppsEnabled, props.isNewRCEAppsEnabled), _featureFlags),
|
|
107
|
+
rcs: hasAllPropsForRcs() && canvasConfig ? (_ref2 = {}, _defineProperty(_ref2, RceConfigKeys.canvasUserId, props.canvasUserId), _defineProperty(_ref2, RceConfigKeys.contextId, props.contextId), _defineProperty(_ref2, RceConfigKeys.contextType, props.contextType), _defineProperty(_ref2, RceConfigKeys.rcsHost, props.rcsHost), _defineProperty(_ref2, RceConfigKeys.rcsJwt, jwt), _defineProperty(_ref2, RceConfigKeys.rcsJwtRefreshFn, refreshToken), _defineProperty(_ref2, RceConfigKeys.canvasConfig, canvasConfig), _ref2) : null,
|
|
108
|
+
rendererEnhancement: _defineProperty({}, RceConfigKeys.canvasOrigin, props.canvasOrigin)
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
var setErrorIfDuringTaking = function setErrorIfDuringTaking(errorMessage) {
|
|
113
|
-
if (!
|
|
113
|
+
if (!isQuizTaking()) {
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -124,7 +124,7 @@ export var RceConfigProviderComponent = function RceConfigProviderComponent(prop
|
|
|
124
124
|
while (1) {
|
|
125
125
|
switch (_context2.prev = _context2.next) {
|
|
126
126
|
case 0:
|
|
127
|
-
if (!(!props.
|
|
127
|
+
if (!(!props.isNewRCEEnabled && !props.rce5Renderer)) {
|
|
128
128
|
_context2.next = 2;
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
@@ -185,10 +185,10 @@ export var RceConfigProviderComponent = function RceConfigProviderComponent(prop
|
|
|
185
185
|
}
|
|
186
186
|
}, _callee2, null, [[2, 21, 25, 28]]);
|
|
187
187
|
}))();
|
|
188
|
-
}, [props.
|
|
188
|
+
}, [props.isNewRCEEnabled, props.rce5Renderer]);
|
|
189
189
|
|
|
190
190
|
if (props.loadedApiFeatures) {
|
|
191
|
-
if (props.
|
|
191
|
+
if (props.isNewRCEEnabled || props.rce5Renderer) {
|
|
192
192
|
if (!canvasConfigLoading) {
|
|
193
193
|
return /*#__PURE__*/React.createElement(RceConfigContext.Provider, {
|
|
194
194
|
value: getConfig()
|
|
@@ -203,7 +203,7 @@ export var RceConfigProviderComponent = function RceConfigProviderComponent(prop
|
|
|
203
203
|
};
|
|
204
204
|
RceConfigProviderComponent.propTypes = {
|
|
205
205
|
children: PropTypes.node.isRequired,
|
|
206
|
-
|
|
206
|
+
isNewRCEEnabled: PropTypes.bool.isRequired,
|
|
207
207
|
rce5Renderer: PropTypes.bool.isRequired,
|
|
208
208
|
isNewRCEAppsEnabled: PropTypes.bool,
|
|
209
209
|
setRCEError: PropTypes.func.isRequired,
|
|
@@ -230,7 +230,7 @@ RceConfigProviderComponent.defaultProps = {
|
|
|
230
230
|
|
|
231
231
|
var mapStateToProps = function mapStateToProps(state, ownProps) {
|
|
232
232
|
return {
|
|
233
|
-
|
|
233
|
+
isNewRCEEnabled: isNewRCEEnabled(),
|
|
234
234
|
rce5Renderer: isRCE5RendererEnabled(),
|
|
235
235
|
isNewRCEAppsEnabled: isNewRCEAppsEnabled(),
|
|
236
236
|
loadedApiFeatures: state.getIn(['ui', 'loadedApiFeatures']) || ownProps.loadedApiFeatures
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import RichContentInput from "../components/RichContentInput/index.js";
|
|
2
2
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
3
|
-
import { isNewRCEEnabled } from "../../common/util/rceChecker.js";
|
|
4
3
|
export var propsForInteractionEdit = function propsForInteractionEdit(props, additionalOptions) {
|
|
5
4
|
var item = props.workingItem.toJS();
|
|
6
5
|
|
|
@@ -69,8 +68,7 @@ export var propsForInteractionEdit = function propsForInteractionEdit(props, add
|
|
|
69
68
|
setOneQuestionAtATime: setOneQuestionAtATime,
|
|
70
69
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
71
70
|
initialFocusId: props.initialFocusId,
|
|
72
|
-
calculatorType: item.calculatorType
|
|
73
|
-
useNewRce: props.useNewRce
|
|
71
|
+
calculatorType: item.calculatorType
|
|
74
72
|
};
|
|
75
73
|
};
|
|
76
74
|
export var propsForInteractionShow = function propsForInteractionShow(item) {
|
|
@@ -83,7 +81,6 @@ export var propsForInteractionShow = function propsForInteractionShow(item) {
|
|
|
83
81
|
itemBody: item.itemBody || '',
|
|
84
82
|
properties: item.properties,
|
|
85
83
|
notifyScreenreader: true,
|
|
86
|
-
scoringData: item.scoringData
|
|
87
|
-
useNewRce: isNewRCEEnabled()
|
|
84
|
+
scoringData: item.scoringData
|
|
88
85
|
};
|
|
89
86
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isDuringQuizTake } from '@instructure/quiz-common';
|
|
1
2
|
export var media = {
|
|
2
3
|
'phone-break-point': 'only screen and (max-width: 48rem)',
|
|
3
4
|
'tablet-break-point': 'only screen and (max-width: 64rem)'
|
|
@@ -12,9 +13,6 @@ export var onTablet = function onTablet() {
|
|
|
12
13
|
var mediaQueryString = media['tablet-break-point'];
|
|
13
14
|
return !onPhone(windowObj) && windowObj.matchMedia(mediaQueryString).matches;
|
|
14
15
|
};
|
|
15
|
-
export var
|
|
16
|
-
|
|
17
|
-
var locationPath = windowObj.location.pathname;
|
|
18
|
-
var patternOfQuizTakingPath = /taking\/\d+\/take/;
|
|
19
|
-
return !!locationPath.match(patternOfQuizTakingPath);
|
|
16
|
+
export var isQuizTaking = function isQuizTaking() {
|
|
17
|
+
return isDuringQuizTake();
|
|
20
18
|
};
|
|
@@ -14,7 +14,6 @@ import { Heading } from '@instructure/ui-heading';
|
|
|
14
14
|
import { ScreenReaderContent, PresentationContent } from '@instructure/ui-a11y-content';
|
|
15
15
|
import { themeable } from '@instructure/ui-themeable';
|
|
16
16
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
17
|
-
import { isNewRCEEnabled } from "../../../../common/util/rceChecker.js";
|
|
18
17
|
import Card from "../../../../common/components/shared/Card/index.js";
|
|
19
18
|
import ExpandButton from "../../../../common/components/shared/ExpandButton/index.js";
|
|
20
19
|
import Spinner from "../../../../common/components/shared/spinner/Spinner.js";
|
|
@@ -127,8 +126,7 @@ export var ItemAnalysisRow = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
127
126
|
value: function renderStem() {
|
|
128
127
|
return /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
129
128
|
customStyles: styles.stem,
|
|
130
|
-
content: this.props.itemAnalysis.itemBody
|
|
131
|
-
useNewRce: isNewRCEEnabled()
|
|
129
|
+
content: this.props.itemAnalysis.itemBody
|
|
132
130
|
});
|
|
133
131
|
}
|
|
134
132
|
}, {
|
|
@@ -47,8 +47,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
47
47
|
|
|
48
48
|
var _quizRce = require("@instructure/quiz-rce");
|
|
49
49
|
|
|
50
|
-
var _rceChecker = require("../../../common/util/rceChecker.js");
|
|
51
|
-
|
|
52
50
|
var _quizCommon = require("@instructure/quiz-common");
|
|
53
51
|
|
|
54
52
|
var _quizInteractions = require("@instructure/quiz-interactions");
|
|
@@ -322,8 +320,7 @@ var BankEntryRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
322
320
|
if (itemOrStimulus.itemBody) {
|
|
323
321
|
return /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
324
322
|
customStyles: styles.stem,
|
|
325
|
-
content: itemOrStimulus.itemBody
|
|
326
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
323
|
+
content: itemOrStimulus.itemBody
|
|
327
324
|
});
|
|
328
325
|
} else {
|
|
329
326
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -31,8 +31,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
31
31
|
|
|
32
32
|
var _quizRce = require("@instructure/quiz-rce");
|
|
33
33
|
|
|
34
|
-
var _rceChecker = require("../../../../common/util/rceChecker.js");
|
|
35
|
-
|
|
36
34
|
var _index = require("../../../../common/components/RichContentInput/index.js");
|
|
37
35
|
|
|
38
36
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
@@ -134,7 +132,6 @@ var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
134
132
|
parentType: this.props.parentType,
|
|
135
133
|
parentId: this.props.parentId,
|
|
136
134
|
importModalCloseOverride: this.returnToFeedback,
|
|
137
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)(),
|
|
138
135
|
height: _quizRce.RCE_THREE_LINES_HEIGHT
|
|
139
136
|
}));
|
|
140
137
|
}
|
|
@@ -143,8 +140,7 @@ var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
143
140
|
value: function renderContent() {
|
|
144
141
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
145
142
|
customStyles: styles.itemStem,
|
|
146
|
-
content: this.props.item.itemBody
|
|
147
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
143
|
+
content: this.props.item.itemBody
|
|
148
144
|
}), this.renderRichContentInput('correct', (0, _formatMessage.default)('For a correct answer')), this.renderRichContentInput('incorrect', (0, _formatMessage.default)('For an incorrect answer')), this.renderRichContentInput('neutral', (0, _formatMessage.default)('Provide general feedback (regardless of answer)')));
|
|
149
145
|
}
|
|
150
146
|
}, {
|
|
@@ -29,8 +29,6 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
29
29
|
|
|
30
30
|
var _index = _interopRequireDefault(require("../../../../../../common/components/RichContentInput/index.js"));
|
|
31
31
|
|
|
32
|
-
var _rceChecker = require("../../../../../../common/util/rceChecker.js");
|
|
33
|
-
|
|
34
32
|
var _componentWithOutsideClick = _interopRequireDefault(require("../../../../../../common/components/shared/functionality/componentWithOutsideClick.js"));
|
|
35
33
|
|
|
36
34
|
var _CustomPropTypes = _interopRequireDefault(require("../../../../../../common/util/CustomPropTypes.js"));
|
|
@@ -115,8 +113,7 @@ var QuizInstructionsEdit = (_dec = (0, _uiThemeable.themeable)(_theme.default, s
|
|
|
115
113
|
onKeyUp: this.props.onInputChange,
|
|
116
114
|
onChange: this.props.onInputChange,
|
|
117
115
|
parentType: _quizCommon.PARENT_TYPE_QUIZ,
|
|
118
|
-
parentId: this.props.quizId
|
|
119
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
116
|
+
parentId: this.props.quizId
|
|
120
117
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
121
118
|
className: styles.footer
|
|
122
119
|
}, /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
@@ -25,8 +25,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
25
25
|
|
|
26
26
|
var _quizRce = require("@instructure/quiz-rce");
|
|
27
27
|
|
|
28
|
-
var _rceChecker = require("../../../../../../common/util/rceChecker.js");
|
|
29
|
-
|
|
30
28
|
var _Overlay = _interopRequireDefault(require("../../../../../../common/components/shared/overlay/Overlay.js"));
|
|
31
29
|
|
|
32
30
|
var _makeScrollable = _interopRequireDefault(require("../../../../../../common/components/shared/functionality/makeScrollable.js"));
|
|
@@ -87,8 +85,7 @@ var QuizInstructionsShow = (_dec = (0, _uiThemeable.themeable)(_theme.default, s
|
|
|
87
85
|
"data-automation": "instructions-show-text"
|
|
88
86
|
}, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
89
87
|
customStyles: styles.instructionsShowText,
|
|
90
|
-
content: this.props.instructions || (0, _formatMessage.default)('Add Instructions...')
|
|
91
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
88
|
+
content: this.props.instructions || (0, _formatMessage.default)('Add Instructions...')
|
|
92
89
|
}))));
|
|
93
90
|
}
|
|
94
91
|
}]);
|
|
@@ -59,8 +59,6 @@ var _index8 = _interopRequireDefault(require("../../../../../common/components/s
|
|
|
59
59
|
|
|
60
60
|
var _Item = _interopRequireDefault(require("../../../../../common/records/Item.js"));
|
|
61
61
|
|
|
62
|
-
var _rceChecker = require("../../../../../common/util/rceChecker.js");
|
|
63
|
-
|
|
64
62
|
var _quizCommon = require("@instructure/quiz-common");
|
|
65
63
|
|
|
66
64
|
var _index9 = _interopRequireDefault(require("../QuizEntryShow/index.js"));
|
|
@@ -216,8 +214,7 @@ var QuizEntry = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _de
|
|
|
216
214
|
initialFocusId: this.props.initialFocusId,
|
|
217
215
|
handleValidationErrorsFromApi: this.props.handleValidationErrorsFromApi,
|
|
218
216
|
clearValidationErrorsFromApi: this.props.clearValidationErrorsFromApi,
|
|
219
|
-
haveValidationErrorsFromApi: Boolean(Object.values(this.props.validationErrorsFromApi).length)
|
|
220
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
217
|
+
haveValidationErrorsFromApi: Boolean(Object.values(this.props.validationErrorsFromApi).length)
|
|
221
218
|
}, (0, _pick.default)(this.props, ['displayPosition', 'guid', 'draggingOnBuild', 'newHoverPosition', 'quizEntry', 'quizEntries', 'quizId', 'isContentLockedByBlueprint', 'setUi', 'switchOffEditing', 'switchOnEditing', 'shouldClone', 'scrollKey', 'editQuizEntryToggle', 'onEditQuizEntryToggle', 'stimulusOrientation']));
|
|
222
219
|
}
|
|
223
220
|
}, {
|
|
@@ -41,8 +41,6 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
41
41
|
|
|
42
42
|
var _quizRce = require("@instructure/quiz-rce");
|
|
43
43
|
|
|
44
|
-
var _rceChecker = require("../../../../util/rceChecker.js");
|
|
45
|
-
|
|
46
44
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
47
45
|
|
|
48
46
|
var _dec, _class, _class2, _temp;
|
|
@@ -188,8 +186,7 @@ var SidebarItem = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _
|
|
|
188
186
|
}, this.getPointsText(pointsPossible || 0))), /*#__PURE__*/_react.default.createElement("div", {
|
|
189
187
|
className: styles.itemBody
|
|
190
188
|
}, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
191
|
-
content: this.props.itemBody
|
|
192
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
189
|
+
content: this.props.itemBody
|
|
193
190
|
})))), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
194
191
|
className: styles.pinWrapper
|
|
195
192
|
}, children))));
|
|
@@ -65,8 +65,7 @@ function mapStateToProps(state, props) {
|
|
|
65
65
|
partialDeepScoringEnabled: (0, _featureCheck.featureOn)('partial_deep_scoring'),
|
|
66
66
|
partialScoringEnabled: (0, _featureCheck.featureOn)('partial_scoring'),
|
|
67
67
|
quizId: (0, _quizzes2.getActiveQuizId)(state),
|
|
68
|
-
showCalculator: (0, _featureCheck.featureOn)('calculator_per_question')
|
|
69
|
-
useNewRce: (0, _featureCheck.featureOn)('use_new_rce')
|
|
68
|
+
showCalculator: (0, _featureCheck.featureOn)('calculator_per_question')
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
71
|
|
|
@@ -211,7 +211,6 @@ ItemEdit.propTypes = {
|
|
|
211
211
|
setUploadStatus: _propTypes.default.func.isRequired,
|
|
212
212
|
initialFocusId: _propTypes.default.string,
|
|
213
213
|
showCalculator: _propTypes.default.bool,
|
|
214
|
-
useNewRce: _propTypes.default.bool,
|
|
215
214
|
clearValidationErrorsFromApi: _propTypes.default.func.isRequired,
|
|
216
215
|
validationErrorsFromApi: _propTypes.default.objectOf(_propTypes.default.arrayOf(_propTypes.default.shape({
|
|
217
216
|
type: _propTypes.default.string,
|
|
@@ -230,7 +229,6 @@ ItemEdit.defaultProps = {
|
|
|
230
229
|
partialScoringEnabled: false,
|
|
231
230
|
initialFocusId: null,
|
|
232
231
|
showCalculator: false,
|
|
233
|
-
useNewRce: false,
|
|
234
232
|
validationErrorsFromApi: {}
|
|
235
233
|
};
|
|
236
234
|
var _default = ItemEdit;
|
|
@@ -38,8 +38,7 @@ function mapStateToProps(state, props) {
|
|
|
38
38
|
oneQuestionAtATime: (0, _quizzes2.isActiveQuizWorkingInstanceOneQuestionAtATime)(state),
|
|
39
39
|
partialDeepScoringEnabled: (0, _featureCheck.featureOn)('partial_deep_scoring'),
|
|
40
40
|
partialScoringEnabled: (0, _featureCheck.featureOn)('partial_scoring'),
|
|
41
|
-
quizId: (0, _quizzes2.getActiveQuizId)(state)
|
|
42
|
-
useNewRce: (0, _featureCheck.featureOn)('use_new_rce')
|
|
41
|
+
quizId: (0, _quizzes2.getActiveQuizId)(state)
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
44
|
|
|
@@ -99,14 +99,12 @@ ItemOverride.propTypes = {
|
|
|
99
99
|
partialScoringEnabled: _propTypes.default.bool,
|
|
100
100
|
quizId: _propTypes.default.string.isRequired,
|
|
101
101
|
screenreaderNotification: _propTypes.default.func.isRequired,
|
|
102
|
-
setOneQuestionAtATime: _propTypes.default.func.isRequired
|
|
103
|
-
useNewRce: _propTypes.default.bool
|
|
102
|
+
setOneQuestionAtATime: _propTypes.default.func.isRequired
|
|
104
103
|
};
|
|
105
104
|
ItemOverride.defaultProps = {
|
|
106
105
|
errorsAreShowing: false,
|
|
107
106
|
partialScoringEnabled: false,
|
|
108
|
-
partialDeepScoringEnabled: false
|
|
109
|
-
useNewRce: false
|
|
107
|
+
partialDeepScoringEnabled: false
|
|
110
108
|
};
|
|
111
109
|
var _default = ItemOverride;
|
|
112
110
|
exports.default = _default;
|
|
@@ -25,8 +25,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
25
25
|
|
|
26
26
|
var _quizRce = require("@instructure/quiz-rce");
|
|
27
27
|
|
|
28
|
-
var _rceChecker = require("../../../../util/rceChecker.js");
|
|
29
|
-
|
|
30
28
|
var _makeScrollable = _interopRequireDefault(require("../../../shared/functionality/makeScrollable.js"));
|
|
31
29
|
|
|
32
30
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
@@ -63,8 +61,7 @@ var QuizInstructions = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
|
|
|
63
61
|
tabIndex: "-1"
|
|
64
62
|
}, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
65
63
|
customStyles: styles.text,
|
|
66
|
-
content: this.props.quiz.instructions
|
|
67
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
64
|
+
content: this.props.quiz.instructions
|
|
68
65
|
}));
|
|
69
66
|
}
|
|
70
67
|
}]);
|
|
@@ -27,8 +27,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
27
27
|
|
|
28
28
|
var _quizRce = require("@instructure/quiz-rce");
|
|
29
29
|
|
|
30
|
-
var _rceChecker = require("../../../../util/rceChecker.js");
|
|
31
|
-
|
|
32
30
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
33
31
|
|
|
34
32
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
@@ -87,8 +85,7 @@ var ResultStimulus = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles)
|
|
|
87
85
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
88
86
|
className: styles.title
|
|
89
87
|
}, title)), /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
90
|
-
content: body
|
|
91
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
88
|
+
content: body
|
|
92
89
|
}));
|
|
93
90
|
}
|
|
94
91
|
}, {
|
|
@@ -41,8 +41,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
41
41
|
|
|
42
42
|
var _quizRce = require("@instructure/quiz-rce");
|
|
43
43
|
|
|
44
|
-
var _rceChecker = require("../../../../util/rceChecker.js");
|
|
45
|
-
|
|
46
44
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
47
45
|
|
|
48
46
|
var _PositionBox = _interopRequireDefault(require("../../positionBox/PositionBox.js"));
|
|
@@ -224,8 +222,7 @@ var SessionItemResult = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
224
222
|
className: styles.textPadding
|
|
225
223
|
}, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
226
224
|
customStyles: styles.itemFeedbackText,
|
|
227
|
-
content: feedbackContent
|
|
228
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
225
|
+
content: feedbackContent
|
|
229
226
|
})));
|
|
230
227
|
}
|
|
231
228
|
}
|
|
@@ -269,8 +266,7 @@ var SessionItemResult = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
269
266
|
className: styles.itemFeedbackLabel
|
|
270
267
|
}, (0, _formatMessage.default)('Feedback from grader')), /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
271
268
|
customStyles: styles.itemFeedbackText,
|
|
272
|
-
content: graderFeedback.content
|
|
273
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
269
|
+
content: graderFeedback.content
|
|
274
270
|
}));
|
|
275
271
|
} else {
|
|
276
272
|
return this.renderFeedbackBox(graderFeedback.content, (0, _formatMessage.default)('Feedback from grader'));
|
|
@@ -310,8 +306,7 @@ var SessionItemResult = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
310
306
|
properties: simpleItem.properties || {},
|
|
311
307
|
scoringData: simpleSessionItem.scoringData,
|
|
312
308
|
scoredData: simpleSessionItemResult.scoredData,
|
|
313
|
-
itemResultsModifications: simpleResultsModifications[simpleSessionItem.id]
|
|
314
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
309
|
+
itemResultsModifications: simpleResultsModifications[simpleSessionItem.id]
|
|
315
310
|
})), this.renderItemFeedback(simpleSessionItemResult));
|
|
316
311
|
}
|
|
317
312
|
}, {
|
|
@@ -39,8 +39,6 @@ var _index = _interopRequireDefault(require("../../../RichContentInput/index.js"
|
|
|
39
39
|
|
|
40
40
|
var _instUIMessages = require("../../../../util/instUIMessages.js");
|
|
41
41
|
|
|
42
|
-
var _rceChecker = require("../../../../util/rceChecker.js");
|
|
43
|
-
|
|
44
42
|
var _Errors = _interopRequireDefault(require("../../../shared/errors/Errors.js"));
|
|
45
43
|
|
|
46
44
|
var _uiSimpleSelect = require("@instructure/ui-simple-select");
|
|
@@ -210,8 +208,7 @@ var StimulusEditInfo = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
|
|
|
210
208
|
onKeyUp: this.onBodyChange,
|
|
211
209
|
onBlur: this.onBodyChange,
|
|
212
210
|
onChange: this.onBodyChange,
|
|
213
|
-
uploadPath: this.fileUploadUrl()
|
|
214
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
211
|
+
uploadPath: this.fileUploadUrl()
|
|
215
212
|
}), /*#__PURE__*/_react.default.createElement(_Errors.default, {
|
|
216
213
|
errorList: this.errorsList('body')
|
|
217
214
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -29,8 +29,6 @@ var _uiView = require("@instructure/ui-view");
|
|
|
29
29
|
|
|
30
30
|
var _quizRce = require("@instructure/quiz-rce");
|
|
31
31
|
|
|
32
|
-
var _rceChecker = require("../../../../util/rceChecker.js");
|
|
33
|
-
|
|
34
32
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
35
33
|
|
|
36
34
|
var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
@@ -80,8 +78,7 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
|
80
78
|
}, this.props.stimulus.title), instructions, /*#__PURE__*/_react.default.createElement("div", {
|
|
81
79
|
"data-automation": "sdk-stimulus-LeftPanelShow-content"
|
|
82
80
|
}, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
83
|
-
content: this.props.stimulus.body
|
|
84
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
81
|
+
content: this.props.stimulus.body
|
|
85
82
|
})));
|
|
86
83
|
}
|
|
87
84
|
}]);
|
|
@@ -127,17 +127,17 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
var getConfig = function getConfig() {
|
|
130
|
-
var
|
|
130
|
+
var _featureFlags, _ref2;
|
|
131
131
|
|
|
132
132
|
return {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
featureFlags: (_featureFlags = {}, (0, _defineProperty2.default)(_featureFlags, _quizCommon.RceConfigKeys.isNewRCEEnabled, props.isNewRCEEnabled), (0, _defineProperty2.default)(_featureFlags, _quizCommon.RceConfigKeys.rce5Renderer, props.rce5Renderer), (0, _defineProperty2.default)(_featureFlags, _quizCommon.RceConfigKeys.isNewRCEAppsEnabled, props.isNewRCEAppsEnabled), _featureFlags),
|
|
134
|
+
rcs: hasAllPropsForRcs() && canvasConfig ? (_ref2 = {}, (0, _defineProperty2.default)(_ref2, _quizCommon.RceConfigKeys.canvasUserId, props.canvasUserId), (0, _defineProperty2.default)(_ref2, _quizCommon.RceConfigKeys.contextId, props.contextId), (0, _defineProperty2.default)(_ref2, _quizCommon.RceConfigKeys.contextType, props.contextType), (0, _defineProperty2.default)(_ref2, _quizCommon.RceConfigKeys.rcsHost, props.rcsHost), (0, _defineProperty2.default)(_ref2, _quizCommon.RceConfigKeys.rcsJwt, jwt), (0, _defineProperty2.default)(_ref2, _quizCommon.RceConfigKeys.rcsJwtRefreshFn, refreshToken), (0, _defineProperty2.default)(_ref2, _quizCommon.RceConfigKeys.canvasConfig, canvasConfig), _ref2) : null,
|
|
135
|
+
rendererEnhancement: (0, _defineProperty2.default)({}, _quizCommon.RceConfigKeys.canvasOrigin, props.canvasOrigin)
|
|
136
136
|
};
|
|
137
137
|
};
|
|
138
138
|
|
|
139
139
|
var setErrorIfDuringTaking = function setErrorIfDuringTaking(errorMessage) {
|
|
140
|
-
if (!(0, _windowChecks.
|
|
140
|
+
if (!(0, _windowChecks.isQuizTaking)()) {
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -151,7 +151,7 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
|
151
151
|
while (1) {
|
|
152
152
|
switch (_context2.prev = _context2.next) {
|
|
153
153
|
case 0:
|
|
154
|
-
if (!(!props.
|
|
154
|
+
if (!(!props.isNewRCEEnabled && !props.rce5Renderer)) {
|
|
155
155
|
_context2.next = 2;
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
@@ -212,10 +212,10 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
|
212
212
|
}
|
|
213
213
|
}, _callee2, null, [[2, 21, 25, 28]]);
|
|
214
214
|
}))();
|
|
215
|
-
}, [props.
|
|
215
|
+
}, [props.isNewRCEEnabled, props.rce5Renderer]);
|
|
216
216
|
|
|
217
217
|
if (props.loadedApiFeatures) {
|
|
218
|
-
if (props.
|
|
218
|
+
if (props.isNewRCEEnabled || props.rce5Renderer) {
|
|
219
219
|
if (!canvasConfigLoading) {
|
|
220
220
|
return /*#__PURE__*/_react.default.createElement(_quizCommon.RceConfigContext.Provider, {
|
|
221
221
|
value: getConfig()
|
|
@@ -232,7 +232,7 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
|
232
232
|
exports.RceConfigProviderComponent = RceConfigProviderComponent;
|
|
233
233
|
RceConfigProviderComponent.propTypes = {
|
|
234
234
|
children: _propTypes.default.node.isRequired,
|
|
235
|
-
|
|
235
|
+
isNewRCEEnabled: _propTypes.default.bool.isRequired,
|
|
236
236
|
rce5Renderer: _propTypes.default.bool.isRequired,
|
|
237
237
|
isNewRCEAppsEnabled: _propTypes.default.bool,
|
|
238
238
|
setRCEError: _propTypes.default.func.isRequired,
|
|
@@ -259,7 +259,7 @@ RceConfigProviderComponent.defaultProps = {
|
|
|
259
259
|
|
|
260
260
|
var mapStateToProps = function mapStateToProps(state, ownProps) {
|
|
261
261
|
return {
|
|
262
|
-
|
|
262
|
+
isNewRCEEnabled: (0, _rceChecker.isNewRCEEnabled)(),
|
|
263
263
|
rce5Renderer: (0, _rceChecker.isRCE5RendererEnabled)(),
|
|
264
264
|
isNewRCEAppsEnabled: (0, _rceChecker.isNewRCEAppsEnabled)(),
|
|
265
265
|
loadedApiFeatures: state.getIn(['ui', 'loadedApiFeatures']) || ownProps.loadedApiFeatures
|
|
@@ -11,8 +11,6 @@ var _index = _interopRequireDefault(require("../components/RichContentInput/inde
|
|
|
11
11
|
|
|
12
12
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
13
13
|
|
|
14
|
-
var _rceChecker = require("../../common/util/rceChecker.js");
|
|
15
|
-
|
|
16
14
|
var propsForInteractionEdit = function propsForInteractionEdit(props, additionalOptions) {
|
|
17
15
|
var item = props.workingItem.toJS();
|
|
18
16
|
|
|
@@ -81,8 +79,7 @@ var propsForInteractionEdit = function propsForInteractionEdit(props, additional
|
|
|
81
79
|
setOneQuestionAtATime: setOneQuestionAtATime,
|
|
82
80
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
83
81
|
initialFocusId: props.initialFocusId,
|
|
84
|
-
calculatorType: item.calculatorType
|
|
85
|
-
useNewRce: props.useNewRce
|
|
82
|
+
calculatorType: item.calculatorType
|
|
86
83
|
};
|
|
87
84
|
};
|
|
88
85
|
|
|
@@ -98,8 +95,7 @@ var propsForInteractionShow = function propsForInteractionShow(item) {
|
|
|
98
95
|
itemBody: item.itemBody || '',
|
|
99
96
|
properties: item.properties,
|
|
100
97
|
notifyScreenreader: true,
|
|
101
|
-
scoringData: item.scoringData
|
|
102
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
98
|
+
scoringData: item.scoringData
|
|
103
99
|
};
|
|
104
100
|
};
|
|
105
101
|
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.isQuizTaking = exports.onTablet = exports.onPhone = exports.media = void 0;
|
|
7
|
+
|
|
8
|
+
var _quizCommon = require("@instructure/quiz-common");
|
|
9
|
+
|
|
7
10
|
var media = {
|
|
8
11
|
'phone-break-point': 'only screen and (max-width: 48rem)',
|
|
9
12
|
'tablet-break-point': 'only screen and (max-width: 64rem)'
|
|
@@ -26,11 +29,8 @@ var onTablet = function onTablet() {
|
|
|
26
29
|
|
|
27
30
|
exports.onTablet = onTablet;
|
|
28
31
|
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
var locationPath = windowObj.location.pathname;
|
|
32
|
-
var patternOfQuizTakingPath = /taking\/\d+\/take/;
|
|
33
|
-
return !!locationPath.match(patternOfQuizTakingPath);
|
|
32
|
+
var isQuizTaking = function isQuizTaking() {
|
|
33
|
+
return (0, _quizCommon.isDuringQuizTake)();
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
exports.
|
|
36
|
+
exports.isQuizTaking = isQuizTaking;
|
|
@@ -35,8 +35,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
35
35
|
|
|
36
36
|
var _quizRce = require("@instructure/quiz-rce");
|
|
37
37
|
|
|
38
|
-
var _rceChecker = require("../../../../common/util/rceChecker.js");
|
|
39
|
-
|
|
40
38
|
var _index = _interopRequireDefault(require("../../../../common/components/shared/Card/index.js"));
|
|
41
39
|
|
|
42
40
|
var _index2 = _interopRequireDefault(require("../../../../common/components/shared/ExpandButton/index.js"));
|
|
@@ -162,8 +160,7 @@ var ItemAnalysisRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
162
160
|
value: function renderStem() {
|
|
163
161
|
return /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
164
162
|
customStyles: styles.stem,
|
|
165
|
-
content: this.props.itemAnalysis.itemBody
|
|
166
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
163
|
+
content: this.props.itemAnalysis.itemBody
|
|
167
164
|
});
|
|
168
165
|
}
|
|
169
166
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.46.2-rc.
|
|
3
|
+
"version": "17.46.2-rc.7+47bea20b0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@instructure/outcomes-ui": "^2.1.2",
|
|
44
|
-
"@instructure/quiz-common": "17.46.2-rc.
|
|
45
|
-
"@instructure/quiz-i18n": "17.46.2-rc.
|
|
46
|
-
"@instructure/quiz-interactions": "17.46.2-rc.
|
|
47
|
-
"@instructure/quiz-number-input": "17.46.2-rc.
|
|
48
|
-
"@instructure/quiz-rce": "17.46.2-rc.
|
|
44
|
+
"@instructure/quiz-common": "17.46.2-rc.7+47bea20b0",
|
|
45
|
+
"@instructure/quiz-i18n": "17.46.2-rc.7+47bea20b0",
|
|
46
|
+
"@instructure/quiz-interactions": "17.46.2-rc.7+47bea20b0",
|
|
47
|
+
"@instructure/quiz-number-input": "17.46.2-rc.7+47bea20b0",
|
|
48
|
+
"@instructure/quiz-rce": "17.46.2-rc.7+47bea20b0",
|
|
49
49
|
"@instructure/ui-a11y-content": "^7.20.0",
|
|
50
50
|
"@instructure/ui-alerts": "^7.20.0",
|
|
51
51
|
"@instructure/ui-avatar": "^7.20.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"eventemitter3": "^3.1.0",
|
|
107
107
|
"humps": "^2.0.0",
|
|
108
108
|
"immutable": "^3.8.1",
|
|
109
|
-
"instructure-validations": "17.46.2-rc.
|
|
109
|
+
"instructure-validations": "17.46.2-rc.7+47bea20b0",
|
|
110
110
|
"ipaddr.js": "^1.5.4",
|
|
111
111
|
"isomorphic-fetch": "^2.2.0",
|
|
112
112
|
"isuuid": "^0.1.0",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"intl": "^1.2.4",
|
|
157
157
|
"jquery": "^2.2.3",
|
|
158
158
|
"most-subject": "^5.3.0",
|
|
159
|
-
"quiz-presets": "17.46.2-rc.
|
|
159
|
+
"quiz-presets": "17.46.2-rc.7+47bea20b0",
|
|
160
160
|
"react": "^16.8.6",
|
|
161
161
|
"react-addons-test-utils": "^15.6.2",
|
|
162
162
|
"react-dom": "^16.8.6",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"publishConfig": {
|
|
173
173
|
"access": "public"
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "47bea20b09ca5f5297bef941c827eb4fad7b5e05"
|
|
176
176
|
}
|