@instructure/quiz-core 17.66.2-rc.0 → 17.66.2-rc.10
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/common/records/QuizSession.js +4 -2
- package/es/common/records/SessionItem.js +2 -1
- package/es/reporting/components/charts/QuintileDistribution/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/AnswerSummaryTableRow/presenter.js +3 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/ChoiceInfo/presenter.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +47 -8
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +42 -25
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +3 -2
- package/es/reporting/components/resources/ReportCard/index.js +4 -4
- package/es/taking/api/taking.js +1 -1
- package/lib/common/records/QuizSession.js +4 -2
- package/lib/common/records/SessionItem.js +2 -1
- package/lib/reporting/components/charts/QuintileDistribution/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/AnswerSummaryTableRow/presenter.js +5 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/ChoiceInfo/presenter.js +3 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +49 -8
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +45 -25
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +1 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +3 -2
- package/lib/reporting/components/resources/ReportCard/index.js +4 -4
- package/lib/taking/api/taking.js +1 -1
- package/package.json +9 -9
|
@@ -192,7 +192,9 @@ export var QuizSession = /*#__PURE__*/function (_ReduxRecord) {
|
|
|
192
192
|
status: '',
|
|
193
193
|
takingData: Map(),
|
|
194
194
|
timerMultiplier: null,
|
|
195
|
-
user: Map()
|
|
196
|
-
|
|
195
|
+
user: Map(),
|
|
196
|
+
// Good candidate for another Record - Still relevant?
|
|
197
|
+
bolaSessionItemsCount: null,
|
|
198
|
+
buildOnLastAttempt: null
|
|
197
199
|
}));
|
|
198
200
|
export default QuizSession;
|
|
@@ -104,7 +104,7 @@ export var QuintileDistribution = (_dec = themeable(theme, styles), _dec(_class
|
|
|
104
104
|
key: "".concat(label, ":").concat(count)
|
|
105
105
|
/* eslint-disable-line react/jsx-no-literals */
|
|
106
106
|
|
|
107
|
-
}, /*#__PURE__*/React.createElement(Table.
|
|
107
|
+
}, /*#__PURE__*/React.createElement(Table.RowHeader, null, label), /*#__PURE__*/React.createElement(Table.Cell, null, count));
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
}, {
|
|
@@ -7,6 +7,7 @@ var _dec, _class, _class2, _temp;
|
|
|
7
7
|
|
|
8
8
|
import React, { Component } from 'react';
|
|
9
9
|
import { Table } from '@instructure/ui-table';
|
|
10
|
+
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
10
11
|
import { themeable } from '@instructure/ui-themeable';
|
|
11
12
|
import theme from "./theme.js";
|
|
12
13
|
var styles = {
|
|
@@ -23,6 +24,7 @@ import PropTypes from 'prop-types';
|
|
|
23
24
|
import { IconXSolid, IconCheckSolid } from '@instructure/ui-icons';
|
|
24
25
|
import classNames from 'classnames';
|
|
25
26
|
import { extractTextFromHtml } from '@instructure/quiz-interactions';
|
|
27
|
+
import t from '@instructure/quiz-i18n/es/format-message';
|
|
26
28
|
|
|
27
29
|
var _ref = /*#__PURE__*/React.createElement(IconCheckSolid, null);
|
|
28
30
|
|
|
@@ -77,7 +79,7 @@ export var AnswerSummaryTableRow = (_dec = themeable(theme, styles), _dec(_class
|
|
|
77
79
|
padding: '0px',
|
|
78
80
|
fontWeight: 'bold'
|
|
79
81
|
}
|
|
80
|
-
}, _this.renderIcon(correct)), /*#__PURE__*/React.createElement(Table.RowHeader, {
|
|
82
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, correct ? t('Correct answer') : t('Incorrect answer')), _this.renderIcon(correct)), /*#__PURE__*/React.createElement(Table.RowHeader, {
|
|
81
83
|
theme: {
|
|
82
84
|
padding: cellPadding,
|
|
83
85
|
fontWeight: 'bold'
|
|
@@ -5,6 +5,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
7
7
|
import { Table } from '@instructure/ui-table';
|
|
8
|
+
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
8
9
|
import AnswerSummaryTableRow from "../AnswerSummaryTableRow/index.js";
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
10
11
|
export var ChoiceInfo = /*#__PURE__*/function (_Component) {
|
|
@@ -65,7 +66,7 @@ export var ChoiceInfo = /*#__PURE__*/function (_Component) {
|
|
|
65
66
|
}, /*#__PURE__*/React.createElement(Table.Head, null, /*#__PURE__*/React.createElement(Table.Row, null, /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
66
67
|
id: spacingHeaderId,
|
|
67
68
|
width: "46px"
|
|
68
|
-
}), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
69
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Answer correctness'))), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
69
70
|
id: answerHeaderId,
|
|
70
71
|
height: "47px"
|
|
71
72
|
}, t('Answer')), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js
CHANGED
|
@@ -44,9 +44,9 @@ export var AnswerSummaryTable = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
44
44
|
className: styles.tableWrapper
|
|
45
45
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
46
46
|
margin: "large 0 small 0",
|
|
47
|
-
level: "
|
|
47
|
+
level: "h4",
|
|
48
48
|
theme: {
|
|
49
|
-
|
|
49
|
+
h4FontWeight: 'normal'
|
|
50
50
|
}
|
|
51
51
|
}, t('Answer Frequency Summary')), /*#__PURE__*/React.createElement(ChoiceInfo, {
|
|
52
52
|
itemId: itemId,
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js
CHANGED
|
@@ -7,6 +7,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
7
7
|
var _dec, _class, _class2, _temp;
|
|
8
8
|
|
|
9
9
|
import { Heading } from '@instructure/ui-heading';
|
|
10
|
+
import { PresentationContent } from '@instructure/ui-a11y-content';
|
|
10
11
|
import React, { Component } from 'react';
|
|
11
12
|
var styles = {
|
|
12
13
|
componentId: 'bQIMq',
|
|
@@ -37,8 +38,9 @@ import classnames from 'classnames';
|
|
|
37
38
|
import { interactionTypesNameDictionary } from "../../../../../common/util/interactionTypeMetadata.js";
|
|
38
39
|
import AnswerSummaryTable from "../AnswerSummaryTable/index.js";
|
|
39
40
|
import { itemAnalysisPropType } from "../propTypes.js";
|
|
40
|
-
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
41
41
|
import { Flex } from '@instructure/ui-flex';
|
|
42
|
+
import { RichContentRenderer, ensureMathIsReady, ensureMathRendered } from '@instructure/quiz-rce';
|
|
43
|
+
import { ensureImagesLoaded } from "../../../../../common/util/printUtils.js";
|
|
42
44
|
var supportedTables = ['choice', 'true-false', 'multi-answer'];
|
|
43
45
|
export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
44
46
|
_inherits(NewItemAnalysis, _Component);
|
|
@@ -57,7 +59,8 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
57
59
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
58
60
|
_this.state = {
|
|
59
61
|
bodyExpanded: false,
|
|
60
|
-
metricsExpanded: false
|
|
62
|
+
metricsExpanded: false,
|
|
63
|
+
itemCardBodyHeight: 0
|
|
61
64
|
};
|
|
62
65
|
|
|
63
66
|
_this.mapInteractionTypeToTranslation = function (interactionType) {
|
|
@@ -111,7 +114,7 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
111
114
|
}, _this.mapInteractionTypeToTranslation(interactionType));
|
|
112
115
|
};
|
|
113
116
|
|
|
114
|
-
_this.renderRichContent = function (itemBody, itemBodyClass) {
|
|
117
|
+
_this.renderRichContent = function (itemBody, itemBodyClass, itemId) {
|
|
115
118
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
116
119
|
direction: "row",
|
|
117
120
|
alignItems: "start"
|
|
@@ -119,6 +122,7 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
119
122
|
shouldShrink: true,
|
|
120
123
|
shouldGrow: true
|
|
121
124
|
}, /*#__PURE__*/React.createElement("div", {
|
|
125
|
+
id: _this.itemCardBodyId(itemId),
|
|
122
126
|
className: itemBodyClass
|
|
123
127
|
}, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
124
128
|
content: itemBody
|
|
@@ -126,11 +130,11 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
126
130
|
margin: "none none none x-small"
|
|
127
131
|
}, /*#__PURE__*/React.createElement("div", {
|
|
128
132
|
className: styles.itemBodyToggleButtonWrapper
|
|
129
|
-
}, /*#__PURE__*/React.createElement(ExpandButton, {
|
|
133
|
+
}, _this.isBodyHigherThanContainer() && /*#__PURE__*/React.createElement(PresentationContent, null, /*#__PURE__*/React.createElement(ExpandButton, {
|
|
130
134
|
onClick: _this.handleBodyToggle,
|
|
131
135
|
title: _this.state.bodyExpanded ? t('collapse question stem') : t('expand question stem'),
|
|
132
136
|
isExpanded: _this.state.bodyExpanded
|
|
133
|
-
}))));
|
|
137
|
+
})))));
|
|
134
138
|
};
|
|
135
139
|
|
|
136
140
|
_this.renderMetrics = function (scores, metricsClass) {
|
|
@@ -208,8 +212,42 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
208
212
|
}
|
|
209
213
|
|
|
210
214
|
_createClass(NewItemAnalysis, [{
|
|
215
|
+
key: "componentDidMount",
|
|
216
|
+
value: function componentDidMount() {
|
|
217
|
+
var _this2 = this;
|
|
218
|
+
|
|
219
|
+
ensureMathIsReady().then(ensureMathRendered).then(ensureImagesLoaded).then(function () {
|
|
220
|
+
return _this2.calculateItemCardBodyHeight(_this2.props.itemAnalysis.metadata.item_id);
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}, {
|
|
224
|
+
key: "calculateItemCardBodyHeight",
|
|
225
|
+
value: function calculateItemCardBodyHeight(id) {
|
|
226
|
+
var element = document.getElementById(this.itemCardBodyId(id));
|
|
227
|
+
|
|
228
|
+
if (element) {
|
|
229
|
+
var height = element.clientHeight;
|
|
230
|
+
this.setState({
|
|
231
|
+
itemCardBodyHeight: height
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}, {
|
|
236
|
+
key: "itemCardBodyId",
|
|
237
|
+
value: function itemCardBodyId(itemId) {
|
|
238
|
+
return "itemCardBody-".concat(itemId);
|
|
239
|
+
}
|
|
240
|
+
}, {
|
|
241
|
+
key: "isBodyHigherThanContainer",
|
|
242
|
+
value: function isBodyHigherThanContainer() {
|
|
243
|
+
var containerHeight = 48;
|
|
244
|
+
return this.state.itemCardBodyHeight > containerHeight;
|
|
245
|
+
}
|
|
246
|
+
}, {
|
|
211
247
|
key: "render",
|
|
212
248
|
value: function render() {
|
|
249
|
+
var _metadata$item_title;
|
|
250
|
+
|
|
213
251
|
var _this$props$itemAnaly = this.props.itemAnalysis,
|
|
214
252
|
answer_summary = _this$props$itemAnaly.answer_summary,
|
|
215
253
|
metadata = _this$props$itemAnaly.metadata,
|
|
@@ -217,7 +255,8 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
217
255
|
var itemId = metadata.item_id;
|
|
218
256
|
var isSupportedTable = supportedTables.includes(metadata.interaction_type);
|
|
219
257
|
var metricsClass = classnames(_defineProperty({}, styles.hiddenMetrics, !this.state.metricsExpanded));
|
|
220
|
-
var itemBodyClass = classnames(styles.itemBody, _defineProperty({}, styles.hiddenItemBody, !this.state.bodyExpanded));
|
|
258
|
+
var itemBodyClass = classnames(styles.itemBody, _defineProperty({}, styles.hiddenItemBody, this.isBodyHigherThanContainer() && !this.state.bodyExpanded));
|
|
259
|
+
var title = (_metadata$item_title = metadata.item_title) !== null && _metadata$item_title !== void 0 ? _metadata$item_title : t('Untitled item');
|
|
221
260
|
return /*#__PURE__*/React.createElement(Card, {
|
|
222
261
|
className: styles.cardWrapper
|
|
223
262
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
@@ -233,12 +272,12 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
233
272
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
234
273
|
direction: "column",
|
|
235
274
|
justifyItems: "start"
|
|
236
|
-
}, /*#__PURE__*/React.createElement(Flex.Item, null, this.renderTitle(
|
|
275
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, null, this.renderTitle(title)), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderInteractionType(metadata.interaction_type)), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
237
276
|
shouldShrink: true,
|
|
238
277
|
padding: "small xx-small none none",
|
|
239
278
|
overflowY: "hidden",
|
|
240
279
|
size: !this.state.bodyExpanded ? '60px' : void 0
|
|
241
|
-
}, this.renderRichContent(metadata.item_body, itemBodyClass)))), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderMetrics(scores, metricsClass)))), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderAnswerSummaryTable(itemId, answer_summary, isSupportedTable, metricsClass))));
|
|
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))));
|
|
242
281
|
}
|
|
243
282
|
}]);
|
|
244
283
|
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -88,7 +88,7 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
88
88
|
}, /*#__PURE__*/React.createElement("div", {
|
|
89
89
|
className: styles.heading
|
|
90
90
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
91
|
-
level: "
|
|
91
|
+
level: "h2",
|
|
92
92
|
margin: "0 x-large 0 0",
|
|
93
93
|
color: "primary"
|
|
94
94
|
}, t('Quiz summary:'), " ", metadata === null || metadata === void 0 ? void 0 : metadata.quiz_title)), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
@@ -11,21 +12,24 @@ import t from '@instructure/quiz-i18n/es/format-message';
|
|
|
11
12
|
import { Text } from '@instructure/ui-text';
|
|
12
13
|
import { Link } from '@instructure/ui-link';
|
|
13
14
|
import { Flex } from '@instructure/ui-flex';
|
|
15
|
+
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
14
16
|
import { themeable } from '@instructure/ui-themeable';
|
|
15
17
|
import Card from "../../../../../common/components/shared/Card/index.js";
|
|
16
18
|
var styles = {
|
|
17
|
-
componentId: '
|
|
19
|
+
componentId: 'bLTgQ',
|
|
18
20
|
template: function template(theme) {
|
|
19
|
-
return "\n\n.
|
|
21
|
+
return "\n\n.bLTgQ_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', ";row-gap:8px}\n\n.bLTgQ_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.bLTgQ_dJIh{height:").concat(theme.cardHeight || 'inherit', "}\n\n.bLTgQ_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.bLTgQ_blRb{max-width:160px;padding-right:10px}\n\n.bLTgQ_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.bLTgQ_dKIc{padding-bottom:15px}\n\n@media only screen and (max-width:25rem){.bLTgQ_dJIh{height:auto}.bLTgQ_PFlN{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}.bLTgQ_bqdH{flex-wrap:wrap}}");
|
|
20
22
|
},
|
|
21
|
-
'metricsContainer': '
|
|
22
|
-
'reportCard': '
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
23
|
+
'metricsContainer': 'bLTgQ_bqdH',
|
|
24
|
+
'reportCard': 'bLTgQ_PFlN',
|
|
25
|
+
'emptyReportCard': 'bLTgQ_dJIh',
|
|
26
|
+
'emptyCardBodyContainer': 'bLTgQ_eWEX',
|
|
27
|
+
'dateContainer': 'bLTgQ_blRb',
|
|
28
|
+
'quizAnalysisSummary': 'bLTgQ_bxzy',
|
|
29
|
+
'titleContainer': 'bLTgQ_dKIc'
|
|
27
30
|
};
|
|
28
31
|
import theme from "./theme.js";
|
|
32
|
+
import classnames from 'classnames';
|
|
29
33
|
import AnalysisMetric from "../AnalysisMetric/index.js";
|
|
30
34
|
import Spinner from "../../../../../common/components/shared/spinner/Spinner.js";
|
|
31
35
|
import { AnalysisUpdateDate } from "../AnalysisUpdateDate/index.js";
|
|
@@ -93,41 +97,55 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
|
|
|
93
97
|
multiline: true
|
|
94
98
|
})), quizAnalysis && itemAnalyses && /*#__PURE__*/React.createElement(Link, {
|
|
95
99
|
href: href
|
|
96
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
97
|
-
size: "small"
|
|
100
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('View Quiz and Item Analysis Report')), /*#__PURE__*/React.createElement(Text, {
|
|
101
|
+
size: "small",
|
|
102
|
+
"aria-hidden": "true"
|
|
98
103
|
}, t('View Report')))));
|
|
99
104
|
};
|
|
100
105
|
|
|
101
106
|
_this.renderSpinner = function (mainText) {
|
|
102
|
-
return /*#__PURE__*/React.createElement(
|
|
107
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
className: styles.emptyCardBodyContainer
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
110
|
+
direction: "row"
|
|
111
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(Spinner, {
|
|
103
112
|
size: "x-small",
|
|
104
113
|
color: "brand",
|
|
105
114
|
minHeight: "0",
|
|
106
115
|
mainText: mainText,
|
|
107
116
|
fontSize: "x-small"
|
|
108
|
-
});
|
|
117
|
+
}))));
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
_this.renderGenerateReportButton = function () {
|
|
121
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
122
|
+
onClick: _this.handleGeneration,
|
|
123
|
+
role: "button"
|
|
124
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Generate Quiz and Item Analysis Report')), /*#__PURE__*/React.createElement(Text, {
|
|
125
|
+
size: "small",
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}, t('Generate Report')));
|
|
109
128
|
};
|
|
110
129
|
|
|
111
130
|
_this.renderReportCardFooter = function () {
|
|
112
131
|
var _this$props2 = _this.props,
|
|
113
132
|
generationInProgress = _this$props2.generationInProgress,
|
|
114
133
|
analysisError = _this$props2.analysisError;
|
|
115
|
-
return /*#__PURE__*/React.createElement(
|
|
134
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: styles.emptyCardBodyContainer
|
|
136
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
116
137
|
direction: "row",
|
|
117
138
|
justifyItems: "space-between"
|
|
118
139
|
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
119
|
-
shouldShrink: true
|
|
140
|
+
shouldShrink: true,
|
|
141
|
+
size: analysisError && !generationInProgress ? '40%' : null
|
|
120
142
|
}, analysisError && !generationInProgress && /*#__PURE__*/React.createElement(Text, {
|
|
121
143
|
size: "x-small",
|
|
122
|
-
lineHeight: "fit",
|
|
123
144
|
weight: "bold",
|
|
124
145
|
color: "danger"
|
|
125
|
-
}, analysisError)), /*#__PURE__*/React.createElement(Flex.Item,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
129
|
-
size: "small"
|
|
130
|
-
}, t('Generate Report')))));
|
|
146
|
+
}, analysisError)), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
147
|
+
shouldShrink: analysisError && !generationInProgress
|
|
148
|
+
}, generationInProgress ? _this.renderSpinner(t('Generation In Progress')) : _this.renderGenerateReportButton())));
|
|
131
149
|
};
|
|
132
150
|
|
|
133
151
|
return _this;
|
|
@@ -140,16 +158,15 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
|
|
|
140
158
|
fetchInProgress = _this$props3.fetchInProgress,
|
|
141
159
|
name = _this$props3.name,
|
|
142
160
|
quizAnalysis = _this$props3.quizAnalysis;
|
|
161
|
+
var reportCardStyles = classnames(styles.reportCard, _defineProperty({}, styles.emptyReportCard, !quizAnalysis));
|
|
143
162
|
return /*#__PURE__*/React.createElement(Card, {
|
|
144
|
-
className:
|
|
163
|
+
className: reportCardStyles
|
|
145
164
|
}, /*#__PURE__*/React.createElement("div", {
|
|
146
165
|
className: styles.titleContainer
|
|
147
166
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
148
167
|
size: "medium",
|
|
149
168
|
weight: "bold"
|
|
150
|
-
}, name)), !fetchInProgress && quizAnalysis && this.renderQuizAnalysisSummary(), fetchInProgress &&
|
|
151
|
-
className: styles.spinnerContainer
|
|
152
|
-
}, this.renderSpinner()), !fetchInProgress && this.renderReportCardFooter());
|
|
169
|
+
}, name)), !fetchInProgress && quizAnalysis && this.renderQuizAnalysisSummary(), fetchInProgress && this.renderSpinner(), !fetchInProgress && this.renderReportCardFooter());
|
|
153
170
|
}
|
|
154
171
|
}]);
|
|
155
172
|
|
|
@@ -55,9 +55,9 @@ export var ScoreDistribution = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
55
55
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
56
56
|
className: styles.headingContainer
|
|
57
57
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
58
|
-
level: "
|
|
58
|
+
level: "h3",
|
|
59
59
|
theme: {
|
|
60
|
-
|
|
60
|
+
h3FontWeight: 300
|
|
61
61
|
}
|
|
62
62
|
}, t('Score Distribution'))), /*#__PURE__*/React.createElement(QuintileDistribution, {
|
|
63
63
|
animateDelay: 1000,
|
|
@@ -65,6 +65,7 @@ export var ScoreDistribution = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
65
65
|
visualDistribution: this.props.decileDistribution || [],
|
|
66
66
|
calculateLabelForColumn: this.calculateLabelForColumn
|
|
67
67
|
}), /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
"aria-hidden": "true",
|
|
68
69
|
className: styles.chartLabel
|
|
69
70
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
70
71
|
size: "small"
|
|
@@ -12,12 +12,12 @@ import { Link } from '@instructure/ui-link';
|
|
|
12
12
|
import { themeable } from '@instructure/ui-themeable';
|
|
13
13
|
import Card from "../../../../common/components/shared/Card/index.js";
|
|
14
14
|
var styles = {
|
|
15
|
-
componentId: '
|
|
15
|
+
componentId: 'cLHes',
|
|
16
16
|
template: function template(theme) {
|
|
17
|
-
return "\n\n.
|
|
17
|
+
return "\n\n.cLHes_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.cLHes_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}\n\n@media only screen and (max-width:25rem){.cLHes_fbIL{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}}");
|
|
18
18
|
},
|
|
19
|
-
'card': '
|
|
20
|
-
'details': '
|
|
19
|
+
'card': 'cLHes_fbIL',
|
|
20
|
+
'details': 'cLHes_ebWM'
|
|
21
21
|
};
|
|
22
22
|
import theme from "./theme.js";
|
|
23
23
|
import { Flex } from '@instructure/ui-flex';
|
package/es/taking/api/taking.js
CHANGED
|
@@ -89,7 +89,7 @@ var noBacktrackingNextQuestion = function noBacktrackingNextQuestion(quizSession
|
|
|
89
89
|
|
|
90
90
|
var responseCb = function responseCb(nextItem) {
|
|
91
91
|
if (nextItem) {
|
|
92
|
-
dispatch([handleSessionItemsResponse([nextItem], quizSessionId), setCurrentSessionItemPosition(nextItem.position)]);
|
|
92
|
+
dispatch([handleSessionItemsResponse([nextItem], quizSessionId), setCurrentSessionItemPosition(nextItem.position), getResumeData(quizSessionId)]);
|
|
93
93
|
} else {
|
|
94
94
|
submit();
|
|
95
95
|
}
|
|
@@ -211,8 +211,10 @@ var QuizSession = /*#__PURE__*/function (_ReduxRecord) {
|
|
|
211
211
|
status: '',
|
|
212
212
|
takingData: (0, _immutable.Map)(),
|
|
213
213
|
timerMultiplier: null,
|
|
214
|
-
user: (0, _immutable.Map)()
|
|
215
|
-
|
|
214
|
+
user: (0, _immutable.Map)(),
|
|
215
|
+
// Good candidate for another Record - Still relevant?
|
|
216
|
+
bolaSessionItemsCount: null,
|
|
217
|
+
buildOnLastAttempt: null
|
|
216
218
|
}));
|
|
217
219
|
|
|
218
220
|
exports.QuizSession = QuizSession;
|
|
@@ -125,7 +125,7 @@ var QuintileDistribution = (_dec = (0, _uiThemeable.themeable)(_theme.default, s
|
|
|
125
125
|
key: "".concat(label, ":").concat(count)
|
|
126
126
|
/* eslint-disable-line react/jsx-no-literals */
|
|
127
127
|
|
|
128
|
-
}, /*#__PURE__*/_react.default.createElement(_uiTable.Table.
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_uiTable.Table.RowHeader, null, label), /*#__PURE__*/_react.default.createElement(_uiTable.Table.Cell, null, count));
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
}, {
|
|
@@ -21,6 +21,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
21
21
|
|
|
22
22
|
var _uiTable = require("@instructure/ui-table");
|
|
23
23
|
|
|
24
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
25
|
+
|
|
24
26
|
var _uiThemeable = require("@instructure/ui-themeable");
|
|
25
27
|
|
|
26
28
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
@@ -33,6 +35,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
33
35
|
|
|
34
36
|
var _quizInteractions = require("@instructure/quiz-interactions");
|
|
35
37
|
|
|
38
|
+
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
39
|
+
|
|
36
40
|
var _dec, _class, _class2, _temp;
|
|
37
41
|
|
|
38
42
|
var styles = {
|
|
@@ -99,7 +103,7 @@ var AnswerSummaryTableRow = (_dec = (0, _uiThemeable.themeable)(_theme.default,
|
|
|
99
103
|
padding: '0px',
|
|
100
104
|
fontWeight: 'bold'
|
|
101
105
|
}
|
|
102
|
-
}, _this.renderIcon(correct)), /*#__PURE__*/_react.default.createElement(_uiTable.Table.RowHeader, {
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, correct ? (0, _formatMessage.default)('Correct answer') : (0, _formatMessage.default)('Incorrect answer')), _this.renderIcon(correct)), /*#__PURE__*/_react.default.createElement(_uiTable.Table.RowHeader, {
|
|
103
107
|
theme: {
|
|
104
108
|
padding: cellPadding,
|
|
105
109
|
fontWeight: 'bold'
|
|
@@ -23,6 +23,8 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
23
23
|
|
|
24
24
|
var _uiTable = require("@instructure/ui-table");
|
|
25
25
|
|
|
26
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
27
|
+
|
|
26
28
|
var _index = _interopRequireDefault(require("../AnswerSummaryTableRow/index.js"));
|
|
27
29
|
|
|
28
30
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -85,7 +87,7 @@ var ChoiceInfo = /*#__PURE__*/function (_Component) {
|
|
|
85
87
|
}, /*#__PURE__*/_react.default.createElement(_uiTable.Table.Head, null, /*#__PURE__*/_react.default.createElement(_uiTable.Table.Row, null, /*#__PURE__*/_react.default.createElement(_uiTable.Table.ColHeader, {
|
|
86
88
|
id: spacingHeaderId,
|
|
87
89
|
width: "46px"
|
|
88
|
-
}), /*#__PURE__*/_react.default.createElement(_uiTable.Table.ColHeader, {
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Answer correctness'))), /*#__PURE__*/_react.default.createElement(_uiTable.Table.ColHeader, {
|
|
89
91
|
id: answerHeaderId,
|
|
90
92
|
height: "47px"
|
|
91
93
|
}, (0, _formatMessage.default)('Answer')), /*#__PURE__*/_react.default.createElement(_uiTable.Table.ColHeader, {
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js
CHANGED
|
@@ -65,9 +65,9 @@ var AnswerSummaryTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, sty
|
|
|
65
65
|
className: styles.tableWrapper
|
|
66
66
|
}, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
|
|
67
67
|
margin: "large 0 small 0",
|
|
68
|
-
level: "
|
|
68
|
+
level: "h4",
|
|
69
69
|
theme: {
|
|
70
|
-
|
|
70
|
+
h4FontWeight: 'normal'
|
|
71
71
|
}
|
|
72
72
|
}, (0, _formatMessage.default)('Answer Frequency Summary')), /*#__PURE__*/_react.default.createElement(_presenter.ChoiceInfo, {
|
|
73
73
|
itemId: itemId,
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js
CHANGED
|
@@ -21,6 +21,8 @@ var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
21
21
|
|
|
22
22
|
var _uiHeading = require("@instructure/ui-heading");
|
|
23
23
|
|
|
24
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
25
|
+
|
|
24
26
|
var _react = _interopRequireWildcard(require("react"));
|
|
25
27
|
|
|
26
28
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
@@ -49,9 +51,11 @@ var _index5 = _interopRequireDefault(require("../AnswerSummaryTable/index.js"));
|
|
|
49
51
|
|
|
50
52
|
var _propTypes = require("../propTypes.js");
|
|
51
53
|
|
|
54
|
+
var _uiFlex = require("@instructure/ui-flex");
|
|
55
|
+
|
|
52
56
|
var _quizRce = require("@instructure/quiz-rce");
|
|
53
57
|
|
|
54
|
-
var
|
|
58
|
+
var _printUtils = require("../../../../../common/util/printUtils.js");
|
|
55
59
|
|
|
56
60
|
var _dec, _class, _class2, _temp;
|
|
57
61
|
|
|
@@ -89,7 +93,8 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
89
93
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
90
94
|
_this.state = {
|
|
91
95
|
bodyExpanded: false,
|
|
92
|
-
metricsExpanded: false
|
|
96
|
+
metricsExpanded: false,
|
|
97
|
+
itemCardBodyHeight: 0
|
|
93
98
|
};
|
|
94
99
|
|
|
95
100
|
_this.mapInteractionTypeToTranslation = function (interactionType) {
|
|
@@ -143,7 +148,7 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
143
148
|
}, _this.mapInteractionTypeToTranslation(interactionType));
|
|
144
149
|
};
|
|
145
150
|
|
|
146
|
-
_this.renderRichContent = function (itemBody, itemBodyClass) {
|
|
151
|
+
_this.renderRichContent = function (itemBody, itemBodyClass, itemId) {
|
|
147
152
|
return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
148
153
|
direction: "row",
|
|
149
154
|
alignItems: "start"
|
|
@@ -151,6 +156,7 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
151
156
|
shouldShrink: true,
|
|
152
157
|
shouldGrow: true
|
|
153
158
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
159
|
+
id: _this.itemCardBodyId(itemId),
|
|
154
160
|
className: itemBodyClass
|
|
155
161
|
}, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
|
156
162
|
content: itemBody
|
|
@@ -158,11 +164,11 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
158
164
|
margin: "none none none x-small"
|
|
159
165
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
160
166
|
className: styles.itemBodyToggleButtonWrapper
|
|
161
|
-
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
167
|
+
}, _this.isBodyHigherThanContainer() && /*#__PURE__*/_react.default.createElement(_uiA11yContent.PresentationContent, null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
162
168
|
onClick: _this.handleBodyToggle,
|
|
163
169
|
title: _this.state.bodyExpanded ? (0, _formatMessage.default)('collapse question stem') : (0, _formatMessage.default)('expand question stem'),
|
|
164
170
|
isExpanded: _this.state.bodyExpanded
|
|
165
|
-
}))));
|
|
171
|
+
})))));
|
|
166
172
|
};
|
|
167
173
|
|
|
168
174
|
_this.renderMetrics = function (scores, metricsClass) {
|
|
@@ -240,8 +246,42 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
240
246
|
}
|
|
241
247
|
|
|
242
248
|
(0, _createClass2.default)(NewItemAnalysis, [{
|
|
249
|
+
key: "componentDidMount",
|
|
250
|
+
value: function componentDidMount() {
|
|
251
|
+
var _this2 = this;
|
|
252
|
+
|
|
253
|
+
(0, _quizRce.ensureMathIsReady)().then(_quizRce.ensureMathRendered).then(_printUtils.ensureImagesLoaded).then(function () {
|
|
254
|
+
return _this2.calculateItemCardBodyHeight(_this2.props.itemAnalysis.metadata.item_id);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}, {
|
|
258
|
+
key: "calculateItemCardBodyHeight",
|
|
259
|
+
value: function calculateItemCardBodyHeight(id) {
|
|
260
|
+
var element = document.getElementById(this.itemCardBodyId(id));
|
|
261
|
+
|
|
262
|
+
if (element) {
|
|
263
|
+
var height = element.clientHeight;
|
|
264
|
+
this.setState({
|
|
265
|
+
itemCardBodyHeight: height
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}, {
|
|
270
|
+
key: "itemCardBodyId",
|
|
271
|
+
value: function itemCardBodyId(itemId) {
|
|
272
|
+
return "itemCardBody-".concat(itemId);
|
|
273
|
+
}
|
|
274
|
+
}, {
|
|
275
|
+
key: "isBodyHigherThanContainer",
|
|
276
|
+
value: function isBodyHigherThanContainer() {
|
|
277
|
+
var containerHeight = 48;
|
|
278
|
+
return this.state.itemCardBodyHeight > containerHeight;
|
|
279
|
+
}
|
|
280
|
+
}, {
|
|
243
281
|
key: "render",
|
|
244
282
|
value: function render() {
|
|
283
|
+
var _metadata$item_title;
|
|
284
|
+
|
|
245
285
|
var _this$props$itemAnaly = this.props.itemAnalysis,
|
|
246
286
|
answer_summary = _this$props$itemAnaly.answer_summary,
|
|
247
287
|
metadata = _this$props$itemAnaly.metadata,
|
|
@@ -249,7 +289,8 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
249
289
|
var itemId = metadata.item_id;
|
|
250
290
|
var isSupportedTable = supportedTables.includes(metadata.interaction_type);
|
|
251
291
|
var metricsClass = (0, _classnames3.default)((0, _defineProperty2.default)({}, styles.hiddenMetrics, !this.state.metricsExpanded));
|
|
252
|
-
var itemBodyClass = (0, _classnames3.default)(styles.itemBody, (0, _defineProperty2.default)({}, styles.hiddenItemBody, !this.state.bodyExpanded));
|
|
292
|
+
var itemBodyClass = (0, _classnames3.default)(styles.itemBody, (0, _defineProperty2.default)({}, styles.hiddenItemBody, this.isBodyHigherThanContainer() && !this.state.bodyExpanded));
|
|
293
|
+
var title = (_metadata$item_title = metadata.item_title) !== null && _metadata$item_title !== void 0 ? _metadata$item_title : (0, _formatMessage.default)('Untitled item');
|
|
253
294
|
return /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
254
295
|
className: styles.cardWrapper
|
|
255
296
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
@@ -265,12 +306,12 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
265
306
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
266
307
|
direction: "column",
|
|
267
308
|
justifyItems: "start"
|
|
268
|
-
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderTitle(
|
|
309
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderTitle(title)), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderInteractionType(metadata.interaction_type)), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
269
310
|
shouldShrink: true,
|
|
270
311
|
padding: "small xx-small none none",
|
|
271
312
|
overflowY: "hidden",
|
|
272
313
|
size: !this.state.bodyExpanded ? '60px' : void 0
|
|
273
|
-
}, this.renderRichContent(metadata.item_body, itemBodyClass)))), /*#__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))));
|
|
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))));
|
|
274
315
|
}
|
|
275
316
|
}]);
|
|
276
317
|
NewItemAnalysis.displayName = "NewItemAnalysis";
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -117,7 +117,7 @@ var NewQuizAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
117
117
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
118
118
|
className: styles.heading
|
|
119
119
|
}, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
|
|
120
|
-
level: "
|
|
120
|
+
level: "h2",
|
|
121
121
|
margin: "0 x-large 0 0",
|
|
122
122
|
color: "primary"
|
|
123
123
|
}, (0, _formatMessage.default)('Quiz summary:'), " ", metadata === null || metadata === void 0 ? void 0 : metadata.quiz_title)), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.NewQuizAndItemAnalysisReportCardPresenter = void 0;
|
|
11
11
|
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
12
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
15
|
|
|
14
16
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -29,12 +31,16 @@ var _uiLink = require("@instructure/ui-link");
|
|
|
29
31
|
|
|
30
32
|
var _uiFlex = require("@instructure/ui-flex");
|
|
31
33
|
|
|
34
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
35
|
+
|
|
32
36
|
var _uiThemeable = require("@instructure/ui-themeable");
|
|
33
37
|
|
|
34
38
|
var _index = _interopRequireDefault(require("../../../../../common/components/shared/Card/index.js"));
|
|
35
39
|
|
|
36
40
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
37
41
|
|
|
42
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
43
|
+
|
|
38
44
|
var _index2 = _interopRequireDefault(require("../AnalysisMetric/index.js"));
|
|
39
45
|
|
|
40
46
|
var _Spinner = _interopRequireDefault(require("../../../../../common/components/shared/spinner/Spinner.js"));
|
|
@@ -46,16 +52,17 @@ var _propTypes2 = require("../propTypes.js");
|
|
|
46
52
|
var _dec, _class, _class2, _temp;
|
|
47
53
|
|
|
48
54
|
var styles = {
|
|
49
|
-
componentId: '
|
|
55
|
+
componentId: 'bLTgQ',
|
|
50
56
|
template: function template(theme) {
|
|
51
|
-
return "\n\n.
|
|
57
|
+
return "\n\n.bLTgQ_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', ";row-gap:8px}\n\n.bLTgQ_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.bLTgQ_dJIh{height:").concat(theme.cardHeight || 'inherit', "}\n\n.bLTgQ_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.bLTgQ_blRb{max-width:160px;padding-right:10px}\n\n.bLTgQ_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.bLTgQ_dKIc{padding-bottom:15px}\n\n@media only screen and (max-width:25rem){.bLTgQ_dJIh{height:auto}.bLTgQ_PFlN{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}.bLTgQ_bqdH{flex-wrap:wrap}}");
|
|
52
58
|
},
|
|
53
|
-
'metricsContainer': '
|
|
54
|
-
'reportCard': '
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
+
'metricsContainer': 'bLTgQ_bqdH',
|
|
60
|
+
'reportCard': 'bLTgQ_PFlN',
|
|
61
|
+
'emptyReportCard': 'bLTgQ_dJIh',
|
|
62
|
+
'emptyCardBodyContainer': 'bLTgQ_eWEX',
|
|
63
|
+
'dateContainer': 'bLTgQ_blRb',
|
|
64
|
+
'quizAnalysisSummary': 'bLTgQ_bxzy',
|
|
65
|
+
'titleContainer': 'bLTgQ_dKIc'
|
|
59
66
|
};
|
|
60
67
|
var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
61
68
|
(0, _inherits2.default)(NewQuizAndItemAnalysisReportCardPresenter, _Component);
|
|
@@ -120,41 +127,55 @@ var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeab
|
|
|
120
127
|
multiline: true
|
|
121
128
|
})), quizAnalysis && itemAnalyses && /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
122
129
|
href: href
|
|
123
|
-
}, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
124
|
-
size: "small"
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('View Quiz and Item Analysis Report')), /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
131
|
+
size: "small",
|
|
132
|
+
"aria-hidden": "true"
|
|
125
133
|
}, (0, _formatMessage.default)('View Report')))));
|
|
126
134
|
};
|
|
127
135
|
|
|
128
136
|
_this.renderSpinner = function (mainText) {
|
|
129
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
className: styles.emptyCardBodyContainer
|
|
139
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
140
|
+
direction: "row"
|
|
141
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_Spinner.default, {
|
|
130
142
|
size: "x-small",
|
|
131
143
|
color: "brand",
|
|
132
144
|
minHeight: "0",
|
|
133
145
|
mainText: mainText,
|
|
134
146
|
fontSize: "x-small"
|
|
135
|
-
});
|
|
147
|
+
}))));
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
_this.renderGenerateReportButton = function () {
|
|
151
|
+
return /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
152
|
+
onClick: _this.handleGeneration,
|
|
153
|
+
role: "button"
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Generate Quiz and Item Analysis Report')), /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
155
|
+
size: "small",
|
|
156
|
+
"aria-hidden": "true"
|
|
157
|
+
}, (0, _formatMessage.default)('Generate Report')));
|
|
136
158
|
};
|
|
137
159
|
|
|
138
160
|
_this.renderReportCardFooter = function () {
|
|
139
161
|
var _this$props2 = _this.props,
|
|
140
162
|
generationInProgress = _this$props2.generationInProgress,
|
|
141
163
|
analysisError = _this$props2.analysisError;
|
|
142
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
164
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
165
|
+
className: styles.emptyCardBodyContainer
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
143
167
|
direction: "row",
|
|
144
168
|
justifyItems: "space-between"
|
|
145
169
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
146
|
-
shouldShrink: true
|
|
170
|
+
shouldShrink: true,
|
|
171
|
+
size: analysisError && !generationInProgress ? '40%' : null
|
|
147
172
|
}, analysisError && !generationInProgress && /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
148
173
|
size: "x-small",
|
|
149
|
-
lineHeight: "fit",
|
|
150
174
|
weight: "bold",
|
|
151
175
|
color: "danger"
|
|
152
|
-
}, analysisError)), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
156
|
-
size: "small"
|
|
157
|
-
}, (0, _formatMessage.default)('Generate Report')))));
|
|
176
|
+
}, analysisError)), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
177
|
+
shouldShrink: analysisError && !generationInProgress
|
|
178
|
+
}, generationInProgress ? _this.renderSpinner((0, _formatMessage.default)('Generation In Progress')) : _this.renderGenerateReportButton())));
|
|
158
179
|
};
|
|
159
180
|
|
|
160
181
|
return _this;
|
|
@@ -167,16 +188,15 @@ var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeab
|
|
|
167
188
|
fetchInProgress = _this$props3.fetchInProgress,
|
|
168
189
|
name = _this$props3.name,
|
|
169
190
|
quizAnalysis = _this$props3.quizAnalysis;
|
|
191
|
+
var reportCardStyles = (0, _classnames2.default)(styles.reportCard, (0, _defineProperty2.default)({}, styles.emptyReportCard, !quizAnalysis));
|
|
170
192
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
171
|
-
className:
|
|
193
|
+
className: reportCardStyles
|
|
172
194
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
173
195
|
className: styles.titleContainer
|
|
174
196
|
}, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
175
197
|
size: "medium",
|
|
176
198
|
weight: "bold"
|
|
177
|
-
}, name)), !fetchInProgress && quizAnalysis && this.renderQuizAnalysisSummary(), fetchInProgress &&
|
|
178
|
-
className: styles.spinnerContainer
|
|
179
|
-
}, this.renderSpinner()), !fetchInProgress && this.renderReportCardFooter());
|
|
199
|
+
}, name)), !fetchInProgress && quizAnalysis && this.renderQuizAnalysisSummary(), fetchInProgress && this.renderSpinner(), !fetchInProgress && this.renderReportCardFooter());
|
|
180
200
|
}
|
|
181
201
|
}]);
|
|
182
202
|
NewQuizAndItemAnalysisReportCardPresenter.displayName = "NewQuizAndItemAnalysisReportCardPresenter";
|
|
@@ -77,9 +77,9 @@ var ScoreDistribution = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
77
77
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
78
78
|
className: styles.headingContainer
|
|
79
79
|
}, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
|
|
80
|
-
level: "
|
|
80
|
+
level: "h3",
|
|
81
81
|
theme: {
|
|
82
|
-
|
|
82
|
+
h3FontWeight: 300
|
|
83
83
|
}
|
|
84
84
|
}, (0, _formatMessage.default)('Score Distribution'))), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
85
85
|
animateDelay: 1000,
|
|
@@ -87,6 +87,7 @@ var ScoreDistribution = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
87
87
|
visualDistribution: this.props.decileDistribution || [],
|
|
88
88
|
calculateLabelForColumn: this.calculateLabelForColumn
|
|
89
89
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
"aria-hidden": "true",
|
|
90
91
|
className: styles.chartLabel
|
|
91
92
|
}, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
92
93
|
size: "small"
|
|
@@ -38,12 +38,12 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
38
38
|
var _dec, _class, _class2, _temp;
|
|
39
39
|
|
|
40
40
|
var styles = {
|
|
41
|
-
componentId: '
|
|
41
|
+
componentId: 'cLHes',
|
|
42
42
|
template: function template(theme) {
|
|
43
|
-
return "\n\n.
|
|
43
|
+
return "\n\n.cLHes_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.cLHes_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}\n\n@media only screen and (max-width:25rem){.cLHes_fbIL{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}}");
|
|
44
44
|
},
|
|
45
|
-
'card': '
|
|
46
|
-
'details': '
|
|
45
|
+
'card': 'cLHes_fbIL',
|
|
46
|
+
'details': 'cLHes_ebWM'
|
|
47
47
|
};
|
|
48
48
|
var ReportCard = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
49
49
|
(0, _inherits2.default)(ReportCard, _Component);
|
package/lib/taking/api/taking.js
CHANGED
|
@@ -134,7 +134,7 @@ var noBacktrackingNextQuestion = function noBacktrackingNextQuestion(quizSession
|
|
|
134
134
|
|
|
135
135
|
var responseCb = function responseCb(nextItem) {
|
|
136
136
|
if (nextItem) {
|
|
137
|
-
dispatch([(0, _callHandlers.handleSessionItemsResponse)([nextItem], quizSessionId), (0, _taking.setCurrentSessionItemPosition)(nextItem.position)]);
|
|
137
|
+
dispatch([(0, _callHandlers.handleSessionItemsResponse)([nextItem], quizSessionId), (0, _taking.setCurrentSessionItemPosition)(nextItem.position), getResumeData(quizSessionId)]);
|
|
138
138
|
} else {
|
|
139
139
|
submit();
|
|
140
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.66.2-rc.
|
|
3
|
+
"version": "17.66.2-rc.10+58de8d558",
|
|
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": "17.66.2-rc.
|
|
46
|
-
"@instructure/quiz-i18n": "17.66.2-rc.
|
|
47
|
-
"@instructure/quiz-interactions": "17.66.2-rc.
|
|
48
|
-
"@instructure/quiz-number-input": "17.66.2-rc.
|
|
49
|
-
"@instructure/quiz-rce": "17.66.2-rc.
|
|
45
|
+
"@instructure/quiz-common": "17.66.2-rc.10+58de8d558",
|
|
46
|
+
"@instructure/quiz-i18n": "17.66.2-rc.10+58de8d558",
|
|
47
|
+
"@instructure/quiz-interactions": "17.66.2-rc.10+58de8d558",
|
|
48
|
+
"@instructure/quiz-number-input": "17.66.2-rc.10+58de8d558",
|
|
49
|
+
"@instructure/quiz-rce": "17.66.2-rc.10+58de8d558",
|
|
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": "17.66.2-rc.
|
|
110
|
+
"instructure-validations": "17.66.2-rc.10+58de8d558",
|
|
111
111
|
"ipaddr.js": "^1.5.4",
|
|
112
112
|
"isomorphic-fetch": "^2.2.0",
|
|
113
113
|
"isuuid": "^0.1.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": "17.66.2-rc.
|
|
161
|
+
"quiz-presets": "17.66.2-rc.10+58de8d558",
|
|
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": "58de8d55898e0f1899f16476e16ed50786f9cb8d"
|
|
178
178
|
}
|