@instructure/quiz-core 18.4.1-rc.10 → 18.4.1-rc.11
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/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +24 -9
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +5 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +5 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +5 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +24 -10
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +5 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +4 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +9 -2
- package/package.json +9 -9
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js
CHANGED
|
@@ -5,10 +5,6 @@ import React, { Component } from 'react';
|
|
|
5
5
|
import { PropTypes } from '@instructure/quiz-interactions';
|
|
6
6
|
import { ChoiceType } from "./ChoiceType/presenter.js";
|
|
7
7
|
import { answerSummaryPropType } from "../propTypes.js";
|
|
8
|
-
var afsTableComponentMap = new Map();
|
|
9
|
-
afsTableComponentMap.set('true-false', ChoiceType);
|
|
10
|
-
afsTableComponentMap.set('choice', ChoiceType);
|
|
11
|
-
afsTableComponentMap.set('multi-answer', ChoiceType);
|
|
12
8
|
export var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
13
9
|
_inherits(AnswerFrequencySummary, _Component);
|
|
14
10
|
|
|
@@ -24,13 +20,22 @@ export var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23
|
+
_this.afsTableComponentMap = new Map();
|
|
24
|
+
|
|
25
|
+
_this.addAfsComponentsByFlags = function (afsFlags) {
|
|
26
|
+
if (afsFlags.formulaEnabled) {// this.afsTableComponentMap.set('formula', Formula)
|
|
27
|
+
}
|
|
28
|
+
};
|
|
27
29
|
|
|
28
30
|
_this.render = function () {
|
|
29
31
|
var _this$props = _this.props,
|
|
30
32
|
itemId = _this$props.itemId,
|
|
31
33
|
answerSummary = _this$props.answerSummary,
|
|
32
|
-
interactionType = _this$props.interactionType
|
|
33
|
-
|
|
34
|
+
interactionType = _this$props.interactionType,
|
|
35
|
+
afsFlags = _this$props.afsFlags;
|
|
36
|
+
afsFlags && _this.addAfsComponentsByFlags(afsFlags);
|
|
37
|
+
|
|
38
|
+
var AfsTableComponent = _this.afsTableComponentMap.get(interactionType);
|
|
34
39
|
|
|
35
40
|
if (!AfsTableComponent) {
|
|
36
41
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -42,13 +47,23 @@ export var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
42
47
|
});
|
|
43
48
|
};
|
|
44
49
|
|
|
50
|
+
_this.afsTableComponentMap.set('true-false', ChoiceType);
|
|
51
|
+
|
|
52
|
+
_this.afsTableComponentMap.set('choice', ChoiceType);
|
|
53
|
+
|
|
54
|
+
_this.afsTableComponentMap.set('multi-answer', ChoiceType);
|
|
55
|
+
|
|
45
56
|
return _this;
|
|
46
57
|
}
|
|
47
58
|
|
|
48
59
|
return AnswerFrequencySummary;
|
|
49
60
|
}(Component);
|
|
50
61
|
AnswerFrequencySummary.propTypes = {
|
|
51
|
-
itemId: PropTypes.number,
|
|
52
|
-
answerSummary: answerSummaryPropType,
|
|
53
|
-
interactionType: PropTypes.string
|
|
62
|
+
itemId: PropTypes.number.isRequired,
|
|
63
|
+
answerSummary: answerSummaryPropType.isRequired,
|
|
64
|
+
interactionType: PropTypes.string.isRequired,
|
|
65
|
+
afsFlags: PropTypes.shape({
|
|
66
|
+
formulaEnabled: PropTypes.bool.isRequired,
|
|
67
|
+
matchingEnabled: PropTypes.bool.isRequired
|
|
68
|
+
})
|
|
54
69
|
}.isRequired;
|
|
@@ -5,7 +5,11 @@ import { NewItemAnalysis as NewItemAnalysisPresenter } from "./presenter.js";
|
|
|
5
5
|
function mapStateToProps(_state) {
|
|
6
6
|
return {
|
|
7
7
|
// This would be able to switch of all AFS Tables
|
|
8
|
-
showFrequencyTable: featureOn('show_improved_item_analysis_frequency_table')
|
|
8
|
+
showFrequencyTable: featureOn('show_improved_item_analysis_frequency_table'),
|
|
9
|
+
afsFlags: {
|
|
10
|
+
formulaEnabled: featureOn('ia_formula_afs'),
|
|
11
|
+
matchingEnabled: featureOn('ia_matching_afs')
|
|
12
|
+
}
|
|
9
13
|
};
|
|
10
14
|
}
|
|
11
15
|
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js
CHANGED
|
@@ -37,7 +37,7 @@ import AnalysisPopoverMetric from "../AnalysisPopoverMetric/index.js";
|
|
|
37
37
|
import classnames from 'classnames';
|
|
38
38
|
import { interactionTypesNameDictionary } from "../../../../../common/util/interactionTypeMetadata.js";
|
|
39
39
|
import AnswerFrequencySummary from "../AnswerFrequencySummary/index.js";
|
|
40
|
-
import { itemAnalysisPropType } from "../propTypes.js";
|
|
40
|
+
import { afsFlags, itemAnalysisPropType } from "../propTypes.js";
|
|
41
41
|
import { Flex } from '@instructure/ui-flex';
|
|
42
42
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
43
43
|
import { ensureRCEContentIsLoaded } from "../../../../../common/util/rceChecker.js";
|
|
@@ -201,7 +201,8 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
201
201
|
}, /*#__PURE__*/React.createElement(AnswerFrequencySummary, {
|
|
202
202
|
itemId: itemId,
|
|
203
203
|
answerSummary: answer_summary,
|
|
204
|
-
interactionType: interactionType
|
|
204
|
+
interactionType: interactionType,
|
|
205
|
+
afsFlags: afsFlags
|
|
205
206
|
}))));
|
|
206
207
|
};
|
|
207
208
|
|
|
@@ -284,5 +285,6 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
284
285
|
return NewItemAnalysis;
|
|
285
286
|
}(Component), _class2.propTypes = {
|
|
286
287
|
itemAnalysis: itemAnalysisPropType,
|
|
287
|
-
showFrequencyTable: PropTypes.bool.isRequired
|
|
288
|
+
showFrequencyTable: PropTypes.bool.isRequired,
|
|
289
|
+
afsFlags: afsFlags
|
|
288
290
|
}.isRequired, _temp)) || _class);
|
|
@@ -56,4 +56,8 @@ export var choiceTypeAnswerSummaryPropType = PropTypes.shape({
|
|
|
56
56
|
})),
|
|
57
57
|
no_answer: noAnswerPropType
|
|
58
58
|
});
|
|
59
|
-
export var answerSummaryPropType = PropTypes.oneOfType([choiceTypeAnswerSummaryPropType]);
|
|
59
|
+
export var answerSummaryPropType = PropTypes.oneOfType([choiceTypeAnswerSummaryPropType]);
|
|
60
|
+
export var afsFlags = PropTypes.shape({
|
|
61
|
+
formulaEnabled: PropTypes.bool.isRequired,
|
|
62
|
+
matchingEnabled: PropTypes.bool.isRequired
|
|
63
|
+
});
|
|
@@ -23,11 +23,6 @@ var _presenter = require("./ChoiceType/presenter.js");
|
|
|
23
23
|
|
|
24
24
|
var _propTypes = require("../propTypes.js");
|
|
25
25
|
|
|
26
|
-
var afsTableComponentMap = new Map();
|
|
27
|
-
afsTableComponentMap.set('true-false', _presenter.ChoiceType);
|
|
28
|
-
afsTableComponentMap.set('choice', _presenter.ChoiceType);
|
|
29
|
-
afsTableComponentMap.set('multi-answer', _presenter.ChoiceType);
|
|
30
|
-
|
|
31
26
|
var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
32
27
|
(0, _inherits2.default)(AnswerFrequencySummary, _Component);
|
|
33
28
|
|
|
@@ -43,13 +38,22 @@ var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
43
38
|
}
|
|
44
39
|
|
|
45
40
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
41
|
+
_this.afsTableComponentMap = new Map();
|
|
42
|
+
|
|
43
|
+
_this.addAfsComponentsByFlags = function (afsFlags) {
|
|
44
|
+
if (afsFlags.formulaEnabled) {// this.afsTableComponentMap.set('formula', Formula)
|
|
45
|
+
}
|
|
46
|
+
};
|
|
46
47
|
|
|
47
48
|
_this.render = function () {
|
|
48
49
|
var _this$props = _this.props,
|
|
49
50
|
itemId = _this$props.itemId,
|
|
50
51
|
answerSummary = _this$props.answerSummary,
|
|
51
|
-
interactionType = _this$props.interactionType
|
|
52
|
-
|
|
52
|
+
interactionType = _this$props.interactionType,
|
|
53
|
+
afsFlags = _this$props.afsFlags;
|
|
54
|
+
afsFlags && _this.addAfsComponentsByFlags(afsFlags);
|
|
55
|
+
|
|
56
|
+
var AfsTableComponent = _this.afsTableComponentMap.get(interactionType);
|
|
53
57
|
|
|
54
58
|
if (!AfsTableComponent) {
|
|
55
59
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
@@ -61,6 +65,12 @@ var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
61
65
|
});
|
|
62
66
|
};
|
|
63
67
|
|
|
68
|
+
_this.afsTableComponentMap.set('true-false', _presenter.ChoiceType);
|
|
69
|
+
|
|
70
|
+
_this.afsTableComponentMap.set('choice', _presenter.ChoiceType);
|
|
71
|
+
|
|
72
|
+
_this.afsTableComponentMap.set('multi-answer', _presenter.ChoiceType);
|
|
73
|
+
|
|
64
74
|
return _this;
|
|
65
75
|
}
|
|
66
76
|
|
|
@@ -69,7 +79,11 @@ var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
69
79
|
|
|
70
80
|
exports.AnswerFrequencySummary = AnswerFrequencySummary;
|
|
71
81
|
AnswerFrequencySummary.propTypes = {
|
|
72
|
-
itemId: _quizInteractions.PropTypes.number,
|
|
73
|
-
answerSummary: _propTypes.answerSummaryPropType,
|
|
74
|
-
interactionType: _quizInteractions.PropTypes.string
|
|
82
|
+
itemId: _quizInteractions.PropTypes.number.isRequired,
|
|
83
|
+
answerSummary: _propTypes.answerSummaryPropType.isRequired,
|
|
84
|
+
interactionType: _quizInteractions.PropTypes.string.isRequired,
|
|
85
|
+
afsFlags: _quizInteractions.PropTypes.shape({
|
|
86
|
+
formulaEnabled: _quizInteractions.PropTypes.bool.isRequired,
|
|
87
|
+
matchingEnabled: _quizInteractions.PropTypes.bool.isRequired
|
|
88
|
+
})
|
|
75
89
|
}.isRequired;
|
|
@@ -14,7 +14,11 @@ var _presenter = require("./presenter.js");
|
|
|
14
14
|
function mapStateToProps(_state) {
|
|
15
15
|
return {
|
|
16
16
|
// This would be able to switch of all AFS Tables
|
|
17
|
-
showFrequencyTable: (0, _featureCheck.featureOn)('show_improved_item_analysis_frequency_table')
|
|
17
|
+
showFrequencyTable: (0, _featureCheck.featureOn)('show_improved_item_analysis_frequency_table'),
|
|
18
|
+
afsFlags: {
|
|
19
|
+
formulaEnabled: (0, _featureCheck.featureOn)('ia_formula_afs'),
|
|
20
|
+
matchingEnabled: (0, _featureCheck.featureOn)('ia_matching_afs')
|
|
21
|
+
}
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js
CHANGED
|
@@ -236,7 +236,8 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
236
236
|
}, /*#__PURE__*/_react.default.createElement(_index5.default, {
|
|
237
237
|
itemId: itemId,
|
|
238
238
|
answerSummary: answer_summary,
|
|
239
|
-
interactionType: interactionType
|
|
239
|
+
interactionType: interactionType,
|
|
240
|
+
afsFlags: _propTypes.afsFlags
|
|
240
241
|
}))));
|
|
241
242
|
};
|
|
242
243
|
|
|
@@ -318,6 +319,7 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
318
319
|
return NewItemAnalysis;
|
|
319
320
|
}(_react.Component), _class2.propTypes = {
|
|
320
321
|
itemAnalysis: _propTypes.itemAnalysisPropType,
|
|
321
|
-
showFrequencyTable: _quizInteractions.PropTypes.bool.isRequired
|
|
322
|
+
showFrequencyTable: _quizInteractions.PropTypes.bool.isRequired,
|
|
323
|
+
afsFlags: _propTypes.afsFlags
|
|
322
324
|
}.isRequired, _temp)) || _class);
|
|
323
325
|
exports.NewItemAnalysis = NewItemAnalysis;
|
|
@@ -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.answerSummaryPropType = exports.choiceTypeAnswerSummaryPropType = exports.itemAnalysisPropType = exports.quizAnalysisPropType = void 0;
|
|
8
|
+
exports.afsFlags = exports.answerSummaryPropType = exports.choiceTypeAnswerSummaryPropType = exports.itemAnalysisPropType = exports.quizAnalysisPropType = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -78,4 +78,11 @@ exports.choiceTypeAnswerSummaryPropType = choiceTypeAnswerSummaryPropType;
|
|
|
78
78
|
|
|
79
79
|
var answerSummaryPropType = _propTypes.default.oneOfType([choiceTypeAnswerSummaryPropType]);
|
|
80
80
|
|
|
81
|
-
exports.answerSummaryPropType = answerSummaryPropType;
|
|
81
|
+
exports.answerSummaryPropType = answerSummaryPropType;
|
|
82
|
+
|
|
83
|
+
var afsFlags = _propTypes.default.shape({
|
|
84
|
+
formulaEnabled: _propTypes.default.bool.isRequired,
|
|
85
|
+
matchingEnabled: _propTypes.default.bool.isRequired
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
exports.afsFlags = afsFlags;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "18.4.1-rc.
|
|
3
|
+
"version": "18.4.1-rc.11+23aa7bfcf",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@instructure/grading-utils": "^1.0.0",
|
|
45
45
|
"@instructure/outcomes-ui": "^2.1.9",
|
|
46
|
-
"@instructure/quiz-common": "18.4.1-rc.
|
|
47
|
-
"@instructure/quiz-i18n": "18.4.1-rc.
|
|
48
|
-
"@instructure/quiz-interactions": "18.4.1-rc.
|
|
49
|
-
"@instructure/quiz-number-input": "18.4.1-rc.
|
|
50
|
-
"@instructure/quiz-rce": "18.4.1-rc.
|
|
46
|
+
"@instructure/quiz-common": "18.4.1-rc.11+23aa7bfcf",
|
|
47
|
+
"@instructure/quiz-i18n": "18.4.1-rc.11+23aa7bfcf",
|
|
48
|
+
"@instructure/quiz-interactions": "18.4.1-rc.11+23aa7bfcf",
|
|
49
|
+
"@instructure/quiz-number-input": "18.4.1-rc.11+23aa7bfcf",
|
|
50
|
+
"@instructure/quiz-rce": "18.4.1-rc.11+23aa7bfcf",
|
|
51
51
|
"@instructure/ui-a11y-content": "^7.22.1",
|
|
52
52
|
"@instructure/ui-alerts": "^7.22.1",
|
|
53
53
|
"@instructure/ui-avatar": "^7.22.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"eventemitter3": "^3.1.0",
|
|
109
109
|
"humps": "^2.0.0",
|
|
110
110
|
"immutable": "^3.8.1",
|
|
111
|
-
"instructure-validations": "18.4.1-rc.
|
|
111
|
+
"instructure-validations": "18.4.1-rc.11+23aa7bfcf",
|
|
112
112
|
"ipaddr.js": "^1.5.4",
|
|
113
113
|
"isomorphic-fetch": "^2.2.0",
|
|
114
114
|
"isuuid": "^0.1.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"intl": "^1.2.4",
|
|
160
160
|
"jquery": "^2.2.3",
|
|
161
161
|
"most-subject": "^5.3.0",
|
|
162
|
-
"quiz-presets": "18.4.1-rc.
|
|
162
|
+
"quiz-presets": "18.4.1-rc.11+23aa7bfcf",
|
|
163
163
|
"react": "^16.8.6",
|
|
164
164
|
"react-addons-test-utils": "^15.6.2",
|
|
165
165
|
"react-dom": "^16.8.6",
|
|
@@ -175,5 +175,5 @@
|
|
|
175
175
|
"publishConfig": {
|
|
176
176
|
"access": "public"
|
|
177
177
|
},
|
|
178
|
-
"gitHead": "
|
|
178
|
+
"gitHead": "23aa7bfcf74094cb7d122978bec96551d4b84b27"
|
|
179
179
|
}
|