@instructure/quiz-core 20.11.3-rc.0 → 20.11.3-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/banks/components/SharingModal/presenter.js +1 -1
- package/es/common/components/layout/navbar/presenter.js +24 -18
- package/es/common/components/layout/navbar/styles.js +8 -0
- package/es/common/components/layout/navbar/theme.js +10 -0
- package/es/moderating/components/resources/ModerateTable/presenter.js +44 -46
- package/es/moderating/components/resources/ModerateTable/styles.js +23 -0
- package/es/moderating/components/resources/ModerateTable/theme.js +4 -2
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +63 -68
- package/es/moderating/components/resources/ModerateTableRow/styles.js +25 -0
- package/es/moderating/components/resources/ModerateTableRow/theme.js +4 -2
- package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +1 -1
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +34 -41
- package/es/reporting/components/quizAnalysis/styles.js +27 -0
- package/es/reporting/components/quizAnalysis/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +33 -27
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +14 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +80 -79
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +75 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +47 -49
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +14 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +4 -2
- package/lib/banks/components/SharingModal/presenter.js +1 -1
- package/lib/common/components/layout/navbar/presenter.js +26 -22
- package/lib/common/components/layout/navbar/styles.js +16 -0
- package/lib/common/components/layout/navbar/theme.js +18 -0
- package/lib/moderating/components/resources/ModerateTable/presenter.js +43 -50
- package/lib/moderating/components/resources/ModerateTable/styles.js +33 -0
- package/lib/moderating/components/resources/ModerateTable/theme.js +6 -3
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +61 -70
- package/lib/moderating/components/resources/ModerateTableRow/styles.js +33 -0
- package/lib/moderating/components/resources/ModerateTableRow/theme.js +6 -3
- package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +1 -1
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +33 -43
- package/lib/reporting/components/quizAnalysis/styles.js +37 -0
- package/lib/reporting/components/quizAnalysis/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +29 -27
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +24 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +82 -84
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +85 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +43 -48
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +22 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +6 -3
- package/package.json +9 -9
|
@@ -615,7 +615,7 @@ export var SharingModalPresenter = (_dec = withStyle(generateStyle, generateComp
|
|
|
615
615
|
placement: "end",
|
|
616
616
|
offset: "medium",
|
|
617
617
|
screenReaderLabel: t('Close')
|
|
618
|
-
})), jsx(ModalBody, null, !subAccountBankSharingEnabled && this.renderRootAccountSharing(), !subAccountBankSharingEnabled && this.renderSearchSection(), this.state.shares.size
|
|
618
|
+
})), jsx(ModalBody, null, !subAccountBankSharingEnabled && this.renderRootAccountSharing(), !subAccountBankSharingEnabled && this.renderSearchSection(), this.state.shares.size >= 0 ? this.renderEntitiesSection() : _ref7), jsx(ModalFooter, null, this.renderFooter()));
|
|
619
619
|
}
|
|
620
620
|
}]);
|
|
621
621
|
|
|
@@ -3,18 +3,25 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
var _dec, _class, _class2, _temp;
|
|
8
|
+
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
import { Component } from 'react';
|
|
7
11
|
import PropTypes from 'prop-types';
|
|
8
12
|
import { TopNavBar } from '@instructure/ui-top-nav-bar';
|
|
9
13
|
import { IconQuizLine } from '@instructure/ui-icons';
|
|
10
14
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
16
|
+
import generateStyle from "./styles.js";
|
|
17
|
+
import generateComponentTheme from "./theme.js";
|
|
11
18
|
|
|
12
|
-
var _ref =
|
|
19
|
+
var _ref = jsx(IconQuizLine, {
|
|
13
20
|
color: "primary",
|
|
14
21
|
size: "small"
|
|
15
22
|
});
|
|
16
23
|
|
|
17
|
-
export var NavBar = /*#__PURE__*/function (_Component) {
|
|
24
|
+
export var NavBar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
18
25
|
_inherits(NavBar, _Component);
|
|
19
26
|
|
|
20
27
|
var _super = _createSuper(NavBar);
|
|
@@ -50,15 +57,15 @@ export var NavBar = /*#__PURE__*/function (_Component) {
|
|
|
50
57
|
value: function render() {
|
|
51
58
|
var _this2 = this;
|
|
52
59
|
|
|
53
|
-
return
|
|
54
|
-
breakpoint:
|
|
60
|
+
return jsx(TopNavBar, {
|
|
61
|
+
breakpoint: this.props.styles.phoneBreakPoint,
|
|
55
62
|
mediaQueryMatch: "element",
|
|
56
63
|
inverseColor: true
|
|
57
64
|
}, function () {
|
|
58
|
-
return
|
|
65
|
+
return jsx(TopNavBar.Layout, {
|
|
59
66
|
themeOverride: {
|
|
60
|
-
desktopBackgroundInverse:
|
|
61
|
-
smallViewportBackgroundInverse:
|
|
67
|
+
desktopBackgroundInverse: _this2.props.styles.backgroundColor,
|
|
68
|
+
smallViewportBackgroundInverse: _this2.props.styles.backgroundColor
|
|
62
69
|
},
|
|
63
70
|
navLabel: t('Quizzes navigation bar'),
|
|
64
71
|
desktopConfig: {
|
|
@@ -68,16 +75,16 @@ export var NavBar = /*#__PURE__*/function (_Component) {
|
|
|
68
75
|
dropdownMenuToggleButtonLabel: t('Toggle Menu'),
|
|
69
76
|
dropdownMenuLabel: t('Main Menu')
|
|
70
77
|
},
|
|
71
|
-
renderBrand:
|
|
78
|
+
renderBrand: jsx(TopNavBar.Brand, {
|
|
72
79
|
screenReaderLabel: t('Quizzes'),
|
|
73
80
|
renderIcon: _ref
|
|
74
81
|
}),
|
|
75
|
-
renderMenuItems:
|
|
82
|
+
renderMenuItems: jsx(TopNavBar.MenuItems, {
|
|
76
83
|
listLabel: t('Page navigation'),
|
|
77
84
|
currentPageId: window.location.pathname,
|
|
78
85
|
renderHiddenItemsMenuTriggerLabel: _this2.hiddenMenuItemsMenuTriggerLabel
|
|
79
86
|
}, _this2.props.menuItems.map(function (menuItem) {
|
|
80
|
-
return
|
|
87
|
+
return jsx(TopNavBar.Item, {
|
|
81
88
|
id: menuItem.path,
|
|
82
89
|
key: menuItem.path,
|
|
83
90
|
onClick: function onClick() {
|
|
@@ -86,7 +93,7 @@ export var NavBar = /*#__PURE__*/function (_Component) {
|
|
|
86
93
|
|
|
87
94
|
}, menuItem.text);
|
|
88
95
|
})),
|
|
89
|
-
renderActionItems:
|
|
96
|
+
renderActionItems: jsx(TopNavBar.ActionItems, {
|
|
90
97
|
listLabel: t('Actions'),
|
|
91
98
|
renderHiddenItemsMenuTriggerLabel: _this2.hiddenActionItemsMenuTriggerLabel
|
|
92
99
|
}, _toConsumableArray(_this2.props.actionItems))
|
|
@@ -97,18 +104,17 @@ export var NavBar = /*#__PURE__*/function (_Component) {
|
|
|
97
104
|
|
|
98
105
|
NavBar.displayName = "NavBar";
|
|
99
106
|
return NavBar;
|
|
100
|
-
}(Component)
|
|
101
|
-
NavBar.propTypes = {
|
|
107
|
+
}(Component), _class2.propTypes = {
|
|
102
108
|
menuItems: PropTypes.arrayOf(PropTypes.shape({
|
|
103
109
|
path: PropTypes.string.isRequired,
|
|
104
110
|
text: PropTypes.string.isRequired
|
|
105
111
|
})),
|
|
106
112
|
handleMenuItemChange: PropTypes.func,
|
|
107
|
-
actionItems: PropTypes.arrayOf(PropTypes.node)
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
actionItems: PropTypes.arrayOf(PropTypes.node),
|
|
114
|
+
styles: PropTypes.object
|
|
115
|
+
}, _class2.defaultProps = {
|
|
110
116
|
menuItems: [],
|
|
111
117
|
handleMenuItemChange: function handleMenuItemChange() {},
|
|
112
118
|
actionItems: []
|
|
113
|
-
};
|
|
119
|
+
}, _temp)) || _class);
|
|
114
120
|
export default NavBar;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
|
+
var breakpoints = _ref.breakpoints,
|
|
3
|
+
colors = _ref.colors;
|
|
4
|
+
return {
|
|
5
|
+
backgroundColor: colors.porcelain,
|
|
6
|
+
phoneBreakPoint: breakpoints.medium
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default generateComponentTheme;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
@@ -8,10 +7,10 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
8
7
|
|
|
9
8
|
var _dec, _class, _class2, _temp;
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
/** @jsx jsx */
|
|
11
|
+
import { Component } from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
13
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
14
|
-
import classNames from 'classnames';
|
|
15
14
|
import { Text } from '@instructure/ui-text';
|
|
16
15
|
import { Link } from '@instructure/ui-link';
|
|
17
16
|
import { Flex } from '@instructure/ui-flex';
|
|
@@ -19,37 +18,28 @@ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
|
19
18
|
import { Table } from '@instructure/ui-table';
|
|
20
19
|
import { IconButton } from '@instructure/ui-buttons';
|
|
21
20
|
import { IconInfoLine, IconConfigureLine } from '@instructure/ui-icons';
|
|
22
|
-
import {
|
|
21
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
23
22
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
24
23
|
import ModerateTableRow from "../ModerateTableRow/index.js";
|
|
25
24
|
import IfFeature from "../../../../common/components/shared/IfFeature/index.js";
|
|
26
25
|
import OutstandingQuizzesModal from "../OutstandingQuizzesModal/index.js";
|
|
27
26
|
import ModerateTray from "../../sidebar/ModerateTray/index.js";
|
|
28
27
|
import Spinner from "../../../../common/components/shared/spinner/Spinner.js";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
template: function template(theme) {
|
|
32
|
-
return "\n\n.eDRzW_bwKH{display:block;margin:".concat(theme.emptyTextMargin || 'inherit', " 0 0 0}\n\n.eDRzW_xNcP{background-color:").concat(theme.pageBackgroundColor || 'inherit', ";flex:1;overflow:auto}\n\n.eDRzW_eeML{display:inline-block;transition:transform 0.3s}\n\n.eDRzW_XujX{transform:scaleX(-1)}");
|
|
33
|
-
},
|
|
34
|
-
'emptyText': 'eDRzW_bwKH',
|
|
35
|
-
'page': 'eDRzW_xNcP',
|
|
36
|
-
'scoreToggleWrapper': 'eDRzW_eeML',
|
|
37
|
-
'mirror': 'eDRzW_XujX'
|
|
38
|
-
};
|
|
39
|
-
import theme from "./theme.js";
|
|
28
|
+
import generateStyle from "./styles.js";
|
|
29
|
+
import generateComponentTheme from "./theme.js";
|
|
40
30
|
import ResetQuiz from "../../sidebar/ResetQuiz/index.js";
|
|
41
31
|
import { OUTSTANDING_QUIZZES_MODAL } from '@instructure/quiz-common';
|
|
42
32
|
import { chunk } from 'lodash';
|
|
43
33
|
|
|
44
|
-
var _ref2 =
|
|
34
|
+
var _ref2 = jsx(Flex.Item, null, jsx(IconInfoLine, null));
|
|
45
35
|
|
|
46
|
-
var _ref4 =
|
|
36
|
+
var _ref4 = jsx(IconConfigureLine, null);
|
|
47
37
|
|
|
48
|
-
var _ref5 =
|
|
38
|
+
var _ref5 = jsx(Spinner, null);
|
|
49
39
|
|
|
50
|
-
var _ref6 =
|
|
40
|
+
var _ref6 = jsx(ResetQuiz, null);
|
|
51
41
|
|
|
52
|
-
export var ModerateTable = (_dec =
|
|
42
|
+
export var ModerateTable = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
53
43
|
_inherits(ModerateTable, _Component);
|
|
54
44
|
|
|
55
45
|
var _super = _createSuper(ModerateTable);
|
|
@@ -180,6 +170,9 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
180
170
|
_createClass(ModerateTable, [{
|
|
181
171
|
key: "componentDidMount",
|
|
182
172
|
value: function componentDidMount() {
|
|
173
|
+
this.props.makeStyles({
|
|
174
|
+
displayScoreAsPercentage: this.state.displayScoreAsPercentage
|
|
175
|
+
});
|
|
183
176
|
this.fetchData();
|
|
184
177
|
var _this$props2 = this.props,
|
|
185
178
|
hasSessionTimeLimit = _this$props2.hasSessionTimeLimit,
|
|
@@ -192,6 +185,9 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
192
185
|
}, {
|
|
193
186
|
key: "componentDidUpdate",
|
|
194
187
|
value: function componentDidUpdate(prevProps) {
|
|
188
|
+
this.props.makeStyles({
|
|
189
|
+
displayScoreAsPercentage: this.state.displayScoreAsPercentage
|
|
190
|
+
});
|
|
195
191
|
var _this$props3 = this.props,
|
|
196
192
|
hasSessionTimeLimit = _this$props3.hasSessionTimeLimit,
|
|
197
193
|
sessionTimeLimitInSeconds = _this$props3.sessionTimeLimitInSeconds;
|
|
@@ -241,7 +237,7 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
241
237
|
shouldRenderModerateButton = _this$props4.shouldRenderModerateButton;
|
|
242
238
|
return this.props.tableData.map(function (rowData) {
|
|
243
239
|
var id = rowData.id;
|
|
244
|
-
return
|
|
240
|
+
return jsx(ModerateTableRow, {
|
|
245
241
|
anonymousGrading: _this2.props.anonymousGrading,
|
|
246
242
|
onResultsLinkClick: onResultsLinkClick,
|
|
247
243
|
onAccommodationsClick: _this2.props.onAccommodationsClick,
|
|
@@ -289,23 +285,23 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
289
285
|
value: function renderAlertContent(outstandingAttemptsCount) {
|
|
290
286
|
var _this3 = this;
|
|
291
287
|
|
|
292
|
-
return
|
|
288
|
+
return jsx("div", null, jsx(IfFeature, {
|
|
293
289
|
name: "manual_submission"
|
|
294
|
-
},
|
|
290
|
+
}, jsx(Flex, null, _ref2, jsx(Flex.Item, {
|
|
295
291
|
padding: "xx-small"
|
|
296
292
|
}, t.rich('This assessment has <0>{count, plural, one {# attempt} other {# attempts}}</0> in progress.', {
|
|
297
293
|
count: outstandingAttemptsCount,
|
|
298
294
|
0: function _(_ref3) {
|
|
299
295
|
var children = _ref3.children;
|
|
300
|
-
return
|
|
296
|
+
return jsx(Link, {
|
|
301
297
|
key: "0",
|
|
302
298
|
onClick: _this3.openModalOnClick,
|
|
303
299
|
"data-automation": "sdk-outstanding-quizzes-modal-open"
|
|
304
300
|
}, children);
|
|
305
301
|
}
|
|
306
|
-
})))),
|
|
302
|
+
})))), jsx(IfFeature, {
|
|
307
303
|
name: "manual_submission"
|
|
308
|
-
},
|
|
304
|
+
}, jsx(OutstandingQuizzesModal, {
|
|
309
305
|
quizSessionsData: this.props.quizSessionsData,
|
|
310
306
|
quizSessionIdsAndUsers: this.props.quizSessionIdsAndUsers,
|
|
311
307
|
handleSubmissionAndPoll: this.handleSubmissionAndPoll,
|
|
@@ -315,9 +311,9 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
315
311
|
}, {
|
|
316
312
|
key: "renderScoreToggle",
|
|
317
313
|
value: function renderScoreToggle() {
|
|
318
|
-
return
|
|
319
|
-
|
|
320
|
-
},
|
|
314
|
+
return jsx("div", {
|
|
315
|
+
css: this.props.styles.scoreToggleWrapper
|
|
316
|
+
}, jsx(IconButton, {
|
|
321
317
|
size: "small",
|
|
322
318
|
margin: "0 x-small",
|
|
323
319
|
withBackground: false,
|
|
@@ -330,28 +326,28 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
330
326
|
key: "renderTable",
|
|
331
327
|
value: function renderTable() {
|
|
332
328
|
var outstandingAttemptsCount = this.countOutstandingAttempts();
|
|
333
|
-
return
|
|
329
|
+
return jsx("div", {
|
|
334
330
|
className: "fs-mask"
|
|
335
|
-
}, outstandingAttemptsCount ? this.renderAlertContent(outstandingAttemptsCount) : null,
|
|
331
|
+
}, outstandingAttemptsCount ? this.renderAlertContent(outstandingAttemptsCount) : null, jsx(Table, {
|
|
336
332
|
caption: t('Moderation Table')
|
|
337
|
-
},
|
|
333
|
+
}, jsx(Table.Head, null, jsx(Table.Row, null, jsx(Table.ColHeader, {
|
|
338
334
|
id: "moderation-table-student"
|
|
339
|
-
}, t('Student')), !this.props.anonymousGrading &&
|
|
335
|
+
}, t('Student')), !this.props.anonymousGrading && jsx(Table.ColHeader, {
|
|
340
336
|
id: "moderation-table-attempts"
|
|
341
|
-
}, t('Attempts')), !this.props.anonymousGrading &&
|
|
337
|
+
}, t('Attempts')), !this.props.anonymousGrading && jsx(Table.ColHeader, {
|
|
342
338
|
id: "moderation-table-score"
|
|
343
|
-
}, t('Score'), this.renderScoreToggle()), !this.props.anonymousGrading &&
|
|
339
|
+
}, t('Score'), this.renderScoreToggle()), !this.props.anonymousGrading && jsx(Table.ColHeader, {
|
|
344
340
|
id: "moderation-table-time"
|
|
345
|
-
}, t('Time')), !this.props.anonymousGrading &&
|
|
341
|
+
}, t('Time')), !this.props.anonymousGrading && jsx(Table.ColHeader, {
|
|
346
342
|
id: "moderation-table-log"
|
|
347
|
-
}, t('Log')), this.props.onAccommodationsClick && !this.props.anonymousGrading &&
|
|
343
|
+
}, t('Log')), this.props.onAccommodationsClick && !this.props.anonymousGrading && jsx(Table.ColHeader, {
|
|
348
344
|
id: "moderation-table-accommodations"
|
|
349
345
|
}, t({
|
|
350
346
|
default: 'Accommodations',
|
|
351
347
|
description: 'Support for students with who need extra time or attempts.'
|
|
352
|
-
})), this.props.shouldRenderModerateButton &&
|
|
348
|
+
})), this.props.shouldRenderModerateButton && jsx(Table.ColHeader, {
|
|
353
349
|
id: "moderation-table-moderate"
|
|
354
|
-
},
|
|
350
|
+
}, jsx(ScreenReaderContent, null, t('Moderate'))))), jsx(Table.Body, null, this.renderTableRows())));
|
|
355
351
|
}
|
|
356
352
|
}, {
|
|
357
353
|
key: "renderContent",
|
|
@@ -362,18 +358,18 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
362
358
|
emptyMessage = _this$props5.emptyMessage;
|
|
363
359
|
if (isFetching || this.state.isWaiting) return _ref5;
|
|
364
360
|
if (tableData.length) return this.renderTable();
|
|
365
|
-
return
|
|
366
|
-
|
|
367
|
-
},
|
|
361
|
+
return jsx("span", {
|
|
362
|
+
css: this.props.styles.emptyText
|
|
363
|
+
}, jsx(Text, {
|
|
368
364
|
color: "primary"
|
|
369
365
|
}, emptyMessage));
|
|
370
366
|
}
|
|
371
367
|
}, {
|
|
372
368
|
key: "render",
|
|
373
369
|
value: function render() {
|
|
374
|
-
return
|
|
375
|
-
|
|
376
|
-
},
|
|
370
|
+
return jsx("div", {
|
|
371
|
+
css: this.props.styles.page
|
|
372
|
+
}, jsx(ModerateTray, {
|
|
377
373
|
onClose: this.onCloseTray
|
|
378
374
|
}, !this.props.anonymousGrading && _ref6, this.props.children), this.renderContent());
|
|
379
375
|
}
|
|
@@ -427,7 +423,9 @@ export var ModerateTable = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
427
423
|
})).isRequired,
|
|
428
424
|
quizId: PropTypes.string.isRequired,
|
|
429
425
|
getQuizSessions: PropTypes.func.isRequired,
|
|
430
|
-
addSuccess: PropTypes.func.isRequired
|
|
426
|
+
addSuccess: PropTypes.func.isRequired,
|
|
427
|
+
styles: PropTypes.object,
|
|
428
|
+
makeStyles: PropTypes.func
|
|
431
429
|
}, _class2.defaultProps = {
|
|
432
430
|
anonymousGrading: false,
|
|
433
431
|
children: void 0,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
|
|
3
|
+
var generateStyle = function generateStyle(componentTheme, props, state) {
|
|
4
|
+
return {
|
|
5
|
+
emptyText: {
|
|
6
|
+
display: 'block',
|
|
7
|
+
margin: "".concat(componentTheme.emptyTextMargin, " 0 0 0")
|
|
8
|
+
},
|
|
9
|
+
page: {
|
|
10
|
+
overflow: 'auto',
|
|
11
|
+
flex: '1',
|
|
12
|
+
backgroundColor: componentTheme.pageBackgroundColor
|
|
13
|
+
},
|
|
14
|
+
scoreToggleWrapper: _objectSpread({
|
|
15
|
+
display: 'inline-block',
|
|
16
|
+
transition: 'transform 0.3s'
|
|
17
|
+
}, !state.displayScoreAsPercentage && {
|
|
18
|
+
transform: 'scaleX(-1)'
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default generateStyle;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
colors = _ref.colors;
|
|
4
4
|
return {
|
|
5
5
|
emptyTextMargin: spacing.small,
|
|
6
6
|
pageBackgroundColor: colors.white
|
|
7
7
|
};
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default generateComponentTheme;
|