@instructure/quiz-core 22.3.2-rc.5 → 22.3.2-rc.8
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/common/components/resources/item/ItemEdit/index.js +5 -3
- package/es/common/components/resources/item/ItemEdit/presenter.js +4 -2
- package/es/common/util/interactionTypePropsHelper.js +2 -1
- package/lib/common/components/resources/item/ItemEdit/index.js +5 -3
- package/lib/common/components/resources/item/ItemEdit/presenter.js +4 -2
- package/lib/common/util/interactionTypePropsHelper.js +2 -1
- package/package.json +9 -9
|
@@ -5,7 +5,7 @@ import ItemEdit from './presenter';
|
|
|
5
5
|
import makeEditable from '../../../shared/functionality/makeEditable';
|
|
6
6
|
import { openModal } from '../../../../actions/modal';
|
|
7
7
|
import { occludeQuizEntries } from '../../../../actions/ui';
|
|
8
|
-
import { generateImportModalId } from '
|
|
8
|
+
import { generateImportModalId } from '../../../ImportModal';
|
|
9
9
|
import { showError, hideError } from '../../../../actions/errorsShowing';
|
|
10
10
|
import { uploadStatus as setUploadStatus } from '../../../../actions/upload';
|
|
11
11
|
import * as modificationActions from '../../../../actions/modifications';
|
|
@@ -13,8 +13,9 @@ import { addError, screenreaderNotification } from '../../../../actions/alerts';
|
|
|
13
13
|
import { updateItem } from '../../../../../building/api/items';
|
|
14
14
|
import { interactionFileUpload, setOneAtATimeType } from '../../../../../building/api/quizzes';
|
|
15
15
|
import { featureOn } from '../../../../util/featureCheck';
|
|
16
|
-
import { getActiveQuizId, isActiveQuizWorkingInstanceOneQuestionAtATime } from '
|
|
16
|
+
import { getActiveQuizId, isActiveQuizWorkingInstanceOneQuestionAtATime } from '../../../../selectors/quizzes';
|
|
17
17
|
export function mapStateToProps(state, props) {
|
|
18
|
+
var _props$showCalculator;
|
|
18
19
|
// Error Related:
|
|
19
20
|
var workingItem = props.entry.getWorkingInstance();
|
|
20
21
|
var isValid = workingItem.isValid();
|
|
@@ -39,7 +40,8 @@ export function mapStateToProps(state, props) {
|
|
|
39
40
|
partialScoringEnabled: featureOn('partial_scoring'),
|
|
40
41
|
quizId: getActiveQuizId(state),
|
|
41
42
|
scope: props.scope,
|
|
42
|
-
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid'])
|
|
43
|
+
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid']),
|
|
44
|
+
showCalculatorOption: (_props$showCalculator = props.showCalculator) !== null && _props$showCalculator !== void 0 ? _props$showCalculator : true // used by Studio team to control calculator checkbox visibility
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
47
|
function mapDispatchToProps(dispatch) {
|
|
@@ -191,7 +191,8 @@ _defineProperty(ItemEdit, "propTypes", {
|
|
|
191
191
|
launch_context_uuid: PropTypes.string,
|
|
192
192
|
root_account_name: PropTypes.string
|
|
193
193
|
}),
|
|
194
|
-
rootAccountUuid: PropTypes.string
|
|
194
|
+
rootAccountUuid: PropTypes.string,
|
|
195
|
+
showCalculatorOption: PropTypes.bool
|
|
195
196
|
});
|
|
196
197
|
_defineProperty(ItemEdit, "defaultProps", {
|
|
197
198
|
additionalOptions: [],
|
|
@@ -207,6 +208,7 @@ _defineProperty(ItemEdit, "defaultProps", {
|
|
|
207
208
|
initialFocusId: null,
|
|
208
209
|
validationErrorsFromApi: {},
|
|
209
210
|
scope: {},
|
|
210
|
-
rootAccountUuid: null
|
|
211
|
+
rootAccountUuid: null,
|
|
212
|
+
showCalculatorOption: true
|
|
211
213
|
});
|
|
212
214
|
export default ItemEdit;
|
|
@@ -60,7 +60,8 @@ export var propsForInteractionEdit = function propsForInteractionEdit(props, add
|
|
|
60
60
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
61
61
|
initialFocusId: props.initialFocusId,
|
|
62
62
|
calculatorType: item.calculatorType,
|
|
63
|
-
multipleHotSpotEnabled: featureOn('multiple_hotspot_selections')
|
|
63
|
+
multipleHotSpotEnabled: featureOn('multiple_hotspot_selections'),
|
|
64
|
+
showCalculatorOption: props.showCalculatorOption
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
67
|
export var propsForInteractionShow = function propsForInteractionShow(item) {
|
|
@@ -13,7 +13,7 @@ var _presenter = _interopRequireDefault(require("./presenter"));
|
|
|
13
13
|
var _makeEditable = _interopRequireDefault(require("../../../shared/functionality/makeEditable"));
|
|
14
14
|
var _modal = require("../../../../actions/modal");
|
|
15
15
|
var _ui = require("../../../../actions/ui");
|
|
16
|
-
var _ImportModal = require("
|
|
16
|
+
var _ImportModal = require("../../../ImportModal");
|
|
17
17
|
var _errorsShowing = require("../../../../actions/errorsShowing");
|
|
18
18
|
var _upload = require("../../../../actions/upload");
|
|
19
19
|
var modificationActions = _interopRequireWildcard(require("../../../../actions/modifications"));
|
|
@@ -21,10 +21,11 @@ var _alerts = require("../../../../actions/alerts");
|
|
|
21
21
|
var _items = require("../../../../../building/api/items");
|
|
22
22
|
var _quizzes = require("../../../../../building/api/quizzes");
|
|
23
23
|
var _featureCheck = require("../../../../util/featureCheck");
|
|
24
|
-
var _quizzes2 = require("
|
|
24
|
+
var _quizzes2 = require("../../../../selectors/quizzes");
|
|
25
25
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
function mapStateToProps(state, props) {
|
|
28
|
+
var _props$showCalculator;
|
|
28
29
|
// Error Related:
|
|
29
30
|
var workingItem = props.entry.getWorkingInstance();
|
|
30
31
|
var isValid = workingItem.isValid();
|
|
@@ -49,7 +50,8 @@ function mapStateToProps(state, props) {
|
|
|
49
50
|
partialScoringEnabled: (0, _featureCheck.featureOn)('partial_scoring'),
|
|
50
51
|
quizId: (0, _quizzes2.getActiveQuizId)(state),
|
|
51
52
|
scope: props.scope,
|
|
52
|
-
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid'])
|
|
53
|
+
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid']),
|
|
54
|
+
showCalculatorOption: (_props$showCalculator = props.showCalculator) !== null && _props$showCalculator !== void 0 ? _props$showCalculator : true // used by Studio team to control calculator checkbox visibility
|
|
53
55
|
};
|
|
54
56
|
}
|
|
55
57
|
function mapDispatchToProps(dispatch) {
|
|
@@ -200,7 +200,8 @@ var ItemEdit = exports.ItemEdit = /*#__PURE__*/function (_Component) {
|
|
|
200
200
|
launch_context_uuid: _propTypes["default"].string,
|
|
201
201
|
root_account_name: _propTypes["default"].string
|
|
202
202
|
}),
|
|
203
|
-
rootAccountUuid: _propTypes["default"].string
|
|
203
|
+
rootAccountUuid: _propTypes["default"].string,
|
|
204
|
+
showCalculatorOption: _propTypes["default"].bool
|
|
204
205
|
});
|
|
205
206
|
(0, _defineProperty2["default"])(ItemEdit, "defaultProps", {
|
|
206
207
|
additionalOptions: [],
|
|
@@ -216,6 +217,7 @@ var ItemEdit = exports.ItemEdit = /*#__PURE__*/function (_Component) {
|
|
|
216
217
|
initialFocusId: null,
|
|
217
218
|
validationErrorsFromApi: {},
|
|
218
219
|
scope: {},
|
|
219
|
-
rootAccountUuid: null
|
|
220
|
+
rootAccountUuid: null,
|
|
221
|
+
showCalculatorOption: true
|
|
220
222
|
});
|
|
221
223
|
var _default = exports["default"] = ItemEdit;
|
|
@@ -67,7 +67,8 @@ var propsForInteractionEdit = exports.propsForInteractionEdit = function propsFo
|
|
|
67
67
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
68
68
|
initialFocusId: props.initialFocusId,
|
|
69
69
|
calculatorType: item.calculatorType,
|
|
70
|
-
multipleHotSpotEnabled: (0, _featureCheck.featureOn)('multiple_hotspot_selections')
|
|
70
|
+
multipleHotSpotEnabled: (0, _featureCheck.featureOn)('multiple_hotspot_selections'),
|
|
71
|
+
showCalculatorOption: props.showCalculatorOption
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
74
|
var propsForInteractionShow = exports.propsForInteractionShow = function propsForInteractionShow(item) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "22.3.2-rc.
|
|
3
|
+
"version": "22.3.2-rc.8+4e08bf17b",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@instructure/emotion": "10.14.0",
|
|
47
47
|
"@instructure/grading-utils": "^1.0.0",
|
|
48
48
|
"@instructure/outcomes-ui": "3.2.3",
|
|
49
|
-
"@instructure/quiz-common": "22.3.2-rc.
|
|
50
|
-
"@instructure/quiz-i18n": "22.3.2-rc.
|
|
51
|
-
"@instructure/quiz-interactions": "22.3.2-rc.
|
|
52
|
-
"@instructure/quiz-number-input": "22.3.2-rc.
|
|
53
|
-
"@instructure/quiz-rce": "22.3.2-rc.
|
|
49
|
+
"@instructure/quiz-common": "22.3.2-rc.8+4e08bf17b",
|
|
50
|
+
"@instructure/quiz-i18n": "22.3.2-rc.8+4e08bf17b",
|
|
51
|
+
"@instructure/quiz-interactions": "22.3.2-rc.8+4e08bf17b",
|
|
52
|
+
"@instructure/quiz-number-input": "22.3.2-rc.8+4e08bf17b",
|
|
53
|
+
"@instructure/quiz-rce": "22.3.2-rc.8+4e08bf17b",
|
|
54
54
|
"@instructure/ui-a11y-content": "10.14.0",
|
|
55
55
|
"@instructure/ui-alerts": "10.14.0",
|
|
56
56
|
"@instructure/ui-avatar": "10.14.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"file-saver": "~2.0.5",
|
|
110
110
|
"humps": "^2.0.0",
|
|
111
111
|
"immutable": "^3.8.1",
|
|
112
|
-
"instructure-validations": "22.3.2-rc.
|
|
112
|
+
"instructure-validations": "22.3.2-rc.8+4e08bf17b",
|
|
113
113
|
"ipaddr.js": "^1.5.4",
|
|
114
114
|
"isomorphic-fetch": "^2.2.0",
|
|
115
115
|
"isuuid": "^0.1.0",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"jquery": "^2.2.3",
|
|
159
159
|
"karma-junit-reporter": "^2.0.1",
|
|
160
160
|
"most-subject": "^5.3.0",
|
|
161
|
-
"quiz-presets": "22.3.2-rc.
|
|
161
|
+
"quiz-presets": "22.3.2-rc.8+4e08bf17b",
|
|
162
162
|
"react": "^16.8.6",
|
|
163
163
|
"react-addons-test-utils": "^15.6.2",
|
|
164
164
|
"react-dom": "^16.8.6",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"publishConfig": {
|
|
175
175
|
"access": "public"
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "4e08bf17bdefe18ceda404737bb19b5241f47954"
|
|
178
178
|
}
|