@instructure/quiz-core 18.1.0 → 18.1.1
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/CHANGELOG.md +8 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +11 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +10 -6
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +12 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +11 -6
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [18.1.1](https://gerrit.instructure.com/quizzes-ui/compare/v18.1.0...v18.1.1) (2023-09-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/quiz-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [18.1.0](https://gerrit.instructure.com/quizzes-ui/compare/v18.0.0...v18.1.0) (2023-09-14)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect } from "../../../../../common/react-redux.js";
|
|
2
|
+
import { featureOn } from "../../../../../common/util/featureCheck.js";
|
|
3
|
+
import { NewItemAnalysis as NewItemAnalysisPresenter } from "./presenter.js";
|
|
4
|
+
|
|
5
|
+
function mapStateToProps(_state) {
|
|
6
|
+
return {
|
|
7
|
+
showFrequencyTable: featureOn('show_improved_item_analysis_frequency_table')
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var NewItemAnalysis = connect(mapStateToProps)(NewItemAnalysisPresenter);
|
|
2
12
|
export default NewItemAnalysis;
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js
CHANGED
|
@@ -41,6 +41,7 @@ import { itemAnalysisPropType } from "../propTypes.js";
|
|
|
41
41
|
import { Flex } from '@instructure/ui-flex';
|
|
42
42
|
import { RichContentRenderer, ensureMathIsReady, ensureMathRendered } from '@instructure/quiz-rce';
|
|
43
43
|
import { ensureImagesLoaded } from "../../../../../common/util/printUtils.js";
|
|
44
|
+
import { PropTypes } from '@instructure/quiz-interactions';
|
|
44
45
|
var supportedTables = ['choice', 'true-false', 'multi-answer'];
|
|
45
46
|
export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
46
47
|
_inherits(NewItemAnalysis, _Component);
|
|
@@ -248,10 +249,12 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
248
249
|
value: function render() {
|
|
249
250
|
var _metadata$item_title;
|
|
250
251
|
|
|
251
|
-
var _this$props
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
var _this$props = this.props,
|
|
253
|
+
showFrequencyTable = _this$props.showFrequencyTable,
|
|
254
|
+
itemAnalysis = _this$props.itemAnalysis;
|
|
255
|
+
var answer_summary = itemAnalysis.answer_summary,
|
|
256
|
+
metadata = itemAnalysis.metadata,
|
|
257
|
+
scores = itemAnalysis.scores;
|
|
255
258
|
var itemId = metadata.item_id;
|
|
256
259
|
var isSupportedTable = supportedTables.includes(metadata.interaction_type);
|
|
257
260
|
var metricsClass = classnames(_defineProperty({}, styles.hiddenMetrics, !this.state.metricsExpanded));
|
|
@@ -277,12 +280,13 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
277
280
|
padding: "small xx-small none none",
|
|
278
281
|
overflowY: "hidden",
|
|
279
282
|
size: !this.state.bodyExpanded ? '60px' : void 0
|
|
280
|
-
}, this.renderRichContent(metadata.item_body, itemBodyClass, itemId)))), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderMetrics(scores, metricsClass)))), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderAnswerSummaryTable(itemId, answer_summary, isSupportedTable, metricsClass))));
|
|
283
|
+
}, this.renderRichContent(metadata.item_body, itemBodyClass, itemId)))), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderMetrics(scores, metricsClass)))), showFrequencyTable && /*#__PURE__*/React.createElement(Flex.Item, null, this.renderAnswerSummaryTable(itemId, answer_summary, isSupportedTable, metricsClass))));
|
|
281
284
|
}
|
|
282
285
|
}]);
|
|
283
286
|
|
|
284
287
|
NewItemAnalysis.displayName = "NewItemAnalysis";
|
|
285
288
|
return NewItemAnalysis;
|
|
286
289
|
}(Component), _class2.propTypes = {
|
|
287
|
-
itemAnalysis: itemAnalysisPropType
|
|
290
|
+
itemAnalysis: itemAnalysisPropType,
|
|
291
|
+
showFrequencyTable: PropTypes.bool.isRequired
|
|
288
292
|
}.isRequired, _temp)) || _class);
|
|
@@ -5,7 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _reactRedux = require("../../../../../common/react-redux.js");
|
|
9
|
+
|
|
10
|
+
var _featureCheck = require("../../../../../common/util/featureCheck.js");
|
|
11
|
+
|
|
8
12
|
var _presenter = require("./presenter.js");
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
function mapStateToProps(_state) {
|
|
15
|
+
return {
|
|
16
|
+
showFrequencyTable: (0, _featureCheck.featureOn)('show_improved_item_analysis_frequency_table')
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var NewItemAnalysis = (0, _reactRedux.connect)(mapStateToProps)(_presenter.NewItemAnalysis);
|
|
21
|
+
var _default = NewItemAnalysis;
|
|
11
22
|
exports.default = _default;
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js
CHANGED
|
@@ -57,6 +57,8 @@ var _quizRce = require("@instructure/quiz-rce");
|
|
|
57
57
|
|
|
58
58
|
var _printUtils = require("../../../../../common/util/printUtils.js");
|
|
59
59
|
|
|
60
|
+
var _quizInteractions = require("@instructure/quiz-interactions");
|
|
61
|
+
|
|
60
62
|
var _dec, _class, _class2, _temp;
|
|
61
63
|
|
|
62
64
|
var styles = {
|
|
@@ -282,10 +284,12 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
282
284
|
value: function render() {
|
|
283
285
|
var _metadata$item_title;
|
|
284
286
|
|
|
285
|
-
var _this$props
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
287
|
+
var _this$props = this.props,
|
|
288
|
+
showFrequencyTable = _this$props.showFrequencyTable,
|
|
289
|
+
itemAnalysis = _this$props.itemAnalysis;
|
|
290
|
+
var answer_summary = itemAnalysis.answer_summary,
|
|
291
|
+
metadata = itemAnalysis.metadata,
|
|
292
|
+
scores = itemAnalysis.scores;
|
|
289
293
|
var itemId = metadata.item_id;
|
|
290
294
|
var isSupportedTable = supportedTables.includes(metadata.interaction_type);
|
|
291
295
|
var metricsClass = (0, _classnames3.default)((0, _defineProperty2.default)({}, styles.hiddenMetrics, !this.state.metricsExpanded));
|
|
@@ -311,12 +315,13 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
311
315
|
padding: "small xx-small none none",
|
|
312
316
|
overflowY: "hidden",
|
|
313
317
|
size: !this.state.bodyExpanded ? '60px' : void 0
|
|
314
|
-
}, this.renderRichContent(metadata.item_body, itemBodyClass, itemId)))), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderMetrics(scores, metricsClass)))), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderAnswerSummaryTable(itemId, answer_summary, isSupportedTable, metricsClass))));
|
|
318
|
+
}, this.renderRichContent(metadata.item_body, itemBodyClass, itemId)))), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderMetrics(scores, metricsClass)))), showFrequencyTable && /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderAnswerSummaryTable(itemId, answer_summary, isSupportedTable, metricsClass))));
|
|
315
319
|
}
|
|
316
320
|
}]);
|
|
317
321
|
NewItemAnalysis.displayName = "NewItemAnalysis";
|
|
318
322
|
return NewItemAnalysis;
|
|
319
323
|
}(_react.Component), _class2.propTypes = {
|
|
320
|
-
itemAnalysis: _propTypes.itemAnalysisPropType
|
|
324
|
+
itemAnalysis: _propTypes.itemAnalysisPropType,
|
|
325
|
+
showFrequencyTable: _quizInteractions.PropTypes.bool.isRequired
|
|
321
326
|
}.isRequired, _temp)) || _class);
|
|
322
327
|
exports.NewItemAnalysis = NewItemAnalysis;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@instructure/grading-utils": "^1.0.0",
|
|
44
44
|
"@instructure/outcomes-ui": "^2.1.9",
|
|
45
|
-
"@instructure/quiz-common": "^18.1.
|
|
46
|
-
"@instructure/quiz-i18n": "^18.1.
|
|
47
|
-
"@instructure/quiz-interactions": "^18.1.
|
|
48
|
-
"@instructure/quiz-number-input": "^18.1.
|
|
49
|
-
"@instructure/quiz-rce": "^18.1.
|
|
45
|
+
"@instructure/quiz-common": "^18.1.1",
|
|
46
|
+
"@instructure/quiz-i18n": "^18.1.1",
|
|
47
|
+
"@instructure/quiz-interactions": "^18.1.1",
|
|
48
|
+
"@instructure/quiz-number-input": "^18.1.1",
|
|
49
|
+
"@instructure/quiz-rce": "^18.1.1",
|
|
50
50
|
"@instructure/ui-a11y-content": "^7.20.0",
|
|
51
51
|
"@instructure/ui-alerts": "^7.20.0",
|
|
52
52
|
"@instructure/ui-avatar": "^7.20.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"eventemitter3": "^3.1.0",
|
|
108
108
|
"humps": "^2.0.0",
|
|
109
109
|
"immutable": "^3.8.1",
|
|
110
|
-
"instructure-validations": "^18.1.
|
|
110
|
+
"instructure-validations": "^18.1.1",
|
|
111
111
|
"ipaddr.js": "^1.5.4",
|
|
112
112
|
"isomorphic-fetch": "^2.2.0",
|
|
113
113
|
"isuuid": "^0.1.0",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"uuid": "^3.2.1"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@instructure/quiz-scripts": "^18.1.
|
|
142
|
+
"@instructure/quiz-scripts": "^18.1.1",
|
|
143
143
|
"@instructure/ui-axe-check": "^7.20.0",
|
|
144
144
|
"@instructure/ui-babel-preset": "^7.20.0",
|
|
145
145
|
"@instructure/ui-karma-config": "^7.20.0",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"intl": "^1.2.4",
|
|
159
159
|
"jquery": "^2.2.3",
|
|
160
160
|
"most-subject": "^5.3.0",
|
|
161
|
-
"quiz-presets": "^18.1.
|
|
161
|
+
"quiz-presets": "^18.1.1",
|
|
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": "7e974ccc63f634a2a28140da60bde306d964df58"
|
|
178
178
|
}
|