@instructure/quiz-core 22.5.1-rc.1 → 22.5.1-rc.3
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/BankEntry/presenter.js +4 -6
- package/es/banks/components/BankEntryRow/presenter.js +4 -6
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +1 -0
- package/es/common/records/BankEntry.js +14 -0
- package/es/common/util/warningHelpers.js +2 -7
- package/lib/banks/components/BankEntry/presenter.js +4 -6
- package/lib/banks/components/BankEntryRow/presenter.js +4 -6
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +1 -0
- package/lib/common/records/BankEntry.js +14 -0
- package/lib/common/util/warningHelpers.js +2 -7
- package/package.json +9 -9
|
@@ -251,16 +251,14 @@ export var BankEntry = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
251
251
|
}, {
|
|
252
252
|
key: "isStimulusEntry",
|
|
253
253
|
value: function isStimulusEntry() {
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
return entry.isStimulus && !entry.isPassage;
|
|
254
|
+
var _this$props$bankEntry;
|
|
255
|
+
return (_this$props$bankEntry = this.props.bankEntry) === null || _this$props$bankEntry === void 0 ? void 0 : _this$props$bankEntry.isStimulusEntry;
|
|
257
256
|
}
|
|
258
257
|
}, {
|
|
259
258
|
key: "isPassageEntry",
|
|
260
259
|
value: function isPassageEntry() {
|
|
261
|
-
var
|
|
262
|
-
|
|
263
|
-
return entry.isStimulus && entry.isPassage;
|
|
260
|
+
var _this$props$bankEntry2;
|
|
261
|
+
return (_this$props$bankEntry2 = this.props.bankEntry) === null || _this$props$bankEntry2 === void 0 ? void 0 : _this$props$bankEntry2.isPassageEntry;
|
|
264
262
|
}
|
|
265
263
|
}, {
|
|
266
264
|
key: "getEditWarning",
|
|
@@ -154,16 +154,14 @@ export var BankEntryRow = (_dec = withStyleOverrides(generateStyle, generateComp
|
|
|
154
154
|
}, {
|
|
155
155
|
key: "isStimulusEntry",
|
|
156
156
|
value: function isStimulusEntry() {
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
return entry.isStimulus && !entry.isPassage;
|
|
157
|
+
var _this$props$bankEntry;
|
|
158
|
+
return (_this$props$bankEntry = this.props.bankEntry) === null || _this$props$bankEntry === void 0 ? void 0 : _this$props$bankEntry.isStimulusEntry;
|
|
160
159
|
}
|
|
161
160
|
}, {
|
|
162
161
|
key: "isPassageEntry",
|
|
163
162
|
value: function isPassageEntry() {
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
return entry.isStimulus && entry.isPassage;
|
|
163
|
+
var _this$props$bankEntry2;
|
|
164
|
+
return (_this$props$bankEntry2 = this.props.bankEntry) === null || _this$props$bankEntry2 === void 0 ? void 0 : _this$props$bankEntry2.isPassageEntry;
|
|
167
165
|
}
|
|
168
166
|
}, {
|
|
169
167
|
key: "type",
|
|
@@ -166,6 +166,7 @@ export var StimulusEditInfo = (_dec = withStyleOverrides(generateStyle, generate
|
|
|
166
166
|
var automationPrefix = stimulus.passage ? 'text-block' : 'stimulus';
|
|
167
167
|
var message = stimulus.passage ? t('Edit Text Block') : t('Edit Stimulus');
|
|
168
168
|
return jsx(FormFieldGroup, {
|
|
169
|
+
"data-automation": "stimulus-edit-info",
|
|
169
170
|
messages: this.inputErrors('onSelf'),
|
|
170
171
|
description: jsx(ScreenReaderContent, null, message)
|
|
171
172
|
}, jsx(Heading, {
|
|
@@ -77,6 +77,20 @@ export var BankEntry = /*#__PURE__*/function (_ReduxRecord) {
|
|
|
77
77
|
if (!this.isStimulus) return false;
|
|
78
78
|
return (_this$getEntry2 = this.getEntry()) === null || _this$getEntry2 === void 0 ? void 0 : _this$getEntry2.isPassage;
|
|
79
79
|
}
|
|
80
|
+
}, {
|
|
81
|
+
key: "isStimulusEntry",
|
|
82
|
+
get: function get() {
|
|
83
|
+
var entry = this.getEntry();
|
|
84
|
+
if (!entry) return false;
|
|
85
|
+
return entry.isStimulus && !entry.isPassage;
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "isPassageEntry",
|
|
89
|
+
get: function get() {
|
|
90
|
+
var entry = this.getEntry();
|
|
91
|
+
if (!entry) return false;
|
|
92
|
+
return entry.isStimulus && entry.isPassage;
|
|
93
|
+
}
|
|
80
94
|
}]);
|
|
81
95
|
}(ReduxRecord({
|
|
82
96
|
id: '0',
|
|
@@ -48,13 +48,8 @@ export var propsForStimulusVersioningWrapper = function propsForStimulusVersioni
|
|
|
48
48
|
}
|
|
49
49
|
var isPassage = args[args.length - 1];
|
|
50
50
|
var restArgs = args.slice(0, -1);
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
itemName: itemName
|
|
54
|
-
});
|
|
55
|
-
var content = t('You can apply your edits to a copy of this {itemName}' + ' which will only be seen by students that have not taken the assessment.' + ' Attached questions will be copied as well.', {
|
|
56
|
-
itemName: itemName
|
|
57
|
-
});
|
|
51
|
+
var title = isPassage ? t('Some students have already submitted answers for this text block!') : t('Some students have already submitted answers for this stimulus!');
|
|
52
|
+
var content = isPassage ? t('You can apply your edits to a copy of this text block' + ' which will only be seen by students that have not taken the assessment.' + ' Attached questions will be copied as well.') : t('You can apply your edits to a copy of this stimulus' + ' which will only be seen by students that have not taken the assessment.' + ' Attached questions will be copied as well.');
|
|
58
53
|
return propsForVersioningWrapper.apply(void 0, [/*#__PURE__*/React.createElement(Text, {
|
|
59
54
|
color: "primary"
|
|
60
55
|
}, /*#__PURE__*/React.createElement("b", null, t('Editing a copy.')), "\xA0", t('Statistics from this new copy will appear separate from the previous version.')), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -258,16 +258,14 @@ var BankEntry = exports.BankEntry = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
258
258
|
}, {
|
|
259
259
|
key: "isStimulusEntry",
|
|
260
260
|
value: function isStimulusEntry() {
|
|
261
|
-
var
|
|
262
|
-
|
|
263
|
-
return entry.isStimulus && !entry.isPassage;
|
|
261
|
+
var _this$props$bankEntry;
|
|
262
|
+
return (_this$props$bankEntry = this.props.bankEntry) === null || _this$props$bankEntry === void 0 ? void 0 : _this$props$bankEntry.isStimulusEntry;
|
|
264
263
|
}
|
|
265
264
|
}, {
|
|
266
265
|
key: "isPassageEntry",
|
|
267
266
|
value: function isPassageEntry() {
|
|
268
|
-
var
|
|
269
|
-
|
|
270
|
-
return entry.isStimulus && entry.isPassage;
|
|
267
|
+
var _this$props$bankEntry2;
|
|
268
|
+
return (_this$props$bankEntry2 = this.props.bankEntry) === null || _this$props$bankEntry2 === void 0 ? void 0 : _this$props$bankEntry2.isPassageEntry;
|
|
271
269
|
}
|
|
272
270
|
}, {
|
|
273
271
|
key: "getEditWarning",
|
|
@@ -163,16 +163,14 @@ var BankEntryRow = exports.BankEntryRow = (_dec = (0, _quizCommon.withStyleOverr
|
|
|
163
163
|
}, {
|
|
164
164
|
key: "isStimulusEntry",
|
|
165
165
|
value: function isStimulusEntry() {
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
return entry.isStimulus && !entry.isPassage;
|
|
166
|
+
var _this$props$bankEntry;
|
|
167
|
+
return (_this$props$bankEntry = this.props.bankEntry) === null || _this$props$bankEntry === void 0 ? void 0 : _this$props$bankEntry.isStimulusEntry;
|
|
169
168
|
}
|
|
170
169
|
}, {
|
|
171
170
|
key: "isPassageEntry",
|
|
172
171
|
value: function isPassageEntry() {
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
return entry.isStimulus && entry.isPassage;
|
|
172
|
+
var _this$props$bankEntry2;
|
|
173
|
+
return (_this$props$bankEntry2 = this.props.bankEntry) === null || _this$props$bankEntry2 === void 0 ? void 0 : _this$props$bankEntry2.isPassageEntry;
|
|
176
174
|
}
|
|
177
175
|
}, {
|
|
178
176
|
key: "type",
|
|
@@ -173,6 +173,7 @@ var StimulusEditInfo = exports.StimulusEditInfo = (_dec = (0, _quizCommon.withSt
|
|
|
173
173
|
var automationPrefix = stimulus.passage ? 'text-block' : 'stimulus';
|
|
174
174
|
var message = stimulus.passage ? (0, _formatMessage["default"])('Edit Text Block') : (0, _formatMessage["default"])('Edit Stimulus');
|
|
175
175
|
return (0, _emotion.jsx)(_quizCommon.FormFieldGroup, {
|
|
176
|
+
"data-automation": "stimulus-edit-info",
|
|
176
177
|
messages: this.inputErrors('onSelf'),
|
|
177
178
|
description: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, message)
|
|
178
179
|
}, (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
@@ -84,6 +84,20 @@ var BankEntry = exports.BankEntry = /*#__PURE__*/function (_ReduxRecord) {
|
|
|
84
84
|
if (!this.isStimulus) return false;
|
|
85
85
|
return (_this$getEntry2 = this.getEntry()) === null || _this$getEntry2 === void 0 ? void 0 : _this$getEntry2.isPassage;
|
|
86
86
|
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "isStimulusEntry",
|
|
89
|
+
get: function get() {
|
|
90
|
+
var entry = this.getEntry();
|
|
91
|
+
if (!entry) return false;
|
|
92
|
+
return entry.isStimulus && !entry.isPassage;
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
key: "isPassageEntry",
|
|
96
|
+
get: function get() {
|
|
97
|
+
var entry = this.getEntry();
|
|
98
|
+
if (!entry) return false;
|
|
99
|
+
return entry.isStimulus && entry.isPassage;
|
|
100
|
+
}
|
|
87
101
|
}]);
|
|
88
102
|
}((0, _reduxRecord["default"])({
|
|
89
103
|
id: '0',
|
|
@@ -55,13 +55,8 @@ var propsForStimulusVersioningWrapper = exports.propsForStimulusVersioningWrappe
|
|
|
55
55
|
}
|
|
56
56
|
var isPassage = args[args.length - 1];
|
|
57
57
|
var restArgs = args.slice(0, -1);
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
itemName: itemName
|
|
61
|
-
});
|
|
62
|
-
var content = (0, _formatMessage["default"])('You can apply your edits to a copy of this {itemName}' + ' which will only be seen by students that have not taken the assessment.' + ' Attached questions will be copied as well.', {
|
|
63
|
-
itemName: itemName
|
|
64
|
-
});
|
|
58
|
+
var title = isPassage ? (0, _formatMessage["default"])('Some students have already submitted answers for this text block!') : (0, _formatMessage["default"])('Some students have already submitted answers for this stimulus!');
|
|
59
|
+
var content = isPassage ? (0, _formatMessage["default"])('You can apply your edits to a copy of this text block' + ' which will only be seen by students that have not taken the assessment.' + ' Attached questions will be copied as well.') : (0, _formatMessage["default"])('You can apply your edits to a copy of this stimulus' + ' which will only be seen by students that have not taken the assessment.' + ' Attached questions will be copied as well.');
|
|
65
60
|
return propsForVersioningWrapper.apply(void 0, [/*#__PURE__*/_react["default"].createElement(_uiText.Text, {
|
|
66
61
|
color: "primary"
|
|
67
62
|
}, /*#__PURE__*/_react["default"].createElement("b", null, (0, _formatMessage["default"])('Editing a copy.')), "\xA0", (0, _formatMessage["default"])('Statistics from this new copy will appear separate from the previous version.')), /*#__PURE__*/_react["default"].createElement(_uiText.Text, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "22.5.1-rc.
|
|
3
|
+
"version": "22.5.1-rc.3+9e80eae7f",
|
|
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.5.1-rc.
|
|
50
|
-
"@instructure/quiz-i18n": "22.5.1-rc.
|
|
51
|
-
"@instructure/quiz-interactions": "22.5.1-rc.
|
|
52
|
-
"@instructure/quiz-number-input": "22.5.1-rc.
|
|
53
|
-
"@instructure/quiz-rce": "22.5.1-rc.
|
|
49
|
+
"@instructure/quiz-common": "22.5.1-rc.3+9e80eae7f",
|
|
50
|
+
"@instructure/quiz-i18n": "22.5.1-rc.3+9e80eae7f",
|
|
51
|
+
"@instructure/quiz-interactions": "22.5.1-rc.3+9e80eae7f",
|
|
52
|
+
"@instructure/quiz-number-input": "22.5.1-rc.3+9e80eae7f",
|
|
53
|
+
"@instructure/quiz-rce": "22.5.1-rc.3+9e80eae7f",
|
|
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.5.1-rc.
|
|
112
|
+
"instructure-validations": "22.5.1-rc.3+9e80eae7f",
|
|
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.5.1-rc.
|
|
161
|
+
"quiz-presets": "22.5.1-rc.3+9e80eae7f",
|
|
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": "9e80eae7f4e99735bd7692001dfec5eaeae9ea31"
|
|
178
178
|
}
|