@instructure/quiz-core 20.4.2-rc.3 → 20.4.2-rc.5
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/ChoiceType/presenter.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +92 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/styles.js +10 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/theme.js +8 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +5 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/presenter.js +165 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/styles.js +15 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/theme.js +9 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/{ChoiceType → shared}/ChoiceTypeTable/presenter.js +23 -20
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +29 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +1 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +115 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/styles.js +18 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/theme.js +16 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +13 -7
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/presenter.js +189 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/styles.js +23 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceGroupTypeTable/theme.js +17 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/{ChoiceType → shared}/ChoiceTypeTable/presenter.js +22 -19
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +38 -10
- package/package.json +9 -9
- /package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/{ChoiceType → shared}/ChoiceTypeTable/index.js +0 -0
- /package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/{ChoiceType → shared}/ChoiceTypeTable/theme.js +0 -0
- /package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/{ChoiceType → shared}/ChoiceTypeTable/index.js +0 -0
- /package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/{ChoiceType → shared}/ChoiceTypeTable/theme.js +0 -0
|
@@ -3,7 +3,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
3
3
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
4
4
|
import React, { Component } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import ChoiceTypeTable from "
|
|
6
|
+
import ChoiceTypeTable from "../shared/ChoiceTypeTable/index.js";
|
|
7
7
|
import { choiceTypeAnswerSummaryPropType } from "../../propTypes.js";
|
|
8
8
|
import AggregationTable from "../shared/AggregationTable/index.js";
|
|
9
9
|
import { AfsPartsContainer } from "../shared/AfsPartsContainer/presenter.js";
|
|
@@ -31,7 +31,7 @@ export var ChoiceType = /*#__PURE__*/function (_Component) {
|
|
|
31
31
|
return /*#__PURE__*/React.createElement(AfsTableWrapper, null, /*#__PURE__*/React.createElement(AfsPartsContainer, {
|
|
32
32
|
afsTable: /*#__PURE__*/React.createElement(ChoiceTypeTable, {
|
|
33
33
|
itemId: itemId,
|
|
34
|
-
|
|
34
|
+
choices: answerSummary.choices
|
|
35
35
|
}),
|
|
36
36
|
aggregationTable: /*#__PURE__*/React.createElement(AggregationTable, {
|
|
37
37
|
itemId: itemId,
|
|
@@ -111,6 +111,7 @@ export var MatchingTypeTable = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
111
111
|
padding: '0 0 0 0'
|
|
112
112
|
}
|
|
113
113
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, correct ? "".concat(t('Correct answer'), ": ").concat(count) : count), /*#__PURE__*/React.createElement("div", {
|
|
114
|
+
"aria-hidden": "true",
|
|
114
115
|
className: containerClassNames
|
|
115
116
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
116
117
|
direction: "row",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RichFillBlankType as default } from "./presenter.js";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
3
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
4
|
+
|
|
5
|
+
var _dec, _class, _class2, _temp;
|
|
6
|
+
|
|
7
|
+
/** @jsx jsx */
|
|
8
|
+
import { Component } from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import { richFillBlankTypeAnswerSummaryPropType } from "../../propTypes.js";
|
|
11
|
+
import AfsTableWrapper from "../shared/AfsTableWrapper/index.js";
|
|
12
|
+
import { AfsPartsContainer } from "../shared/AfsPartsContainer/presenter.js";
|
|
13
|
+
import ChoiceGroupTypeTable from "../shared/ChoiceGroupTypeTable/index.js";
|
|
14
|
+
import { Text } from '@instructure/ui-text';
|
|
15
|
+
import t from '@instructure/quiz-i18n/es/format-message';
|
|
16
|
+
import AggregationTable from "../shared/AggregationTable/index.js";
|
|
17
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
18
|
+
import generateStyle from "./styles.js";
|
|
19
|
+
import generateComponentTheme from "./theme.js";
|
|
20
|
+
export var RichFillBlankType = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
21
|
+
_inherits(RichFillBlankType, _Component);
|
|
22
|
+
|
|
23
|
+
var _super = _createSuper(RichFillBlankType);
|
|
24
|
+
|
|
25
|
+
function RichFillBlankType() {
|
|
26
|
+
var _this;
|
|
27
|
+
|
|
28
|
+
_classCallCheck(this, RichFillBlankType);
|
|
29
|
+
|
|
30
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
+
args[_key] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
35
|
+
|
|
36
|
+
_this.renderBlankInfo = function (blank) {
|
|
37
|
+
var _blank$aggregate, _blank$aggregate2;
|
|
38
|
+
|
|
39
|
+
var correctCount = (blank === null || blank === void 0 ? void 0 : (_blank$aggregate = blank.aggregate) === null || _blank$aggregate === void 0 ? void 0 : _blank$aggregate.correct) || 0;
|
|
40
|
+
var incorrectCount = (blank === null || blank === void 0 ? void 0 : (_blank$aggregate2 = blank.aggregate) === null || _blank$aggregate2 === void 0 ? void 0 : _blank$aggregate2.incorrect) || 0;
|
|
41
|
+
var noAnswer = (blank === null || blank === void 0 ? void 0 : blank.no_answer) || 0;
|
|
42
|
+
var correctString = "".concat(t('Correct'), ": ").concat(correctCount, " ");
|
|
43
|
+
var incorrectString = "".concat(t('Incorrect'), ": ").concat(incorrectCount, " ");
|
|
44
|
+
var noAnswerString = "".concat(t('No Answer'), ": ").concat(noAnswer, " ");
|
|
45
|
+
return jsx("div", {
|
|
46
|
+
css: _this.props.styles.groupAggregationContainer
|
|
47
|
+
}, jsx(Text, null, correctString), jsx(Text, null, incorrectString), jsx(Text, null, noAnswerString));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
_this.renderGroup = function (key, itemId, blank, index) {
|
|
51
|
+
return jsx(ChoiceGroupTypeTable, {
|
|
52
|
+
key: key,
|
|
53
|
+
itemId: itemId,
|
|
54
|
+
blank: blank,
|
|
55
|
+
blankInfo: _this.renderBlankInfo(blank),
|
|
56
|
+
index: index
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
_this.renderGroups = function () {
|
|
61
|
+
var _this$props = _this.props,
|
|
62
|
+
answerSummary = _this$props.answerSummary,
|
|
63
|
+
itemId = _this$props.itemId;
|
|
64
|
+
var blanks = answerSummary.blanks;
|
|
65
|
+
return blanks.map(function (blank, index) {
|
|
66
|
+
var key = "ChoiceGroupTypeTable_".concat(index);
|
|
67
|
+
return _this.renderGroup(key, itemId, blank, index);
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
_this.render = function () {
|
|
72
|
+
var _this$props2 = _this.props,
|
|
73
|
+
answerSummary = _this$props2.answerSummary,
|
|
74
|
+
itemId = _this$props2.itemId;
|
|
75
|
+
return jsx(AfsTableWrapper, null, jsx(AfsPartsContainer, {
|
|
76
|
+
afsTable: _this.renderGroups(),
|
|
77
|
+
aggregationTable: jsx(AggregationTable, {
|
|
78
|
+
itemId: itemId,
|
|
79
|
+
answerSummary: answerSummary
|
|
80
|
+
})
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return _this;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return RichFillBlankType;
|
|
88
|
+
}(Component), _class2.propTypes = {
|
|
89
|
+
itemId: PropTypes.number.isRequired,
|
|
90
|
+
answerSummary: richFillBlankTypeAnswerSummaryPropType.isRequired,
|
|
91
|
+
styles: PropTypes.object
|
|
92
|
+
}.isRequired, _temp)) || _class);
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js
CHANGED
|
@@ -5,6 +5,7 @@ import React, { Component } from 'react';
|
|
|
5
5
|
import { PropTypes } from '@instructure/quiz-interactions';
|
|
6
6
|
import LegacyChoiceType from "./LegacyChoiceType/index.js";
|
|
7
7
|
import ChoiceType from "./ChoiceType/index.js";
|
|
8
|
+
import RichFillBlankType from "./RichFillBlankType/index.js";
|
|
8
9
|
import AggregationType from "./AggregationType/index.js";
|
|
9
10
|
import { MatchingType, OrderingType, CategorizationType } from "./MatchingType/index.js";
|
|
10
11
|
import { afsFlags, answerSummaryPropType } from "../propTypes.js";
|
|
@@ -57,6 +58,10 @@ export var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
57
58
|
if (afsFlags.multiAnswerEnabled) {
|
|
58
59
|
_this.afsTableComponentMap.set('multi-answer', ChoiceType);
|
|
59
60
|
}
|
|
61
|
+
|
|
62
|
+
if (afsFlags.fillInTheBlankEnabled) {
|
|
63
|
+
_this.afsTableComponentMap.set('rich-fill-blank', RichFillBlankType);
|
|
64
|
+
}
|
|
60
65
|
};
|
|
61
66
|
|
|
62
67
|
_this.render = function () {
|
|
@@ -8,7 +8,6 @@ import React, { Component } from 'react';
|
|
|
8
8
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
9
9
|
import { Table } from '@instructure/ui-table';
|
|
10
10
|
import { onlyAggregatePropType } from "../../../propTypes.js";
|
|
11
|
-
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
12
11
|
import PropTypes from 'prop-types';
|
|
13
12
|
import { IconCheckSolid, IconXSolid, IconNoSolid, IconOvalHalfSolid } from '@instructure/ui-icons';
|
|
14
13
|
import { themeable } from '@instructure/ui-themeable';
|
|
@@ -97,7 +96,7 @@ export var AggregationTable = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
97
96
|
themeOverride: {
|
|
98
97
|
padding: '0px'
|
|
99
98
|
}
|
|
100
|
-
}, /*#__PURE__*/React.createElement(
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
101
100
|
direction: "row",
|
|
102
101
|
alignItems: "center"
|
|
103
102
|
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChoiceGroupTypeTable as default } from "./presenter.js";
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
3
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
4
|
+
|
|
5
|
+
var _dec, _class, _class2, _temp;
|
|
6
|
+
|
|
7
|
+
/** @jsx jsx */
|
|
8
|
+
import { Component } from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import { choiceTypeObject } from "../../../propTypes.js";
|
|
11
|
+
import { Flex } from '@instructure/ui-flex';
|
|
12
|
+
import { Text } from '@instructure/ui-text';
|
|
13
|
+
import ExpandButton from "../../../../../../../common/components/shared/ExpandButton/index.js";
|
|
14
|
+
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
|
+
import Card from "../../../../../../../common/components/shared/Card/index.js";
|
|
16
|
+
import ChoiceTypeTable from "../ChoiceTypeTable/index.js";
|
|
17
|
+
import BlankIcon from "../../../NewItemAnalysis/BlankIcon/index.js";
|
|
18
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
19
|
+
import generateStyle from "./styles.js";
|
|
20
|
+
import generateComponentTheme from "./theme.js";
|
|
21
|
+
export var ChoiceGroupTypeTable = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
22
|
+
_inherits(ChoiceGroupTypeTable, _Component);
|
|
23
|
+
|
|
24
|
+
var _super = _createSuper(ChoiceGroupTypeTable);
|
|
25
|
+
|
|
26
|
+
function ChoiceGroupTypeTable() {
|
|
27
|
+
var _this;
|
|
28
|
+
|
|
29
|
+
_classCallCheck(this, ChoiceGroupTypeTable);
|
|
30
|
+
|
|
31
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
|
+
args[_key] = arguments[_key];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
36
|
+
_this.state = {
|
|
37
|
+
bodyExpanded: false
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
_this.getTranslatedBlankType = function (blank_type) {
|
|
41
|
+
switch (blank_type) {
|
|
42
|
+
case 'openEntry':
|
|
43
|
+
return t('Open Entry');
|
|
44
|
+
|
|
45
|
+
case 'wordbank':
|
|
46
|
+
return t('Word Bank');
|
|
47
|
+
|
|
48
|
+
case 'dropdown':
|
|
49
|
+
return t('Dropdown');
|
|
50
|
+
|
|
51
|
+
default:
|
|
52
|
+
return blank_type;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
_this.handleBodyToggle = function () {
|
|
57
|
+
_this.setState({
|
|
58
|
+
bodyExpanded: !_this.state.bodyExpanded
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
_this.renderTable = function () {
|
|
63
|
+
var _this$props = _this.props,
|
|
64
|
+
itemId = _this$props.itemId,
|
|
65
|
+
blank = _this$props.blank,
|
|
66
|
+
index = _this$props.index;
|
|
67
|
+
var choices = blank.choices;
|
|
68
|
+
var tableId = "".concat(itemId, "_").concat(index, "_choiceGroup");
|
|
69
|
+
var tableContainerSizeClass = '';
|
|
70
|
+
return jsx(ChoiceTypeTable, {
|
|
71
|
+
itemId: tableId,
|
|
72
|
+
choices: choices,
|
|
73
|
+
tableContainerSizeClass: tableContainerSizeClass
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
_this.renderBlankIcon = function () {
|
|
78
|
+
var index = _this.props.index;
|
|
79
|
+
var blankIconKey = "blank_icon_".concat(index);
|
|
80
|
+
return jsx(BlankIcon, {
|
|
81
|
+
key: blankIconKey,
|
|
82
|
+
number: index + 1
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
_this.renderHeadLine = function () {
|
|
87
|
+
var _this$props2 = _this.props,
|
|
88
|
+
blank = _this$props2.blank,
|
|
89
|
+
blankInfo = _this$props2.blankInfo;
|
|
90
|
+
var blank_text = blank.blank_text,
|
|
91
|
+
blank_type = blank.blank_type;
|
|
92
|
+
var blankTextAndType = "".concat(blank_text, " (").concat(_this.getTranslatedBlankType(blank_type), ")");
|
|
93
|
+
return jsx(Flex, {
|
|
94
|
+
overflowY: "visible",
|
|
95
|
+
direction: "row",
|
|
96
|
+
alignItems: "start",
|
|
97
|
+
wrap: "wrap"
|
|
98
|
+
}, jsx(Flex.Item, null, _this.renderBlankIcon()), jsx(Flex.Item, {
|
|
99
|
+
margin: "xxx-small medium small x-small"
|
|
100
|
+
}, jsx(Text, {
|
|
101
|
+
weight: "bold"
|
|
102
|
+
}, blankTextAndType)), jsx(Flex.Item, {
|
|
103
|
+
shouldShrink: true,
|
|
104
|
+
margin: "xxx-small none small none"
|
|
105
|
+
}, blankInfo));
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
_this.renderGroup = function () {
|
|
109
|
+
return jsx(Flex, {
|
|
110
|
+
direction: "row",
|
|
111
|
+
alignItems: "start"
|
|
112
|
+
}, jsx(Flex.Item, {
|
|
113
|
+
shouldShrink: true,
|
|
114
|
+
shouldGrow: true,
|
|
115
|
+
margin: "xx-small none none none"
|
|
116
|
+
}, _this.renderHeadLine()), jsx(Flex.Item, {
|
|
117
|
+
margin: "none none none x-small"
|
|
118
|
+
}, jsx(ExpandButton, {
|
|
119
|
+
onClick: _this.handleBodyToggle,
|
|
120
|
+
title: _this.state.bodyExpanded ? t('collapse group result') : t('expand group result'),
|
|
121
|
+
isExpanded: _this.state.bodyExpanded
|
|
122
|
+
})));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
_this.render = function () {
|
|
126
|
+
return jsx("div", {
|
|
127
|
+
css: _this.props.styles.groupWrapper
|
|
128
|
+
}, jsx(Card, {
|
|
129
|
+
css: _this.props.styles.cardWrapper
|
|
130
|
+
}, jsx(Flex, {
|
|
131
|
+
direction: "column",
|
|
132
|
+
justifyItems: "start"
|
|
133
|
+
}, jsx(Flex.Item, {
|
|
134
|
+
overflowY: "visible"
|
|
135
|
+
}, jsx(Flex.Item, {
|
|
136
|
+
shouldGrow: true,
|
|
137
|
+
shouldShrink: true
|
|
138
|
+
}, jsx(Flex, {
|
|
139
|
+
direction: "column",
|
|
140
|
+
justifyItems: "start"
|
|
141
|
+
}, jsx(Flex.Item, {
|
|
142
|
+
shouldShrink: true,
|
|
143
|
+
padding: "x-small small x-small medium",
|
|
144
|
+
overflowY: "hidden"
|
|
145
|
+
}, _this.renderGroup()), _this.state.bodyExpanded && jsx(Flex.Item, {
|
|
146
|
+
shouldShrink: true,
|
|
147
|
+
padding: "x-small small x-small small"
|
|
148
|
+
}, _this.renderTable())))))));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return _this;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return ChoiceGroupTypeTable;
|
|
155
|
+
}(Component), _class2.propTypes = {
|
|
156
|
+
itemId: PropTypes.number.isRequired,
|
|
157
|
+
blank: PropTypes.shape({
|
|
158
|
+
choices: PropTypes.arrayOf(choiceTypeObject).isRequired,
|
|
159
|
+
blank_text: PropTypes.string.isRequired,
|
|
160
|
+
blank_type: PropTypes.string.isRequired
|
|
161
|
+
}).isRequired,
|
|
162
|
+
blankInfo: PropTypes.node.isRequired,
|
|
163
|
+
index: PropTypes.number.isRequired,
|
|
164
|
+
styles: PropTypes.object
|
|
165
|
+
}.isRequired, _temp)) || _class);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
groupWrapper: {
|
|
4
|
+
padding: '0',
|
|
5
|
+
width: 'calc(25% + 350px)',
|
|
6
|
+
minWidth: componentTheme.cardMinWidth,
|
|
7
|
+
maxWidth: '100%'
|
|
8
|
+
},
|
|
9
|
+
cardWrapper: {
|
|
10
|
+
margin: "0 0 ".concat(componentTheme.cardBottomMargin, " 0")
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default generateStyle;
|
|
@@ -12,21 +12,22 @@ import { Table } from '@instructure/ui-table';
|
|
|
12
12
|
import { themeable } from '@instructure/ui-themeable';
|
|
13
13
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
14
14
|
import PropTypes from 'prop-types';
|
|
15
|
-
import {
|
|
15
|
+
import { choiceTypeObject } from "../../../propTypes.js";
|
|
16
16
|
var styles = {
|
|
17
|
-
componentId: '
|
|
17
|
+
componentId: 'cYrxJ',
|
|
18
18
|
template: function template(theme) {
|
|
19
|
-
return "\n\n.
|
|
19
|
+
return "\n\n.cYrxJ_rMrG{display:flex;flex-basis:100%;flex-direction:column;padding-bottom:".concat(theme.tableBottomPadding || 'inherit', "}\n\n.cYrxJ_fgIl{max-width:100%;width:calc(25% + 350px)}\n\n.cYrxJ_SVtU table{border-collapse:separate;border-spacing:0 1px}\n\n.cYrxJ_eviJ table thead tr td,.cYrxJ_eviJ table thead tr th{border-bottom:solid 0.0625rem ").concat(theme.colorGray || 'inherit', "}\n\n.cYrxJ_SVtU table tbody tr th{font-weight:400;width:33.33%}\n\n.cYrxJ_SVtU table tbody tr td{width:33.33%}\n\n.cYrxJ_cvRx{align-items:center;display:flex;height:100%;justify-content:center;min-height:47px;width:46px}\n\n.cYrxJ_EKAb{background-color:").concat(theme.colorGreen || 'inherit', "}\n\n.cYrxJ_EKAb svg{fill:#fff}\n\n.cYrxJ_cCmC{align-items:center;display:flex;height:calc(100% - 4px);justify-content:center}\n\n.cYrxJ_dJVn{padding:").concat(theme.cellPadding || 'inherit', "}\n\n.cYrxJ_eEOp td,.cYrxJ_eEOp th{border-bottom:solid 0.0625rem ").concat(theme.colorGray || 'inherit', "}\n\n.cYrxJ_UAZE td{border-width:2px 0 2px 0}\n\n.cYrxJ_UAZE td,.cYrxJ_UAZE th:first-child{border-color:").concat(theme.colorGreen || 'inherit', ";border-style:solid}\n\n.cYrxJ_UAZE th:first-child{border-radius:4px 0 0 4px;border-width:2px 0 2px 2px}\n\n.cYrxJ_UAZE td:last-child{border-color:").concat(theme.colorGreen || 'inherit', ";border-radius:0 4px 4px 0;border-style:solid;border-width:2px 2px 2px 0}");
|
|
20
20
|
},
|
|
21
|
-
'tableWrapper': '
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
21
|
+
'tableWrapper': 'cYrxJ_rMrG',
|
|
22
|
+
'tableWidthMax': 'cYrxJ_fgIl',
|
|
23
|
+
'tableContainer': 'cYrxJ_SVtU',
|
|
24
|
+
'headerGrayBottomBorder': 'cYrxJ_eviJ',
|
|
25
|
+
'iconWrapper': 'cYrxJ_cvRx',
|
|
26
|
+
'iconCorrect': 'cYrxJ_EKAb',
|
|
27
|
+
'textContainer': 'cYrxJ_cCmC',
|
|
28
|
+
'firstTextContainer': 'cYrxJ_dJVn',
|
|
29
|
+
'incorrectRow': 'cYrxJ_eEOp',
|
|
30
|
+
'correctRow': 'cYrxJ_UAZE'
|
|
30
31
|
};
|
|
31
32
|
import theme from "./theme.js";
|
|
32
33
|
import classNames from 'classnames';
|
|
@@ -96,8 +97,7 @@ export var ChoiceTypeTable = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
96
97
|
};
|
|
97
98
|
|
|
98
99
|
_this.getDataIconAttribute = function (correct, choiceIndex) {
|
|
99
|
-
var
|
|
100
|
-
var choices = answerSummary.choices;
|
|
100
|
+
var choices = _this.props.choices;
|
|
101
101
|
|
|
102
102
|
if (_this.nextChoiceIsCorrect(choices, choiceIndex + 1) && !correct) {
|
|
103
103
|
return '';
|
|
@@ -171,13 +171,13 @@ export var ChoiceTypeTable = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
171
171
|
|
|
172
172
|
_this.render = function () {
|
|
173
173
|
var _this$props = _this.props,
|
|
174
|
-
|
|
175
|
-
itemId = _this$props.itemId
|
|
176
|
-
|
|
174
|
+
choices = _this$props.choices,
|
|
175
|
+
itemId = _this$props.itemId,
|
|
176
|
+
tableContainerSizeClass = _this$props.tableContainerSizeClass;
|
|
177
177
|
var answerHeaderId = "answer-frequency-summary-answer-".concat(itemId);
|
|
178
178
|
var respondentsHeaderId = "answer-frequency-summary-respondents-".concat(itemId);
|
|
179
179
|
var percentageHeaderId = "answer-frequency-summary-percentage-".concat(itemId);
|
|
180
|
-
var containerClasses = classNames(styles.tableContainer, _defineProperty({}, styles.headerGrayBottomBorder, !_this.nextChoiceIsCorrect(choices, 0)));
|
|
180
|
+
var containerClasses = classNames(tableContainerSizeClass, styles.tableContainer, _defineProperty({}, styles.headerGrayBottomBorder, !_this.nextChoiceIsCorrect(choices, 0)));
|
|
181
181
|
return /*#__PURE__*/React.createElement("div", {
|
|
182
182
|
className: containerClasses
|
|
183
183
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
@@ -206,5 +206,8 @@ export var ChoiceTypeTable = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
206
206
|
return ChoiceTypeTable;
|
|
207
207
|
}(Component), _class2.propTypes = {
|
|
208
208
|
itemId: PropTypes.number,
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
choices: PropTypes.arrayOf(choiceTypeObject),
|
|
210
|
+
tableContainerClass: PropTypes.string
|
|
211
|
+
}.isRequired, _class2.defaultProps = {
|
|
212
|
+
tableContainerSizeClass: styles.tableWidthMax
|
|
213
|
+
}, _temp)) || _class);
|
|
@@ -26,11 +26,11 @@ export var quizAnalysisPropType = PropTypes.shape({
|
|
|
26
26
|
average_attempts: PropTypes.number
|
|
27
27
|
}).isRequired
|
|
28
28
|
});
|
|
29
|
-
var aggregateDetailPropType = PropTypes.shape({
|
|
29
|
+
export var aggregateDetailPropType = PropTypes.shape({
|
|
30
30
|
count: PropTypes.number.isRequired,
|
|
31
31
|
percentage: PropTypes.number.isRequired
|
|
32
32
|
});
|
|
33
|
-
var aggregatePropType = PropTypes.shape({
|
|
33
|
+
export var aggregatePropType = PropTypes.shape({
|
|
34
34
|
correct: aggregateDetailPropType.isRequired,
|
|
35
35
|
incorrect: aggregateDetailPropType.isRequired,
|
|
36
36
|
partial_correct: aggregateDetailPropType
|
|
@@ -39,14 +39,16 @@ export var onlyAggregatePropType = PropTypes.shape({
|
|
|
39
39
|
no_answer: aggregateDetailPropType,
|
|
40
40
|
aggregate: aggregatePropType
|
|
41
41
|
});
|
|
42
|
+
export var choiceTypeObject = PropTypes.shape({
|
|
43
|
+
body: PropTypes.string,
|
|
44
|
+
correct: PropTypes.bool,
|
|
45
|
+
count: PropTypes.number,
|
|
46
|
+
percentage: PropTypes.number
|
|
47
|
+
});
|
|
42
48
|
export var choiceTypeAnswerSummaryPropType = PropTypes.shape({
|
|
43
|
-
choices: PropTypes.arrayOf(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
count: PropTypes.number,
|
|
47
|
-
percentage: PropTypes.number
|
|
48
|
-
})),
|
|
49
|
-
no_answer: aggregateDetailPropType
|
|
49
|
+
choices: PropTypes.arrayOf(choiceTypeObject),
|
|
50
|
+
no_answer: aggregateDetailPropType,
|
|
51
|
+
aggregate: aggregatePropType
|
|
50
52
|
});
|
|
51
53
|
export var matchingTypeAnswerSummaryPropType = PropTypes.shape({
|
|
52
54
|
questions: PropTypes.objectOf(PropTypes.shape({
|
|
@@ -57,9 +59,25 @@ export var matchingTypeAnswerSummaryPropType = PropTypes.shape({
|
|
|
57
59
|
body: PropTypes.string,
|
|
58
60
|
distractor: PropTypes.bool
|
|
59
61
|
}))
|
|
60
|
-
}))
|
|
62
|
+
})),
|
|
63
|
+
no_answer: aggregateDetailPropType,
|
|
64
|
+
aggregate: aggregatePropType
|
|
65
|
+
});
|
|
66
|
+
export var richFillBlankTypeAnswerSummaryPropType = PropTypes.shape({
|
|
67
|
+
blanks: PropTypes.arrayOf(PropTypes.shape({
|
|
68
|
+
choices: PropTypes.arrayOf(choiceTypeObject),
|
|
69
|
+
blank_text: PropTypes.string,
|
|
70
|
+
blank_type: PropTypes.string,
|
|
71
|
+
no_answer: PropTypes.number,
|
|
72
|
+
aggregate: PropTypes.shape({
|
|
73
|
+
correct: PropTypes.number,
|
|
74
|
+
incorrect: PropTypes.number
|
|
75
|
+
})
|
|
76
|
+
})),
|
|
77
|
+
no_answer: aggregateDetailPropType,
|
|
78
|
+
aggregate: aggregatePropType
|
|
61
79
|
});
|
|
62
|
-
export var answerSummaryPropType = PropTypes.oneOfType([choiceTypeAnswerSummaryPropType, onlyAggregatePropType, matchingTypeAnswerSummaryPropType]);
|
|
80
|
+
export var answerSummaryPropType = PropTypes.oneOfType([choiceTypeAnswerSummaryPropType, onlyAggregatePropType, matchingTypeAnswerSummaryPropType, richFillBlankTypeAnswerSummaryPropType]);
|
|
63
81
|
export var itemAnalysisPropType = PropTypes.shape({
|
|
64
82
|
attempts: PropTypes.shape({
|
|
65
83
|
students_responded: PropTypes.number,
|
|
@@ -19,7 +19,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
|
|
20
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
21
|
|
|
22
|
-
var _index = _interopRequireDefault(require("
|
|
22
|
+
var _index = _interopRequireDefault(require("../shared/ChoiceTypeTable/index.js"));
|
|
23
23
|
|
|
24
24
|
var _propTypes2 = require("../../propTypes.js");
|
|
25
25
|
|
|
@@ -52,7 +52,7 @@ var ChoiceType = /*#__PURE__*/function (_Component) {
|
|
|
52
52
|
return /*#__PURE__*/_react.default.createElement(_index3.default, null, /*#__PURE__*/_react.default.createElement(_presenter.AfsPartsContainer, {
|
|
53
53
|
afsTable: /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
54
54
|
itemId: itemId,
|
|
55
|
-
|
|
55
|
+
choices: answerSummary.choices
|
|
56
56
|
}),
|
|
57
57
|
aggregationTable: /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
58
58
|
itemId: itemId,
|
|
@@ -138,6 +138,7 @@ var MatchingTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
138
138
|
padding: '0 0 0 0'
|
|
139
139
|
}
|
|
140
140
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, correct ? "".concat((0, _formatMessage.default)('Correct answer'), ": ").concat(count) : count), /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
"aria-hidden": "true",
|
|
141
142
|
className: containerClassNames
|
|
142
143
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
143
144
|
direction: "row",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _presenter.RichFillBlankType;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _presenter = require("./presenter.js");
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.RichFillBlankType = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
+
|
|
14
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
15
|
+
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
|
+
var _propTypes2 = require("../../propTypes.js");
|
|
21
|
+
|
|
22
|
+
var _index = _interopRequireDefault(require("../shared/AfsTableWrapper/index.js"));
|
|
23
|
+
|
|
24
|
+
var _presenter = require("../shared/AfsPartsContainer/presenter.js");
|
|
25
|
+
|
|
26
|
+
var _index2 = _interopRequireDefault(require("../shared/ChoiceGroupTypeTable/index.js"));
|
|
27
|
+
|
|
28
|
+
var _uiText = require("@instructure/ui-text");
|
|
29
|
+
|
|
30
|
+
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
31
|
+
|
|
32
|
+
var _index3 = _interopRequireDefault(require("../shared/AggregationTable/index.js"));
|
|
33
|
+
|
|
34
|
+
var _emotion = require("@instructure/emotion");
|
|
35
|
+
|
|
36
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
37
|
+
|
|
38
|
+
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
39
|
+
|
|
40
|
+
var _dec, _class, _class2, _temp;
|
|
41
|
+
|
|
42
|
+
var RichFillBlankType = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
43
|
+
(0, _inherits2.default)(RichFillBlankType, _Component);
|
|
44
|
+
|
|
45
|
+
var _super = (0, _createSuper2.default)(RichFillBlankType);
|
|
46
|
+
|
|
47
|
+
function RichFillBlankType() {
|
|
48
|
+
var _this;
|
|
49
|
+
|
|
50
|
+
(0, _classCallCheck2.default)(this, RichFillBlankType);
|
|
51
|
+
|
|
52
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
53
|
+
args[_key] = arguments[_key];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
57
|
+
|
|
58
|
+
_this.renderBlankInfo = function (blank) {
|
|
59
|
+
var _blank$aggregate, _blank$aggregate2;
|
|
60
|
+
|
|
61
|
+
var correctCount = (blank === null || blank === void 0 ? void 0 : (_blank$aggregate = blank.aggregate) === null || _blank$aggregate === void 0 ? void 0 : _blank$aggregate.correct) || 0;
|
|
62
|
+
var incorrectCount = (blank === null || blank === void 0 ? void 0 : (_blank$aggregate2 = blank.aggregate) === null || _blank$aggregate2 === void 0 ? void 0 : _blank$aggregate2.incorrect) || 0;
|
|
63
|
+
var noAnswer = (blank === null || blank === void 0 ? void 0 : blank.no_answer) || 0;
|
|
64
|
+
var correctString = "".concat((0, _formatMessage.default)('Correct'), ": ").concat(correctCount, " ");
|
|
65
|
+
var incorrectString = "".concat((0, _formatMessage.default)('Incorrect'), ": ").concat(incorrectCount, " ");
|
|
66
|
+
var noAnswerString = "".concat((0, _formatMessage.default)('No Answer'), ": ").concat(noAnswer, " ");
|
|
67
|
+
return (0, _emotion.jsx)("div", {
|
|
68
|
+
css: _this.props.styles.groupAggregationContainer
|
|
69
|
+
}, (0, _emotion.jsx)(_uiText.Text, null, correctString), (0, _emotion.jsx)(_uiText.Text, null, incorrectString), (0, _emotion.jsx)(_uiText.Text, null, noAnswerString));
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
_this.renderGroup = function (key, itemId, blank, index) {
|
|
73
|
+
return (0, _emotion.jsx)(_index2.default, {
|
|
74
|
+
key: key,
|
|
75
|
+
itemId: itemId,
|
|
76
|
+
blank: blank,
|
|
77
|
+
blankInfo: _this.renderBlankInfo(blank),
|
|
78
|
+
index: index
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.renderGroups = function () {
|
|
83
|
+
var _this$props = _this.props,
|
|
84
|
+
answerSummary = _this$props.answerSummary,
|
|
85
|
+
itemId = _this$props.itemId;
|
|
86
|
+
var blanks = answerSummary.blanks;
|
|
87
|
+
return blanks.map(function (blank, index) {
|
|
88
|
+
var key = "ChoiceGroupTypeTable_".concat(index);
|
|
89
|
+
return _this.renderGroup(key, itemId, blank, index);
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
_this.render = function () {
|
|
94
|
+
var _this$props2 = _this.props,
|
|
95
|
+
answerSummary = _this$props2.answerSummary,
|
|
96
|
+
itemId = _this$props2.itemId;
|
|
97
|
+
return (0, _emotion.jsx)(_index.default, null, (0, _emotion.jsx)(_presenter.AfsPartsContainer, {
|
|
98
|
+
afsTable: _this.renderGroups(),
|
|
99
|
+
aggregationTable: (0, _emotion.jsx)(_index3.default, {
|
|
100
|
+
itemId: itemId,
|
|
101
|
+
answerSummary: answerSummary
|
|
102
|
+
})
|
|
103
|
+
}));
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
return _this;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return RichFillBlankType;
|
|
110
|
+
}(_react.Component), _class2.propTypes = {
|
|
111
|
+
itemId: _propTypes.default.number.isRequired,
|
|
112
|
+
answerSummary: _propTypes2.richFillBlankTypeAnswerSummaryPropType.isRequired,
|
|
113
|
+
styles: _propTypes.default.object
|
|
114
|
+
}.isRequired, _temp)) || _class);
|
|
115
|
+
exports.RichFillBlankType = RichFillBlankType;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
groupAggregationContainer: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
gap: componentTheme.aggregateSpacing
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var _default = generateStyle;
|
|
18
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
|
+
var spacing = _ref.spacing;
|
|
10
|
+
return {
|
|
11
|
+
aggregateSpacing: spacing.xSmall
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var _default = generateComponentTheme;
|
|
16
|
+
exports.default = _default;
|
|
@@ -23,9 +23,11 @@ var _index = _interopRequireDefault(require("./LegacyChoiceType/index.js"));
|
|
|
23
23
|
|
|
24
24
|
var _index2 = _interopRequireDefault(require("./ChoiceType/index.js"));
|
|
25
25
|
|
|
26
|
-
var _index3 = _interopRequireDefault(require("./
|
|
26
|
+
var _index3 = _interopRequireDefault(require("./RichFillBlankType/index.js"));
|
|
27
27
|
|
|
28
|
-
var _index4 = require("./
|
|
28
|
+
var _index4 = _interopRequireDefault(require("./AggregationType/index.js"));
|
|
29
|
+
|
|
30
|
+
var _index5 = require("./MatchingType/index.js");
|
|
29
31
|
|
|
30
32
|
var _propTypes = require("../propTypes.js");
|
|
31
33
|
|
|
@@ -48,23 +50,23 @@ var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
48
50
|
|
|
49
51
|
_this.addAfsComponentsByFlags = function (afsFlags) {
|
|
50
52
|
if (afsFlags.formulaEnabled) {
|
|
51
|
-
_this.afsTableComponentMap.set('formula',
|
|
53
|
+
_this.afsTableComponentMap.set('formula', _index4.default);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
if (afsFlags.hotSpotEnabled) {
|
|
55
|
-
_this.afsTableComponentMap.set('hot-spot',
|
|
57
|
+
_this.afsTableComponentMap.set('hot-spot', _index4.default);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
if (afsFlags.matchingEnabled) {
|
|
59
|
-
_this.afsTableComponentMap.set('matching',
|
|
61
|
+
_this.afsTableComponentMap.set('matching', _index5.MatchingType);
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
if (afsFlags.orderingEnabled) {
|
|
63
|
-
_this.afsTableComponentMap.set('ordering',
|
|
65
|
+
_this.afsTableComponentMap.set('ordering', _index5.OrderingType);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
if (afsFlags.categorizationEnabled) {
|
|
67
|
-
_this.afsTableComponentMap.set('categorization',
|
|
69
|
+
_this.afsTableComponentMap.set('categorization', _index5.CategorizationType);
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
if (afsFlags.trueFalseEnabled) {
|
|
@@ -78,6 +80,10 @@ var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
|
78
80
|
if (afsFlags.multiAnswerEnabled) {
|
|
79
81
|
_this.afsTableComponentMap.set('multi-answer', _index2.default);
|
|
80
82
|
}
|
|
83
|
+
|
|
84
|
+
if (afsFlags.fillInTheBlankEnabled) {
|
|
85
|
+
_this.afsTableComponentMap.set('rich-fill-blank', _index3.default);
|
|
86
|
+
}
|
|
81
87
|
};
|
|
82
88
|
|
|
83
89
|
_this.render = function () {
|
|
@@ -23,8 +23,6 @@ var _uiTable = require("@instructure/ui-table");
|
|
|
23
23
|
|
|
24
24
|
var _propTypes = require("../../../propTypes.js");
|
|
25
25
|
|
|
26
|
-
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
27
|
-
|
|
28
26
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
29
27
|
|
|
30
28
|
var _uiIcons = require("@instructure/ui-icons");
|
|
@@ -124,7 +122,7 @@ var AggregationTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
|
|
|
124
122
|
themeOverride: {
|
|
125
123
|
padding: '0px'
|
|
126
124
|
}
|
|
127
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
128
126
|
direction: "row",
|
|
129
127
|
alignItems: "center"
|
|
130
128
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _presenter.ChoiceGroupTypeTable;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _presenter = require("./presenter.js");
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.ChoiceGroupTypeTable = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
+
|
|
14
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
15
|
+
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
|
+
var _propTypes2 = require("../../../propTypes.js");
|
|
21
|
+
|
|
22
|
+
var _uiFlex = require("@instructure/ui-flex");
|
|
23
|
+
|
|
24
|
+
var _uiText = require("@instructure/ui-text");
|
|
25
|
+
|
|
26
|
+
var _index = _interopRequireDefault(require("../../../../../../../common/components/shared/ExpandButton/index.js"));
|
|
27
|
+
|
|
28
|
+
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
29
|
+
|
|
30
|
+
var _index2 = _interopRequireDefault(require("../../../../../../../common/components/shared/Card/index.js"));
|
|
31
|
+
|
|
32
|
+
var _index3 = _interopRequireDefault(require("../ChoiceTypeTable/index.js"));
|
|
33
|
+
|
|
34
|
+
var _index4 = _interopRequireDefault(require("../../../NewItemAnalysis/BlankIcon/index.js"));
|
|
35
|
+
|
|
36
|
+
var _emotion = require("@instructure/emotion");
|
|
37
|
+
|
|
38
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
39
|
+
|
|
40
|
+
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
41
|
+
|
|
42
|
+
var _dec, _class, _class2, _temp;
|
|
43
|
+
|
|
44
|
+
var ChoiceGroupTypeTable = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
45
|
+
(0, _inherits2.default)(ChoiceGroupTypeTable, _Component);
|
|
46
|
+
|
|
47
|
+
var _super = (0, _createSuper2.default)(ChoiceGroupTypeTable);
|
|
48
|
+
|
|
49
|
+
function ChoiceGroupTypeTable() {
|
|
50
|
+
var _this;
|
|
51
|
+
|
|
52
|
+
(0, _classCallCheck2.default)(this, ChoiceGroupTypeTable);
|
|
53
|
+
|
|
54
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
|
+
args[_key] = arguments[_key];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
59
|
+
_this.state = {
|
|
60
|
+
bodyExpanded: false
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
_this.getTranslatedBlankType = function (blank_type) {
|
|
64
|
+
switch (blank_type) {
|
|
65
|
+
case 'openEntry':
|
|
66
|
+
return (0, _formatMessage.default)('Open Entry');
|
|
67
|
+
|
|
68
|
+
case 'wordbank':
|
|
69
|
+
return (0, _formatMessage.default)('Word Bank');
|
|
70
|
+
|
|
71
|
+
case 'dropdown':
|
|
72
|
+
return (0, _formatMessage.default)('Dropdown');
|
|
73
|
+
|
|
74
|
+
default:
|
|
75
|
+
return blank_type;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
_this.handleBodyToggle = function () {
|
|
80
|
+
_this.setState({
|
|
81
|
+
bodyExpanded: !_this.state.bodyExpanded
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
_this.renderTable = function () {
|
|
86
|
+
var _this$props = _this.props,
|
|
87
|
+
itemId = _this$props.itemId,
|
|
88
|
+
blank = _this$props.blank,
|
|
89
|
+
index = _this$props.index;
|
|
90
|
+
var choices = blank.choices;
|
|
91
|
+
var tableId = "".concat(itemId, "_").concat(index, "_choiceGroup");
|
|
92
|
+
var tableContainerSizeClass = '';
|
|
93
|
+
return (0, _emotion.jsx)(_index3.default, {
|
|
94
|
+
itemId: tableId,
|
|
95
|
+
choices: choices,
|
|
96
|
+
tableContainerSizeClass: tableContainerSizeClass
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
_this.renderBlankIcon = function () {
|
|
101
|
+
var index = _this.props.index;
|
|
102
|
+
var blankIconKey = "blank_icon_".concat(index);
|
|
103
|
+
return (0, _emotion.jsx)(_index4.default, {
|
|
104
|
+
key: blankIconKey,
|
|
105
|
+
number: index + 1
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
_this.renderHeadLine = function () {
|
|
110
|
+
var _this$props2 = _this.props,
|
|
111
|
+
blank = _this$props2.blank,
|
|
112
|
+
blankInfo = _this$props2.blankInfo;
|
|
113
|
+
var blank_text = blank.blank_text,
|
|
114
|
+
blank_type = blank.blank_type;
|
|
115
|
+
var blankTextAndType = "".concat(blank_text, " (").concat(_this.getTranslatedBlankType(blank_type), ")");
|
|
116
|
+
return (0, _emotion.jsx)(_uiFlex.Flex, {
|
|
117
|
+
overflowY: "visible",
|
|
118
|
+
direction: "row",
|
|
119
|
+
alignItems: "start",
|
|
120
|
+
wrap: "wrap"
|
|
121
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex.Item, null, _this.renderBlankIcon()), (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
122
|
+
margin: "xxx-small medium small x-small"
|
|
123
|
+
}, (0, _emotion.jsx)(_uiText.Text, {
|
|
124
|
+
weight: "bold"
|
|
125
|
+
}, blankTextAndType)), (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
126
|
+
shouldShrink: true,
|
|
127
|
+
margin: "xxx-small none small none"
|
|
128
|
+
}, blankInfo));
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
_this.renderGroup = function () {
|
|
132
|
+
return (0, _emotion.jsx)(_uiFlex.Flex, {
|
|
133
|
+
direction: "row",
|
|
134
|
+
alignItems: "start"
|
|
135
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
136
|
+
shouldShrink: true,
|
|
137
|
+
shouldGrow: true,
|
|
138
|
+
margin: "xx-small none none none"
|
|
139
|
+
}, _this.renderHeadLine()), (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
140
|
+
margin: "none none none x-small"
|
|
141
|
+
}, (0, _emotion.jsx)(_index.default, {
|
|
142
|
+
onClick: _this.handleBodyToggle,
|
|
143
|
+
title: _this.state.bodyExpanded ? (0, _formatMessage.default)('collapse group result') : (0, _formatMessage.default)('expand group result'),
|
|
144
|
+
isExpanded: _this.state.bodyExpanded
|
|
145
|
+
})));
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
_this.render = function () {
|
|
149
|
+
return (0, _emotion.jsx)("div", {
|
|
150
|
+
css: _this.props.styles.groupWrapper
|
|
151
|
+
}, (0, _emotion.jsx)(_index2.default, {
|
|
152
|
+
css: _this.props.styles.cardWrapper
|
|
153
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex, {
|
|
154
|
+
direction: "column",
|
|
155
|
+
justifyItems: "start"
|
|
156
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
157
|
+
overflowY: "visible"
|
|
158
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
159
|
+
shouldGrow: true,
|
|
160
|
+
shouldShrink: true
|
|
161
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex, {
|
|
162
|
+
direction: "column",
|
|
163
|
+
justifyItems: "start"
|
|
164
|
+
}, (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
165
|
+
shouldShrink: true,
|
|
166
|
+
padding: "x-small small x-small medium",
|
|
167
|
+
overflowY: "hidden"
|
|
168
|
+
}, _this.renderGroup()), _this.state.bodyExpanded && (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
169
|
+
shouldShrink: true,
|
|
170
|
+
padding: "x-small small x-small small"
|
|
171
|
+
}, _this.renderTable())))))));
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
return _this;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return ChoiceGroupTypeTable;
|
|
178
|
+
}(_react.Component), _class2.propTypes = {
|
|
179
|
+
itemId: _propTypes.default.number.isRequired,
|
|
180
|
+
blank: _propTypes.default.shape({
|
|
181
|
+
choices: _propTypes.default.arrayOf(_propTypes2.choiceTypeObject).isRequired,
|
|
182
|
+
blank_text: _propTypes.default.string.isRequired,
|
|
183
|
+
blank_type: _propTypes.default.string.isRequired
|
|
184
|
+
}).isRequired,
|
|
185
|
+
blankInfo: _propTypes.default.node.isRequired,
|
|
186
|
+
index: _propTypes.default.number.isRequired,
|
|
187
|
+
styles: _propTypes.default.object
|
|
188
|
+
}.isRequired, _temp)) || _class);
|
|
189
|
+
exports.ChoiceGroupTypeTable = ChoiceGroupTypeTable;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
groupWrapper: {
|
|
11
|
+
padding: '0',
|
|
12
|
+
width: 'calc(25% + 350px)',
|
|
13
|
+
minWidth: componentTheme.cardMinWidth,
|
|
14
|
+
maxWidth: '100%'
|
|
15
|
+
},
|
|
16
|
+
cardWrapper: {
|
|
17
|
+
margin: "0 0 ".concat(componentTheme.cardBottomMargin, " 0")
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var _default = generateStyle;
|
|
23
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
|
+
var spacing = _ref.spacing;
|
|
10
|
+
return {
|
|
11
|
+
cardBottomMargin: spacing.xSmall,
|
|
12
|
+
cardMinWidth: '500px'
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var _default = generateComponentTheme;
|
|
17
|
+
exports.default = _default;
|
|
@@ -48,19 +48,20 @@ var _uiText = require("@instructure/ui-text");
|
|
|
48
48
|
var _rowStyleMap, _dec, _class, _class2, _temp;
|
|
49
49
|
|
|
50
50
|
var styles = {
|
|
51
|
-
componentId: '
|
|
51
|
+
componentId: 'cYrxJ',
|
|
52
52
|
template: function template(theme) {
|
|
53
|
-
return "\n\n.
|
|
53
|
+
return "\n\n.cYrxJ_rMrG{display:flex;flex-basis:100%;flex-direction:column;padding-bottom:".concat(theme.tableBottomPadding || 'inherit', "}\n\n.cYrxJ_fgIl{max-width:100%;width:calc(25% + 350px)}\n\n.cYrxJ_SVtU table{border-collapse:separate;border-spacing:0 1px}\n\n.cYrxJ_eviJ table thead tr td,.cYrxJ_eviJ table thead tr th{border-bottom:solid 0.0625rem ").concat(theme.colorGray || 'inherit', "}\n\n.cYrxJ_SVtU table tbody tr th{font-weight:400;width:33.33%}\n\n.cYrxJ_SVtU table tbody tr td{width:33.33%}\n\n.cYrxJ_cvRx{align-items:center;display:flex;height:100%;justify-content:center;min-height:47px;width:46px}\n\n.cYrxJ_EKAb{background-color:").concat(theme.colorGreen || 'inherit', "}\n\n.cYrxJ_EKAb svg{fill:#fff}\n\n.cYrxJ_cCmC{align-items:center;display:flex;height:calc(100% - 4px);justify-content:center}\n\n.cYrxJ_dJVn{padding:").concat(theme.cellPadding || 'inherit', "}\n\n.cYrxJ_eEOp td,.cYrxJ_eEOp th{border-bottom:solid 0.0625rem ").concat(theme.colorGray || 'inherit', "}\n\n.cYrxJ_UAZE td{border-width:2px 0 2px 0}\n\n.cYrxJ_UAZE td,.cYrxJ_UAZE th:first-child{border-color:").concat(theme.colorGreen || 'inherit', ";border-style:solid}\n\n.cYrxJ_UAZE th:first-child{border-radius:4px 0 0 4px;border-width:2px 0 2px 2px}\n\n.cYrxJ_UAZE td:last-child{border-color:").concat(theme.colorGreen || 'inherit', ";border-radius:0 4px 4px 0;border-style:solid;border-width:2px 2px 2px 0}");
|
|
54
54
|
},
|
|
55
|
-
'tableWrapper': '
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
55
|
+
'tableWrapper': 'cYrxJ_rMrG',
|
|
56
|
+
'tableWidthMax': 'cYrxJ_fgIl',
|
|
57
|
+
'tableContainer': 'cYrxJ_SVtU',
|
|
58
|
+
'headerGrayBottomBorder': 'cYrxJ_eviJ',
|
|
59
|
+
'iconWrapper': 'cYrxJ_cvRx',
|
|
60
|
+
'iconCorrect': 'cYrxJ_EKAb',
|
|
61
|
+
'textContainer': 'cYrxJ_cCmC',
|
|
62
|
+
'firstTextContainer': 'cYrxJ_dJVn',
|
|
63
|
+
'incorrectRow': 'cYrxJ_eEOp',
|
|
64
|
+
'correctRow': 'cYrxJ_UAZE'
|
|
64
65
|
};
|
|
65
66
|
var correctAttribute = 'correct';
|
|
66
67
|
var incorrectAttribute = 'incorrect';
|
|
@@ -124,8 +125,7 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
124
125
|
};
|
|
125
126
|
|
|
126
127
|
_this.getDataIconAttribute = function (correct, choiceIndex) {
|
|
127
|
-
var
|
|
128
|
-
var choices = answerSummary.choices;
|
|
128
|
+
var choices = _this.props.choices;
|
|
129
129
|
|
|
130
130
|
if (_this.nextChoiceIsCorrect(choices, choiceIndex + 1) && !correct) {
|
|
131
131
|
return '';
|
|
@@ -199,13 +199,13 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
199
199
|
|
|
200
200
|
_this.render = function () {
|
|
201
201
|
var _this$props = _this.props,
|
|
202
|
-
|
|
203
|
-
itemId = _this$props.itemId
|
|
204
|
-
|
|
202
|
+
choices = _this$props.choices,
|
|
203
|
+
itemId = _this$props.itemId,
|
|
204
|
+
tableContainerSizeClass = _this$props.tableContainerSizeClass;
|
|
205
205
|
var answerHeaderId = "answer-frequency-summary-answer-".concat(itemId);
|
|
206
206
|
var respondentsHeaderId = "answer-frequency-summary-respondents-".concat(itemId);
|
|
207
207
|
var percentageHeaderId = "answer-frequency-summary-percentage-".concat(itemId);
|
|
208
|
-
var containerClasses = (0, _classnames.default)(styles.tableContainer, (0, _defineProperty2.default)({}, styles.headerGrayBottomBorder, !_this.nextChoiceIsCorrect(choices, 0)));
|
|
208
|
+
var containerClasses = (0, _classnames.default)(tableContainerSizeClass, styles.tableContainer, (0, _defineProperty2.default)({}, styles.headerGrayBottomBorder, !_this.nextChoiceIsCorrect(choices, 0)));
|
|
209
209
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
210
210
|
className: containerClasses
|
|
211
211
|
}, /*#__PURE__*/_react.default.createElement(_uiTable.Table, {
|
|
@@ -234,6 +234,9 @@ var ChoiceTypeTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
234
234
|
return ChoiceTypeTable;
|
|
235
235
|
}(_react.Component), _class2.propTypes = {
|
|
236
236
|
itemId: _propTypes.default.number,
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
choices: _propTypes.default.arrayOf(_propTypes2.choiceTypeObject),
|
|
238
|
+
tableContainerClass: _propTypes.default.string
|
|
239
|
+
}.isRequired, _class2.defaultProps = {
|
|
240
|
+
tableContainerSizeClass: styles.tableWidthMax
|
|
241
|
+
}, _temp)) || _class);
|
|
239
242
|
exports.ChoiceTypeTable = ChoiceTypeTable;
|
|
@@ -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.afsFlags = exports.itemAnalysisPropType = exports.answerSummaryPropType = exports.matchingTypeAnswerSummaryPropType = exports.choiceTypeAnswerSummaryPropType = exports.onlyAggregatePropType = exports.quizAnalysisPropType = exports.quizAnalysisMetadata = void 0;
|
|
8
|
+
exports.afsFlags = exports.itemAnalysisPropType = exports.answerSummaryPropType = exports.richFillBlankTypeAnswerSummaryPropType = exports.matchingTypeAnswerSummaryPropType = exports.choiceTypeAnswerSummaryPropType = exports.choiceTypeObject = exports.onlyAggregatePropType = exports.aggregatePropType = exports.aggregateDetailPropType = exports.quizAnalysisPropType = exports.quizAnalysisMetadata = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -47,12 +47,16 @@ var aggregateDetailPropType = _propTypes.default.shape({
|
|
|
47
47
|
percentage: _propTypes.default.number.isRequired
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
+
exports.aggregateDetailPropType = aggregateDetailPropType;
|
|
51
|
+
|
|
50
52
|
var aggregatePropType = _propTypes.default.shape({
|
|
51
53
|
correct: aggregateDetailPropType.isRequired,
|
|
52
54
|
incorrect: aggregateDetailPropType.isRequired,
|
|
53
55
|
partial_correct: aggregateDetailPropType
|
|
54
56
|
});
|
|
55
57
|
|
|
58
|
+
exports.aggregatePropType = aggregatePropType;
|
|
59
|
+
|
|
56
60
|
var onlyAggregatePropType = _propTypes.default.shape({
|
|
57
61
|
no_answer: aggregateDetailPropType,
|
|
58
62
|
aggregate: aggregatePropType
|
|
@@ -60,14 +64,19 @@ var onlyAggregatePropType = _propTypes.default.shape({
|
|
|
60
64
|
|
|
61
65
|
exports.onlyAggregatePropType = onlyAggregatePropType;
|
|
62
66
|
|
|
67
|
+
var choiceTypeObject = _propTypes.default.shape({
|
|
68
|
+
body: _propTypes.default.string,
|
|
69
|
+
correct: _propTypes.default.bool,
|
|
70
|
+
count: _propTypes.default.number,
|
|
71
|
+
percentage: _propTypes.default.number
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
exports.choiceTypeObject = choiceTypeObject;
|
|
75
|
+
|
|
63
76
|
var choiceTypeAnswerSummaryPropType = _propTypes.default.shape({
|
|
64
|
-
choices: _propTypes.default.arrayOf(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
count: _propTypes.default.number,
|
|
68
|
-
percentage: _propTypes.default.number
|
|
69
|
-
})),
|
|
70
|
-
no_answer: aggregateDetailPropType
|
|
77
|
+
choices: _propTypes.default.arrayOf(choiceTypeObject),
|
|
78
|
+
no_answer: aggregateDetailPropType,
|
|
79
|
+
aggregate: aggregatePropType
|
|
71
80
|
});
|
|
72
81
|
|
|
73
82
|
exports.choiceTypeAnswerSummaryPropType = choiceTypeAnswerSummaryPropType;
|
|
@@ -81,12 +90,31 @@ var matchingTypeAnswerSummaryPropType = _propTypes.default.shape({
|
|
|
81
90
|
body: _propTypes.default.string,
|
|
82
91
|
distractor: _propTypes.default.bool
|
|
83
92
|
}))
|
|
84
|
-
}))
|
|
93
|
+
})),
|
|
94
|
+
no_answer: aggregateDetailPropType,
|
|
95
|
+
aggregate: aggregatePropType
|
|
85
96
|
});
|
|
86
97
|
|
|
87
98
|
exports.matchingTypeAnswerSummaryPropType = matchingTypeAnswerSummaryPropType;
|
|
88
99
|
|
|
89
|
-
var
|
|
100
|
+
var richFillBlankTypeAnswerSummaryPropType = _propTypes.default.shape({
|
|
101
|
+
blanks: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
102
|
+
choices: _propTypes.default.arrayOf(choiceTypeObject),
|
|
103
|
+
blank_text: _propTypes.default.string,
|
|
104
|
+
blank_type: _propTypes.default.string,
|
|
105
|
+
no_answer: _propTypes.default.number,
|
|
106
|
+
aggregate: _propTypes.default.shape({
|
|
107
|
+
correct: _propTypes.default.number,
|
|
108
|
+
incorrect: _propTypes.default.number
|
|
109
|
+
})
|
|
110
|
+
})),
|
|
111
|
+
no_answer: aggregateDetailPropType,
|
|
112
|
+
aggregate: aggregatePropType
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
exports.richFillBlankTypeAnswerSummaryPropType = richFillBlankTypeAnswerSummaryPropType;
|
|
116
|
+
|
|
117
|
+
var answerSummaryPropType = _propTypes.default.oneOfType([choiceTypeAnswerSummaryPropType, onlyAggregatePropType, matchingTypeAnswerSummaryPropType, richFillBlankTypeAnswerSummaryPropType]);
|
|
90
118
|
|
|
91
119
|
exports.answerSummaryPropType = answerSummaryPropType;
|
|
92
120
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.4.2-rc.
|
|
3
|
+
"version": "20.4.2-rc.5+f8ddea77f",
|
|
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.0.0",
|
|
47
|
-
"@instructure/quiz-common": "20.4.2-rc.
|
|
48
|
-
"@instructure/quiz-i18n": "20.4.2-rc.
|
|
49
|
-
"@instructure/quiz-interactions": "20.4.2-rc.
|
|
50
|
-
"@instructure/quiz-number-input": "20.4.2-rc.
|
|
51
|
-
"@instructure/quiz-rce": "20.4.2-rc.
|
|
47
|
+
"@instructure/quiz-common": "20.4.2-rc.5+f8ddea77f",
|
|
48
|
+
"@instructure/quiz-i18n": "20.4.2-rc.5+f8ddea77f",
|
|
49
|
+
"@instructure/quiz-interactions": "20.4.2-rc.5+f8ddea77f",
|
|
50
|
+
"@instructure/quiz-number-input": "20.4.2-rc.5+f8ddea77f",
|
|
51
|
+
"@instructure/quiz-rce": "20.4.2-rc.5+f8ddea77f",
|
|
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",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"file-saver": "~2.0.5",
|
|
113
113
|
"humps": "^2.0.0",
|
|
114
114
|
"immutable": "^3.8.1",
|
|
115
|
-
"instructure-validations": "20.4.2-rc.
|
|
115
|
+
"instructure-validations": "20.4.2-rc.5+f8ddea77f",
|
|
116
116
|
"ipaddr.js": "^1.5.4",
|
|
117
117
|
"isomorphic-fetch": "^2.2.0",
|
|
118
118
|
"isuuid": "^0.1.0",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"intl": "^1.2.4",
|
|
164
164
|
"jquery": "^2.2.3",
|
|
165
165
|
"most-subject": "^5.3.0",
|
|
166
|
-
"quiz-presets": "20.4.2-rc.
|
|
166
|
+
"quiz-presets": "20.4.2-rc.5+f8ddea77f",
|
|
167
167
|
"react": "^16.8.6",
|
|
168
168
|
"react-addons-test-utils": "^15.6.2",
|
|
169
169
|
"react-dom": "^16.8.6",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"publishConfig": {
|
|
180
180
|
"access": "public"
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "f8ddea77f2891407715b59f94335f3fcc679eb7a"
|
|
183
183
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|