@instructure/quiz-core 20.18.0 → 20.18.1-rc.0

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.
@@ -9,7 +9,7 @@ import { archiveBankEntry } from "../../common/actions/bankEntries.js";
9
9
  import { getBank } from "./banks.js";
10
10
  import { handleError } from "../../common/api/helpers.js";
11
11
  import get from 'lodash/get';
12
- import { BANKS_BANK_ENTRY_PAGINATION, GET_BANK_ENTRIES_CALL, GET_BANK_ENTRY_CALL, UPDATE_BANK_ENTRY_CALL, CREATE_BANK_ENTRY_CALL, REMOVE_BANK_ENTRY_CALL } from '@instructure/quiz-common';
12
+ import { BANKS_BANK_ENTRY_PAGINATION, GET_BANK_ENTRIES_CALL, GET_BANK_ENTRY_CALL, UPDATE_BANK_ENTRY_CALL, CREATE_BANK_ENTRY_CALL, COPY_BANK_ENTRY_CALL, REMOVE_BANK_ENTRY_CALL } from '@instructure/quiz-common';
13
13
  import t from '@instructure/quiz-i18n/es/format-message';
14
14
  export var getBankEntries = function getBankEntries(bankId, useBankSearch) {
15
15
  var params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
@@ -98,6 +98,50 @@ export var createEntryAndBankEntry = function createEntryAndBankEntry(bankId, en
98
98
  });
99
99
  };
100
100
  };
101
+ export var moveBankEntryFromQuizEntry = function moveBankEntryFromQuizEntry(sourceQuizId, sourceEntryId, sourceEntryType, destinationBankId) {
102
+ var body = {
103
+ source_entry_id: sourceEntryId,
104
+ source_entry_type: sourceEntryType
105
+ };
106
+ var query_params = {
107
+ source_quiz_id: sourceQuizId
108
+ };
109
+ return copyOrMoveBankEntry(body, destinationBankId, 'move_from_quiz_entry', query_params);
110
+ };
111
+ export var copyBankEntry = function copyBankEntry(sourceBankId, bankEntryId, destinationBankId) {
112
+ var body = {
113
+ source_bank_id: sourceBankId,
114
+ source_bank_entry_id: bankEntryId
115
+ };
116
+ return copyOrMoveBankEntry(body, destinationBankId, 'copy');
117
+ };
118
+ export var moveBankEntry = function moveBankEntry(sourceBankId, bankEntryId, destinationBankId) {
119
+ var body = {
120
+ source_bank_id: sourceBankId,
121
+ source_bank_entry_id: bankEntryId
122
+ };
123
+ return copyOrMoveBankEntry(body, destinationBankId, 'move');
124
+ };
125
+ export var copyOrMoveBankEntry = function copyOrMoveBankEntry(body, destinationBankId, operation, query_params) {
126
+ var url = "/api/banks/".concat(destinationBankId, "/bank_entries/").concat(operation);
127
+ return function (dispatch, getState) {
128
+ var fetcher = new Fetcher({
129
+ callType: COPY_BANK_ENTRY_CALL,
130
+ onError: handleError(dispatch, t('Failed to copy bank entry.'))
131
+ });
132
+
133
+ if (query_params) {
134
+ url = fetcher.appendQueryParams(url, query_params);
135
+ }
136
+
137
+ return fetcher.post(url, {
138
+ body: JSON.stringify(body)
139
+ }).then(function (response) {
140
+ dispatch([handleBankEntryResponse(response), associateEntries(destinationBankId, [response.id]), getBank(destinationBankId)]);
141
+ return response;
142
+ });
143
+ };
144
+ };
101
145
  export var createBankEntry = function createBankEntry(bankId, entryType, entryId) {
102
146
  var url = "/api/banks/".concat(bankId, "/bank_entries");
103
147
  return function (dispatch, getState) {
@@ -1,6 +1,6 @@
1
1
  import { connect } from "../../../common/react-redux.js";
2
2
  import { createBank } from "../../api/banks.js";
3
- import { createBankEntry } from "../../api/bankEntries.js";
3
+ import { createBankEntry, moveBankEntryFromQuizEntry } from "../../api/bankEntries.js";
4
4
  import { checkItemShareability } from "../../../building/api/items.js";
5
5
  import { checkStimulusShareability } from "../../../building/api/stimuli.js";
6
6
  import AddToBankModal from "./presenter.js";
@@ -27,6 +27,7 @@ var mapDispatchToProps = {
27
27
  closeModal: modalActions.closeModal,
28
28
  createBank: createBank,
29
29
  createBankEntry: createBankEntry,
30
+ moveBankEntryFromQuizEntry: moveBankEntryFromQuizEntry,
30
31
  disassociateBankEntry: disassociateEntry,
31
32
  uiSet: uiActions.set
32
33
  };
@@ -21,6 +21,7 @@ import { View } from '@instructure/ui-view';
21
21
  import { Flex } from '@instructure/ui-flex';
22
22
  import t from '@instructure/quiz-i18n/es/format-message';
23
23
  import { Modal, ModalHeader, ModalBody, ModalFooter, ADD_TO_BANK_MODAL_BANK_SELECTION, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
24
+ import { featureOn } from "../../../common/util/featureCheck.js";
24
25
 
25
26
  var _ref2 = /*#__PURE__*/React.createElement(IconCheckLine, {
26
27
  color: "success"
@@ -60,9 +61,17 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
60
61
  newBankTitle: ''
61
62
  };
62
63
 
64
+ _this.copyBankEntry = function (entryId, bankId) {
65
+ if (featureOn('instfs_bank_entry_movement_endpoints')) {
66
+ return _this.props.moveBankEntryFromQuizEntry(_this.props.quizId, entryId, _this.props.entryType, bankId);
67
+ } else {
68
+ return _this.props.createBankEntry(bankId, _this.props.entryType, entryId);
69
+ }
70
+ };
71
+
63
72
  _this.addToBank = function (bankId) {
64
73
  _this.props.getEntry().then(function (entry) {
65
- return _this.props.createBankEntry(bankId, _this.props.entryType, entry.id);
74
+ return _this.copyBankEntry(entry.id, bankId);
66
75
  }).then(_this.props.onAdd).catch(function (e) {
67
76
  if (e.validationErrorsFromApi) {
68
77
  // Close the modal so the user can view the input validation errors and correct them
@@ -301,6 +310,7 @@ AddToBankModal.propTypes = {
301
310
  checkContentShareability: PropTypes.func.isRequired,
302
311
  closeModal: PropTypes.func.isRequired,
303
312
  createBank: PropTypes.func.isRequired,
313
+ moveBankEntryFromQuizEntry: PropTypes.func.isRequired,
304
314
  createBankEntry: PropTypes.func.isRequired,
305
315
  // Create the bank entry's entry, or clone it if it already exists. Should
306
316
  // always be provided when a source is provided.
@@ -318,7 +328,8 @@ AddToBankModal.propTypes = {
318
328
  onContinue: PropTypes.func,
319
329
  selectedBank: ImmutablePropTypes.record,
320
330
  uiSet: PropTypes.func.isRequired,
321
- workingEntry: ImmutablePropTypes.record.isRequired
331
+ workingEntry: ImmutablePropTypes.record.isRequired,
332
+ quizId: PropTypes.string.isRequired
322
333
  };
323
334
  AddToBankModal.defaultProps = {
324
335
  canvasOrigin: '',
@@ -1,6 +1,6 @@
1
1
  import { connect } from "../../../common/react-redux.js";
2
2
  import { createBank } from "../../api/banks.js";
3
- import { createBankEntry, updateBankEntry } from "../../api/bankEntries.js";
3
+ import { createBankEntry, updateBankEntry, moveBankEntry, copyBankEntry } from "../../api/bankEntries.js";
4
4
  import CopyMoveBankModal from "./presenter.js";
5
5
  import * as modalActions from "../../../common/actions/modal.js";
6
6
  import { disassociateEntry } from "../../../common/actions/banks.js";
@@ -22,8 +22,10 @@ export function mapStateToProps(state, props) {
22
22
  var mapDispatchToProps = {
23
23
  closeModal: modalActions.closeModal,
24
24
  createBank: createBank,
25
+ copyBankEntry: copyBankEntry,
25
26
  createBankEntry: createBankEntry,
26
27
  updateBankEntry: updateBankEntry,
28
+ moveBankEntry: moveBankEntry,
27
29
  disassociateBankEntry: disassociateEntry,
28
30
  uiSet: uiActions.set
29
31
  };
@@ -15,6 +15,7 @@ import t from '@instructure/quiz-i18n/es/format-message';
15
15
  import Bank from "../../../common/records/Bank.js";
16
16
  import BankSelection from "../../../common/components/resources/BankSelection/index.js";
17
17
  import { Modal, ModalHeader, ModalBody, ModalFooter, COPY_MOVE_BANK_ENTRY_MODAL_BANK_SELECTION, COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
18
+ import { featureOn } from "../../../common/util/featureCheck.js";
18
19
 
19
20
  var _ref = /*#__PURE__*/React.createElement("br", null);
20
21
 
@@ -65,20 +66,36 @@ export var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
65
66
  }
66
67
  };
67
68
 
69
+ _this.initiateMove = function (newBankId) {
70
+ if (featureOn('instfs_bank_entry_movement_endpoints')) {
71
+ return _this.props.moveBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, newBankId);
72
+ } else {
73
+ return _this.props.updateBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, {
74
+ bankId: newBankId
75
+ });
76
+ }
77
+ };
78
+
68
79
  _this.moveBankEntry = function (newBankId) {
69
- return _this.props.updateBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, {
70
- bankId: newBankId
71
- }).then(function (bankEntry) {
80
+ return _this.initiateMove(newBankId).then(function (bankEntry) {
72
81
  _this.props.disassociateBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId);
73
82
 
74
83
  return bankEntry;
75
84
  }).then(_this.props.onAdd);
76
85
  };
77
86
 
87
+ _this.initiateCopy = function (newBankId) {
88
+ if (featureOn('instfs_bank_entry_movement_endpoints')) {
89
+ return _this.props.copyBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, newBankId);
90
+ } else {
91
+ return _this.props.createEntry().then(function (entry) {
92
+ return _this.props.createBankEntry(newBankId, _this.props.entryType, entry.id);
93
+ });
94
+ }
95
+ };
96
+
78
97
  _this.copyBankEntry = function (newBankId) {
79
- return _this.props.createEntry().then(function (entry) {
80
- return _this.props.createBankEntry(newBankId, _this.props.entryType, entry.id);
81
- }).then(_this.props.onAdd);
98
+ return _this.initiateCopy(newBankId).then(_this.props.onAdd);
82
99
  };
83
100
 
84
101
  _this.closeAction = function () {
@@ -202,6 +219,7 @@ export var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
202
219
  CopyMoveBankEntryModal.propTypes = {
203
220
  closeModal: PropTypes.func.isRequired,
204
221
  createBank: PropTypes.func.isRequired,
222
+ copyBankEntry: PropTypes.func.isRequired,
205
223
  createBankEntry: PropTypes.func.isRequired,
206
224
  // Create the bank entry's entry, or clone it if it already exists. Should
207
225
  // always be provided when a source is provided.
@@ -221,7 +239,8 @@ CopyMoveBankEntryModal.propTypes = {
221
239
  sourceBankEntryId: PropTypes.string.isRequired,
222
240
  sourceBankId: PropTypes.string.isRequired,
223
241
  uiSet: PropTypes.func.isRequired,
224
- updateBankEntry: PropTypes.func.isRequired
242
+ updateBankEntry: PropTypes.func.isRequired,
243
+ moveBankEntry: PropTypes.func.isRequired
225
244
  };
226
245
  CopyMoveBankEntryModal.contextTypes = {
227
246
  locale: PropTypes.string
@@ -394,6 +394,7 @@ var QuizEntryEdit = (_dec = withStyle(generateStyle, generateComponentTheme), _d
394
394
  workingEntry: this.props.workingEntry,
395
395
  entryId: this.props.guid,
396
396
  entryType: this.props.quizEntry.entryType,
397
+ quizId: this.props.quizId,
397
398
  handleValidationErrorsFromApi: this.props.handleValidationErrorsFromApi
398
399
  });
399
400
  }
@@ -382,6 +382,7 @@ export var StimulusEdit = (_dec = withStyle(generateStyle, generateComponentThem
382
382
  onContinue: this.handleAddToBankContinue,
383
383
  getEntry: this.getEntryForBank,
384
384
  workingEntry: this.props.workingStimulus,
385
+ quizId: this.props.quizId,
385
386
  entryId: this.props.guid,
386
387
  entryType: this.props.quizEntry.entryType
387
388
  });
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.removeBankEntry = exports.updateBankEntry = exports.createBankEntry = exports.createEntryAndBankEntry = exports.cloneBankEntry = exports.getBankEntry = exports.getBankEntries = void 0;
8
+ exports.removeBankEntry = exports.updateBankEntry = exports.createBankEntry = exports.copyOrMoveBankEntry = exports.moveBankEntry = exports.copyBankEntry = exports.moveBankEntryFromQuizEntry = exports.createEntryAndBankEntry = exports.cloneBankEntry = exports.getBankEntry = exports.getBankEntries = void 0;
9
9
 
10
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
11
 
@@ -132,6 +132,62 @@ var createEntryAndBankEntry = function createEntryAndBankEntry(bankId, entry, ba
132
132
 
133
133
  exports.createEntryAndBankEntry = createEntryAndBankEntry;
134
134
 
135
+ var moveBankEntryFromQuizEntry = function moveBankEntryFromQuizEntry(sourceQuizId, sourceEntryId, sourceEntryType, destinationBankId) {
136
+ var body = {
137
+ source_entry_id: sourceEntryId,
138
+ source_entry_type: sourceEntryType
139
+ };
140
+ var query_params = {
141
+ source_quiz_id: sourceQuizId
142
+ };
143
+ return copyOrMoveBankEntry(body, destinationBankId, 'move_from_quiz_entry', query_params);
144
+ };
145
+
146
+ exports.moveBankEntryFromQuizEntry = moveBankEntryFromQuizEntry;
147
+
148
+ var copyBankEntry = function copyBankEntry(sourceBankId, bankEntryId, destinationBankId) {
149
+ var body = {
150
+ source_bank_id: sourceBankId,
151
+ source_bank_entry_id: bankEntryId
152
+ };
153
+ return copyOrMoveBankEntry(body, destinationBankId, 'copy');
154
+ };
155
+
156
+ exports.copyBankEntry = copyBankEntry;
157
+
158
+ var moveBankEntry = function moveBankEntry(sourceBankId, bankEntryId, destinationBankId) {
159
+ var body = {
160
+ source_bank_id: sourceBankId,
161
+ source_bank_entry_id: bankEntryId
162
+ };
163
+ return copyOrMoveBankEntry(body, destinationBankId, 'move');
164
+ };
165
+
166
+ exports.moveBankEntry = moveBankEntry;
167
+
168
+ var copyOrMoveBankEntry = function copyOrMoveBankEntry(body, destinationBankId, operation, query_params) {
169
+ var url = "/api/banks/".concat(destinationBankId, "/bank_entries/").concat(operation);
170
+ return function (dispatch, getState) {
171
+ var fetcher = new _Fetcher.default({
172
+ callType: _quizCommon.COPY_BANK_ENTRY_CALL,
173
+ onError: (0, _helpers.handleError)(dispatch, (0, _formatMessage.default)('Failed to copy bank entry.'))
174
+ });
175
+
176
+ if (query_params) {
177
+ url = fetcher.appendQueryParams(url, query_params);
178
+ }
179
+
180
+ return fetcher.post(url, {
181
+ body: JSON.stringify(body)
182
+ }).then(function (response) {
183
+ dispatch([(0, _callHandlers.handleBankEntryResponse)(response), (0, _banks.associateEntries)(destinationBankId, [response.id]), (0, _banks2.getBank)(destinationBankId)]);
184
+ return response;
185
+ });
186
+ };
187
+ };
188
+
189
+ exports.copyOrMoveBankEntry = copyOrMoveBankEntry;
190
+
135
191
  var createBankEntry = function createBankEntry(bankId, entryType, entryId) {
136
192
  var url = "/api/banks/".concat(bankId, "/bank_entries");
137
193
  return function (dispatch, getState) {
@@ -53,6 +53,7 @@ var mapDispatchToProps = {
53
53
  closeModal: modalActions.closeModal,
54
54
  createBank: _banks.createBank,
55
55
  createBankEntry: _bankEntries.createBankEntry,
56
+ moveBankEntryFromQuizEntry: _bankEntries.moveBankEntryFromQuizEntry,
56
57
  disassociateBankEntry: _banks2.disassociateEntry,
57
58
  uiSet: uiActions.set
58
59
  };
@@ -55,6 +55,8 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
55
55
 
56
56
  var _quizCommon = require("@instructure/quiz-common");
57
57
 
58
+ var _featureCheck = require("../../../common/util/featureCheck.js");
59
+
58
60
  var _ref2 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconCheckLine, {
59
61
  color: "success"
60
62
  });
@@ -93,9 +95,17 @@ var AddToBankModal = /*#__PURE__*/function (_Component) {
93
95
  newBankTitle: ''
94
96
  };
95
97
 
98
+ _this.copyBankEntry = function (entryId, bankId) {
99
+ if ((0, _featureCheck.featureOn)('instfs_bank_entry_movement_endpoints')) {
100
+ return _this.props.moveBankEntryFromQuizEntry(_this.props.quizId, entryId, _this.props.entryType, bankId);
101
+ } else {
102
+ return _this.props.createBankEntry(bankId, _this.props.entryType, entryId);
103
+ }
104
+ };
105
+
96
106
  _this.addToBank = function (bankId) {
97
107
  _this.props.getEntry().then(function (entry) {
98
- return _this.props.createBankEntry(bankId, _this.props.entryType, entry.id);
108
+ return _this.copyBankEntry(entry.id, bankId);
99
109
  }).then(_this.props.onAdd).catch(function (e) {
100
110
  if (e.validationErrorsFromApi) {
101
111
  // Close the modal so the user can view the input validation errors and correct them
@@ -335,6 +345,7 @@ AddToBankModal.propTypes = {
335
345
  checkContentShareability: _propTypes.default.func.isRequired,
336
346
  closeModal: _propTypes.default.func.isRequired,
337
347
  createBank: _propTypes.default.func.isRequired,
348
+ moveBankEntryFromQuizEntry: _propTypes.default.func.isRequired,
338
349
  createBankEntry: _propTypes.default.func.isRequired,
339
350
  // Create the bank entry's entry, or clone it if it already exists. Should
340
351
  // always be provided when a source is provided.
@@ -352,7 +363,8 @@ AddToBankModal.propTypes = {
352
363
  onContinue: _propTypes.default.func,
353
364
  selectedBank: _reactImmutableProptypes.default.record,
354
365
  uiSet: _propTypes.default.func.isRequired,
355
- workingEntry: _reactImmutableProptypes.default.record.isRequired
366
+ workingEntry: _reactImmutableProptypes.default.record.isRequired,
367
+ quizId: _propTypes.default.string.isRequired
356
368
  };
357
369
  AddToBankModal.defaultProps = {
358
370
  canvasOrigin: '',
@@ -45,8 +45,10 @@ function mapStateToProps(state, props) {
45
45
  var mapDispatchToProps = {
46
46
  closeModal: modalActions.closeModal,
47
47
  createBank: _banks.createBank,
48
+ copyBankEntry: _bankEntries.copyBankEntry,
48
49
  createBankEntry: _bankEntries.createBankEntry,
49
50
  updateBankEntry: _bankEntries.updateBankEntry,
51
+ moveBankEntry: _bankEntries.moveBankEntry,
50
52
  disassociateBankEntry: _banks2.disassociateEntry,
51
53
  uiSet: uiActions.set
52
54
  };
@@ -43,6 +43,8 @@ var _index = _interopRequireDefault(require("../../../common/components/resource
43
43
 
44
44
  var _quizCommon = require("@instructure/quiz-common");
45
45
 
46
+ var _featureCheck = require("../../../common/util/featureCheck.js");
47
+
46
48
  var _ref = /*#__PURE__*/_react.default.createElement("br", null);
47
49
 
48
50
  var _ref2 = /*#__PURE__*/_react.default.createElement("br", null);
@@ -92,20 +94,36 @@ var CopyMoveBankEntryModal = /*#__PURE__*/function (_Component) {
92
94
  }
93
95
  };
94
96
 
97
+ _this.initiateMove = function (newBankId) {
98
+ if ((0, _featureCheck.featureOn)('instfs_bank_entry_movement_endpoints')) {
99
+ return _this.props.moveBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, newBankId);
100
+ } else {
101
+ return _this.props.updateBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, {
102
+ bankId: newBankId
103
+ });
104
+ }
105
+ };
106
+
95
107
  _this.moveBankEntry = function (newBankId) {
96
- return _this.props.updateBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, {
97
- bankId: newBankId
98
- }).then(function (bankEntry) {
108
+ return _this.initiateMove(newBankId).then(function (bankEntry) {
99
109
  _this.props.disassociateBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId);
100
110
 
101
111
  return bankEntry;
102
112
  }).then(_this.props.onAdd);
103
113
  };
104
114
 
115
+ _this.initiateCopy = function (newBankId) {
116
+ if ((0, _featureCheck.featureOn)('instfs_bank_entry_movement_endpoints')) {
117
+ return _this.props.copyBankEntry(_this.props.sourceBankId, _this.props.sourceBankEntryId, newBankId);
118
+ } else {
119
+ return _this.props.createEntry().then(function (entry) {
120
+ return _this.props.createBankEntry(newBankId, _this.props.entryType, entry.id);
121
+ });
122
+ }
123
+ };
124
+
105
125
  _this.copyBankEntry = function (newBankId) {
106
- return _this.props.createEntry().then(function (entry) {
107
- return _this.props.createBankEntry(newBankId, _this.props.entryType, entry.id);
108
- }).then(_this.props.onAdd);
126
+ return _this.initiateCopy(newBankId).then(_this.props.onAdd);
109
127
  };
110
128
 
111
129
  _this.closeAction = function () {
@@ -230,6 +248,7 @@ exports.CopyMoveBankEntryModal = CopyMoveBankEntryModal;
230
248
  CopyMoveBankEntryModal.propTypes = {
231
249
  closeModal: _propTypes.default.func.isRequired,
232
250
  createBank: _propTypes.default.func.isRequired,
251
+ copyBankEntry: _propTypes.default.func.isRequired,
233
252
  createBankEntry: _propTypes.default.func.isRequired,
234
253
  // Create the bank entry's entry, or clone it if it already exists. Should
235
254
  // always be provided when a source is provided.
@@ -249,7 +268,8 @@ CopyMoveBankEntryModal.propTypes = {
249
268
  sourceBankEntryId: _propTypes.default.string.isRequired,
250
269
  sourceBankId: _propTypes.default.string.isRequired,
251
270
  uiSet: _propTypes.default.func.isRequired,
252
- updateBankEntry: _propTypes.default.func.isRequired
271
+ updateBankEntry: _propTypes.default.func.isRequired,
272
+ moveBankEntry: _propTypes.default.func.isRequired
253
273
  };
254
274
  CopyMoveBankEntryModal.contextTypes = {
255
275
  locale: _propTypes.default.string
@@ -426,6 +426,7 @@ var QuizEntryEdit = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defa
426
426
  workingEntry: this.props.workingEntry,
427
427
  entryId: this.props.guid,
428
428
  entryType: this.props.quizEntry.entryType,
429
+ quizId: this.props.quizId,
429
430
  handleValidationErrorsFromApi: this.props.handleValidationErrorsFromApi
430
431
  });
431
432
  }
@@ -419,6 +419,7 @@ var StimulusEdit = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defau
419
419
  onContinue: this.handleAddToBankContinue,
420
420
  getEntry: this.getEntryForBank,
421
421
  workingEntry: this.props.workingStimulus,
422
+ quizId: this.props.quizId,
422
423
  entryId: this.props.guid,
423
424
  entryType: this.props.quizEntry.entryType
424
425
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.18.0",
3
+ "version": "20.18.1-rc.0+392e66e66",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -44,11 +44,11 @@
44
44
  "@instructure/emotion": "^8.51.0",
45
45
  "@instructure/grading-utils": "^1.0.0",
46
46
  "@instructure/outcomes-ui": "^3.2.2",
47
- "@instructure/quiz-common": "^20.18.0",
48
- "@instructure/quiz-i18n": "^20.18.0",
49
- "@instructure/quiz-interactions": "^20.18.0",
50
- "@instructure/quiz-number-input": "^20.18.0",
51
- "@instructure/quiz-rce": "^20.18.0",
47
+ "@instructure/quiz-common": "20.18.1-rc.0+392e66e66",
48
+ "@instructure/quiz-i18n": "20.18.1-rc.0+392e66e66",
49
+ "@instructure/quiz-interactions": "20.18.1-rc.0+392e66e66",
50
+ "@instructure/quiz-number-input": "20.18.1-rc.0+392e66e66",
51
+ "@instructure/quiz-rce": "20.18.1-rc.0+392e66e66",
52
52
  "@instructure/ui-a11y-content": "^8.51.0",
53
53
  "@instructure/ui-alerts": "^8.51.0",
54
54
  "@instructure/ui-avatar": "^8.51.0",
@@ -111,7 +111,7 @@
111
111
  "file-saver": "~2.0.5",
112
112
  "humps": "^2.0.0",
113
113
  "immutable": "^3.8.1",
114
- "instructure-validations": "^20.18.0",
114
+ "instructure-validations": "20.18.1-rc.0+392e66e66",
115
115
  "ipaddr.js": "^1.5.4",
116
116
  "isomorphic-fetch": "^2.2.0",
117
117
  "isuuid": "^0.1.0",
@@ -142,7 +142,7 @@
142
142
  "uuid": "^3.2.1"
143
143
  },
144
144
  "devDependencies": {
145
- "@instructure/quiz-scripts": "^20.18.0",
145
+ "@instructure/quiz-scripts": "20.18.0",
146
146
  "@instructure/ui-axe-check": "^8.51.0",
147
147
  "@instructure/ui-babel-preset": "^7.22.1",
148
148
  "@instructure/ui-scripts": "^7.22.1",
@@ -161,7 +161,7 @@
161
161
  "jquery": "^2.2.3",
162
162
  "karma-junit-reporter": "^2.0.1",
163
163
  "most-subject": "^5.3.0",
164
- "quiz-presets": "^20.18.0",
164
+ "quiz-presets": "20.18.1-rc.0+392e66e66",
165
165
  "react": "^16.8.6",
166
166
  "react-addons-test-utils": "^15.6.2",
167
167
  "react-dom": "^16.8.6",
@@ -177,5 +177,5 @@
177
177
  "publishConfig": {
178
178
  "access": "public"
179
179
  },
180
- "gitHead": "912c7147e9aa9aaca1ec571cbb2afb0f28023a6c"
180
+ "gitHead": "392e66e66be84e073171f29b85edaf54330b3b8f"
181
181
  }