@instructure/quiz-core 18.3.1-rc.1 → 18.3.1-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/banks/api/banks.js +2 -0
- package/es/banks/api/copyingBanksPoller.js +7 -8
- package/es/banks/components/AddToBankModal/presenter.js +1 -1
- package/es/banks/components/Bank/presenter.js +3 -3
- package/es/banks/components/BankEntry/presenter.js +7 -5
- package/es/banks/components/BankEntryRow/presenter.js +30 -22
- package/es/banks/components/BankSearch/presenter.js +6 -7
- package/es/banks/components/Banks/presenter.js +3 -3
- package/es/banks/components/BanksList/presenter.js +32 -24
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +1 -1
- package/es/banks/components/CreateBankModal/presenter.js +1 -1
- package/es/banks/components/EditBankModal/presenter.js +1 -1
- package/es/banks/components/HeaderMenu/presenter.js +7 -6
- package/es/banks/components/NavWrapper/presenter.js +1 -1
- package/es/banks/components/SharingModal/{ContextualButton → ContextualIconButton}/index.js +14 -12
- package/es/banks/components/SharingModal/ShareList/index.js +9 -9
- package/es/banks/components/SharingModal/presenter.js +4 -4
- package/es/building/components/layout/header/BuildingButtons/presenter.js +8 -7
- package/es/building/components/resources/ActionButtons/presenter.js +20 -15
- package/es/building/components/resources/AddToBankOptions/index.js +8 -12
- package/es/building/components/resources/BanksTray/presenter.js +1 -1
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +1 -1
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +1 -1
- package/es/building/components/resources/MoveImmutableModal/presenter.js +1 -1
- package/es/building/components/resources/quiz/editButton/EditButton.js +8 -6
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +1 -1
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +7 -5
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +3 -3
- package/es/common/components/ConfirmationModal/presenter.js +1 -1
- package/es/common/components/ImportModal/presenter.js +4 -4
- package/es/common/components/Pin/presenter.js +9 -12
- package/es/common/components/PrintFontSizeModal/presenter.js +2 -2
- package/es/common/components/layout/header/Calculator/presenter.js +1 -1
- package/es/common/components/layout/header/Timer/presenter.js +2 -2
- package/es/common/components/layout/sidebar/Sidebar/Pin.js +4 -6
- package/es/common/components/layout/sidebar/Sidebar/index.js +24 -22
- package/es/common/components/layout/sidebar/Sidebar/theme.js +2 -0
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +2 -2
- package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +13 -10
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +2 -2
- package/es/common/components/resources/WarningWrapper/index.js +1 -1
- package/es/common/components/resources/entry/EntrySave/presenter.js +1 -1
- package/es/common/components/resources/quiz/AddContent/Body/presenter.js +3 -1
- package/es/common/components/resources/quiz/AddContent/Button/index.js +1 -1
- package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +12 -10
- package/es/common/components/resources/quizSessionResult/Info/index.js +10 -9
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +1 -1
- package/es/common/components/shared/ExpandButton/index.js +8 -7
- package/es/common/components/shared/InteractionTypes/presenter.js +3 -2
- package/es/common/components/shared/drag_and_drop/DragHandle/presenter.js +8 -7
- package/es/moderating/components/resources/AccommodationsModal/index.js +1 -1
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +10 -8
- package/es/moderating/components/resources/OutstandingQuizzesModal/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +3 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +5 -5
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +4 -4
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +3 -3
- package/lib/banks/api/banks.js +3 -0
- package/lib/banks/api/copyingBanksPoller.js +11 -9
- package/lib/banks/components/AddToBankModal/presenter.js +1 -1
- package/lib/banks/components/Bank/presenter.js +3 -3
- package/lib/banks/components/BankEntry/presenter.js +6 -4
- package/lib/banks/components/BankEntryRow/presenter.js +28 -20
- package/lib/banks/components/BankSearch/presenter.js +5 -6
- package/lib/banks/components/Banks/presenter.js +3 -3
- package/lib/banks/components/BanksList/presenter.js +31 -23
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +1 -1
- package/lib/banks/components/CreateBankModal/presenter.js +1 -1
- package/lib/banks/components/EditBankModal/presenter.js +1 -1
- package/lib/banks/components/HeaderMenu/presenter.js +6 -6
- package/lib/banks/components/NavWrapper/presenter.js +1 -1
- package/lib/banks/components/SharingModal/{ContextualButton → ContextualIconButton}/index.js +15 -13
- package/lib/banks/components/SharingModal/ShareList/index.js +9 -9
- package/lib/banks/components/SharingModal/presenter.js +4 -4
- package/lib/building/components/layout/header/BuildingButtons/presenter.js +7 -7
- package/lib/building/components/resources/ActionButtons/presenter.js +19 -15
- package/lib/building/components/resources/AddToBankOptions/index.js +7 -11
- package/lib/building/components/resources/BanksTray/presenter.js +1 -1
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +1 -1
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +1 -1
- package/lib/building/components/resources/MoveImmutableModal/presenter.js +1 -1
- package/lib/building/components/resources/quiz/editButton/EditButton.js +7 -6
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +1 -1
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +6 -4
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +2 -2
- package/lib/common/components/ConfirmationModal/presenter.js +1 -1
- package/lib/common/components/ImportModal/presenter.js +3 -3
- package/lib/common/components/Pin/presenter.js +8 -12
- package/lib/common/components/PrintFontSizeModal/presenter.js +2 -2
- package/lib/common/components/layout/header/Calculator/presenter.js +1 -1
- package/lib/common/components/layout/header/Timer/presenter.js +2 -2
- package/lib/common/components/layout/sidebar/Sidebar/Pin.js +4 -6
- package/lib/common/components/layout/sidebar/Sidebar/index.js +23 -21
- package/lib/common/components/layout/sidebar/Sidebar/theme.js +2 -0
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +2 -2
- package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +12 -10
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +2 -2
- package/lib/common/components/resources/WarningWrapper/index.js +1 -1
- package/lib/common/components/resources/entry/EntrySave/presenter.js +1 -1
- package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +3 -1
- package/lib/common/components/resources/quiz/AddContent/Button/index.js +1 -1
- package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +12 -10
- package/lib/common/components/resources/quizSessionResult/Info/index.js +9 -8
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +1 -1
- package/lib/common/components/shared/ExpandButton/index.js +7 -7
- package/lib/common/components/shared/InteractionTypes/presenter.js +3 -2
- package/lib/common/components/shared/drag_and_drop/DragHandle/presenter.js +7 -7
- package/lib/moderating/components/resources/AccommodationsModal/index.js +1 -1
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +8 -6
- package/lib/moderating/components/resources/OutstandingQuizzesModal/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +3 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +5 -5
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +4 -4
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +3 -3
- package/package.json +9 -9
|
@@ -45,12 +45,12 @@ export var AddContentPopover = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
45
45
|
return elementsForSelectors(_this.props.appContainer);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
_this.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
_this.showContent = function () {
|
|
49
|
+
_this.props.switchOnEditing();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
_this.hideContent = function () {
|
|
53
|
+
_this.props.switchOffEditing();
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
_this.storePopoverTriggerRef = function (b) {
|
|
@@ -60,11 +60,13 @@ export var AddContentPopover = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
60
60
|
_this.renderPopoverButton = function () {
|
|
61
61
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
62
62
|
on: "click",
|
|
63
|
-
|
|
63
|
+
onShowContent: _this.showContent,
|
|
64
|
+
onHideContent: _this.hideContent,
|
|
64
65
|
isShowingContent: _this.props.isEditing,
|
|
65
66
|
shouldCloseOnEscape: true,
|
|
66
|
-
shouldContainFocus: true
|
|
67
|
-
|
|
67
|
+
shouldContainFocus: true,
|
|
68
|
+
renderTrigger: _this.renderAddContentButton()
|
|
69
|
+
}, /*#__PURE__*/React.createElement(AddContentBody, {
|
|
68
70
|
allowStimulusCreation: _this.props.allowStimulusCreation,
|
|
69
71
|
onOpenBankTray: _this.props.switchOffEditing,
|
|
70
72
|
onAddItem: _this.props.switchOffEditing,
|
|
@@ -72,7 +74,7 @@ export var AddContentPopover = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
72
74
|
position: _this.props.position,
|
|
73
75
|
quizId: _this.props.quizId,
|
|
74
76
|
stimulusId: _this.props.stimulusId
|
|
75
|
-
}))
|
|
77
|
+
}));
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
_this.openAddContentModal = function () {
|
|
@@ -13,7 +13,7 @@ import classNames from 'classnames';
|
|
|
13
13
|
import { AccessibleContent, ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
14
14
|
import { Alert } from '@instructure/ui-alerts';
|
|
15
15
|
import { Text } from '@instructure/ui-text';
|
|
16
|
-
import {
|
|
16
|
+
import { ProgressCircle } from '@instructure/ui-progress';
|
|
17
17
|
import { Heading } from '@instructure/ui-heading';
|
|
18
18
|
import { View } from '@instructure/ui-view';
|
|
19
19
|
import { themeable } from '@instructure/ui-themeable';
|
|
@@ -57,7 +57,8 @@ export var Info = (_dec = themeable(theme, styles), _dec(_class = (_temp = _clas
|
|
|
57
57
|
_createClass(Info, [{
|
|
58
58
|
key: "progressTextFormatter",
|
|
59
59
|
// needed for inst-ui Progress
|
|
60
|
-
value: function progressTextFormatter(
|
|
60
|
+
value: function progressTextFormatter(_ref) {
|
|
61
|
+
var valueNow = _ref.valueNow;
|
|
61
62
|
var percentageUnknown = valueNow === unknownPercentageValue;
|
|
62
63
|
return percentageUnknown ? t('Unknown Score') : t('Your score was {percentage}.', {
|
|
63
64
|
percentage: this.formatPercentMax2FractionDigits(valueNow)
|
|
@@ -66,7 +67,8 @@ export var Info = (_dec = themeable(theme, styles), _dec(_class = (_temp = _clas
|
|
|
66
67
|
|
|
67
68
|
}, {
|
|
68
69
|
key: "progressDisplayFormatter",
|
|
69
|
-
value: function progressDisplayFormatter(
|
|
70
|
+
value: function progressDisplayFormatter(_ref2) {
|
|
71
|
+
var valueNow = _ref2.valueNow;
|
|
70
72
|
var valueToShow = valueNow === unknownPercentageValue ? t({
|
|
71
73
|
id: 'progress_display',
|
|
72
74
|
default: '?',
|
|
@@ -153,13 +155,12 @@ export var Info = (_dec = themeable(theme, styles), _dec(_class = (_temp = _clas
|
|
|
153
155
|
return /*#__PURE__*/React.createElement("div", {
|
|
154
156
|
className: styles.score,
|
|
155
157
|
"data-automation": "sdk-info-score"
|
|
156
|
-
}, /*#__PURE__*/React.createElement(
|
|
157
|
-
|
|
158
|
+
}, /*#__PURE__*/React.createElement(ProgressCircle, {
|
|
159
|
+
shouldAnimateOnMount: true,
|
|
158
160
|
size: "large",
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
formatDisplayedValue: this.progressDisplayFormatter,
|
|
161
|
+
screenReaderLabel: t('Your Score'),
|
|
162
|
+
formatScreenReaderValue: this.progressTextFormatter,
|
|
163
|
+
renderValue: this.progressDisplayFormatter,
|
|
163
164
|
valueNow: this.percentageVal,
|
|
164
165
|
valueMax: 1
|
|
165
166
|
}));
|
|
@@ -440,7 +440,7 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
440
440
|
className: styles.buttonWrapper
|
|
441
441
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
442
442
|
type: "button",
|
|
443
|
-
|
|
443
|
+
color: "primary",
|
|
444
444
|
disabled: !this.state.canSubmit,
|
|
445
445
|
onClick: this.onSubmit
|
|
446
446
|
}, t('Done')))));
|
|
@@ -10,8 +10,7 @@ import React, { Component } from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import { IconArrowOpenDownLine } from '@instructure/ui-icons';
|
|
13
|
-
import {
|
|
14
|
-
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
13
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
15
14
|
import { themeable } from '@instructure/ui-themeable';
|
|
16
15
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
17
16
|
var styles = {
|
|
@@ -46,13 +45,15 @@ export var ExpandButton = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
46
45
|
}, {
|
|
47
46
|
key: "render",
|
|
48
47
|
value: function render() {
|
|
49
|
-
return /*#__PURE__*/React.createElement(
|
|
50
|
-
variant: "icon",
|
|
48
|
+
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
51
49
|
size: "medium",
|
|
50
|
+
withBackground: false,
|
|
51
|
+
withBorder: false,
|
|
52
52
|
onClick: this.props.onClick,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
renderIcon: this.renderIcon()
|
|
54
|
+
}, omitProps(this.props, this.constructor.propTypes), {
|
|
55
|
+
screenReaderLabel: this.props.title
|
|
56
|
+
}));
|
|
56
57
|
}
|
|
57
58
|
}]);
|
|
58
59
|
|
|
@@ -65,12 +65,13 @@ export var InteractionTypes = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
return /*#__PURE__*/React.createElement(Button, {
|
|
68
|
-
fluidWidth: true,
|
|
69
68
|
key: intType.slug,
|
|
70
69
|
margin: "0 0 xx-small",
|
|
71
70
|
onClick: onClick,
|
|
72
71
|
size: "small",
|
|
73
|
-
"data-automation": automation
|
|
72
|
+
"data-automation": automation,
|
|
73
|
+
display: "block",
|
|
74
|
+
textAlign: "start"
|
|
74
75
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
75
76
|
colSpacing: "none",
|
|
76
77
|
vAlign: "middle"
|
|
@@ -6,9 +6,8 @@ import React, { Component } from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
8
8
|
import { Map } from 'immutable';
|
|
9
|
-
import {
|
|
9
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
10
10
|
import { Menu } from '@instructure/ui-menu';
|
|
11
|
-
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
12
11
|
import { IconArrowDownLine, IconArrowUpLine, IconDragHandleLine, IconMiniArrowDownLine, IconMiniArrowUpLine } from '@instructure/ui-icons';
|
|
13
12
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
14
13
|
import keyboardClickable from "../../../../../common/util/keyboardClickable.js";
|
|
@@ -203,19 +202,21 @@ export var DragHandle = /*#__PURE__*/function (_Component) {
|
|
|
203
202
|
}, {
|
|
204
203
|
key: "renderIcon",
|
|
205
204
|
value: function renderIcon() {
|
|
206
|
-
return /*#__PURE__*/React.createElement(
|
|
205
|
+
return /*#__PURE__*/React.createElement(IconButton // must be a button when disabled for the screenreader to read it properly
|
|
207
206
|
// must be a div when enabled to allow dragging in firefox
|
|
208
207
|
, {
|
|
209
208
|
as: this.props.disabled ? 'button' : 'div',
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
renderIcon: IconDragHandleLine,
|
|
210
|
+
withBackground: false,
|
|
211
|
+
withBorder: false,
|
|
212
212
|
size: "small",
|
|
213
213
|
ref: this.handleTriggerRef,
|
|
214
214
|
onKeyDown: keyboardClickable,
|
|
215
215
|
disabled: this.props.disabled,
|
|
216
216
|
"data-automation": "sdk-drag-handle",
|
|
217
|
-
cursor: "move"
|
|
218
|
-
|
|
217
|
+
cursor: "move",
|
|
218
|
+
screenReaderLabel: this.props.quizEntry.generateScreenReaderText(this.props.displayPosition, MOVE)
|
|
219
|
+
});
|
|
219
220
|
}
|
|
220
221
|
}, {
|
|
221
222
|
key: "renderMenuItems",
|
|
@@ -117,7 +117,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
117
117
|
margin: "xxx-small",
|
|
118
118
|
"data-automation": "sdk-moderation-cancel"
|
|
119
119
|
}, t('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
120
|
-
|
|
120
|
+
color: "primary",
|
|
121
121
|
onClick: this.saveAction,
|
|
122
122
|
margin: "xxx-small",
|
|
123
123
|
"data-automation": "sdk-moderation-save"
|
|
@@ -9,7 +9,7 @@ var _dec, _class, _class2, _temp;
|
|
|
9
9
|
import React, { Component } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
12
|
-
import { AccessibleContent, PresentationContent
|
|
12
|
+
import { AccessibleContent, PresentationContent } from '@instructure/ui-a11y-content';
|
|
13
13
|
import { List } from '@instructure/ui-list';
|
|
14
14
|
import { Text } from '@instructure/ui-text';
|
|
15
15
|
import { Link } from '@instructure/ui-link';
|
|
@@ -18,7 +18,7 @@ import { View } from '@instructure/ui-view';
|
|
|
18
18
|
import { Flex } from '@instructure/ui-flex';
|
|
19
19
|
import { Table } from '@instructure/ui-table';
|
|
20
20
|
import { IconEditLine, IconWarningLine } from '@instructure/ui-icons';
|
|
21
|
-
import { Button } from '@instructure/ui-buttons';
|
|
21
|
+
import { Button, IconButton } from '@instructure/ui-buttons';
|
|
22
22
|
import { themeable } from '@instructure/ui-themeable';
|
|
23
23
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
24
24
|
import { withI18nSupport } from '@instructure/quiz-common';
|
|
@@ -287,7 +287,7 @@ export var ModerateTableRow = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
287
287
|
}, t('None'));
|
|
288
288
|
} else {
|
|
289
289
|
displayContent = /*#__PURE__*/React.createElement(List, {
|
|
290
|
-
|
|
290
|
+
isUnstyled: true
|
|
291
291
|
}, accommodations.map(function (elem) {
|
|
292
292
|
return /*#__PURE__*/React.createElement(List.Item, {
|
|
293
293
|
key: elem.name
|
|
@@ -305,13 +305,15 @@ export var ModerateTableRow = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
305
305
|
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
306
306
|
shouldShrink: true,
|
|
307
307
|
"data-automation": "sdk-moderate-accommodations-text"
|
|
308
|
-
}, displayContent), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(
|
|
309
|
-
variant: "icon",
|
|
308
|
+
}, displayContent), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(IconButton, {
|
|
310
309
|
margin: "0 x-small 0 0",
|
|
311
|
-
|
|
310
|
+
withBackground: false,
|
|
311
|
+
withBorder: false,
|
|
312
|
+
renderIcon: IconEditLine,
|
|
312
313
|
onClick: this.onAccommodationsClick,
|
|
313
|
-
"data-automation": "sdk-moderate-accommodations-edit"
|
|
314
|
-
|
|
314
|
+
"data-automation": "sdk-moderate-accommodations-edit",
|
|
315
|
+
screenReaderLabel: t('Edit student accommodations')
|
|
316
|
+
}))));
|
|
315
317
|
}
|
|
316
318
|
}
|
|
317
319
|
}, {
|
|
@@ -140,7 +140,7 @@ export var OutstandingQuizzesModal = /*#__PURE__*/function (_Component) {
|
|
|
140
140
|
}, t('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
141
141
|
onClick: this.saveAction,
|
|
142
142
|
margin: "xxx-small",
|
|
143
|
-
|
|
143
|
+
color: "primary",
|
|
144
144
|
disabled: !this.state.quizzesSelectedAndReadyToSubmit.length,
|
|
145
145
|
"data-automation": "sdk-outstanding-quizzes-submit"
|
|
146
146
|
}, t('Submit Manually'))));
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js
CHANGED
|
@@ -8,11 +8,11 @@ var _dec, _class, _class2, _temp;
|
|
|
8
8
|
import { themeable } from '@instructure/ui-themeable';
|
|
9
9
|
import theme from "./theme.js";
|
|
10
10
|
var styles = {
|
|
11
|
-
componentId: '
|
|
11
|
+
componentId: 'ethsC',
|
|
12
12
|
template: function template(theme) {
|
|
13
|
-
return "\n\n.
|
|
13
|
+
return "\n\n.ethsC_eckF{margin:0;max-width:159px;text-transform:capitalize}";
|
|
14
14
|
},
|
|
15
|
-
'metricLabel': '
|
|
15
|
+
'metricLabel': 'ethsC_eckF'
|
|
16
16
|
};
|
|
17
17
|
import React, { Component } from 'react';
|
|
18
18
|
import { getSanitizedMetricValue } from "../utils.js";
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js
CHANGED
|
@@ -9,13 +9,13 @@ import React, { Component } from 'react';
|
|
|
9
9
|
import { Metric } from '@instructure/ui-metric';
|
|
10
10
|
import { getSanitizedMetricValue } from "../utils.js";
|
|
11
11
|
var styles = {
|
|
12
|
-
componentId: '
|
|
12
|
+
componentId: 'dpcwk',
|
|
13
13
|
template: function template(theme) {
|
|
14
|
-
return "\n\n.
|
|
14
|
+
return "\n\n.dpcwk_elNf{max-width:159px}\n\n.dpcwk_eckF{margin:0;padding-right:24px;text-transform:capitalize}\n\n.dpcwk_dqHR{margin-left:-24px;padding-left:5px}";
|
|
15
15
|
},
|
|
16
|
-
'metricLabelContainer': '
|
|
17
|
-
'metricLabel': '
|
|
18
|
-
'popoverContainer': '
|
|
16
|
+
'metricLabelContainer': 'dpcwk_elNf',
|
|
17
|
+
'metricLabel': 'dpcwk_eckF',
|
|
18
|
+
'popoverContainer': 'dpcwk_dqHR'
|
|
19
19
|
};
|
|
20
20
|
import MetricPopover from "../MetricPopover/index.js";
|
|
21
21
|
import { themeable } from '@instructure/ui-themeable';
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -100,17 +100,17 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
100
100
|
className: styles.metricsWrapper
|
|
101
101
|
}, /*#__PURE__*/React.createElement(AnalysisMetric, {
|
|
102
102
|
metricKey: "highscore",
|
|
103
|
-
label: t('
|
|
103
|
+
label: t('High Score'),
|
|
104
104
|
value: scores === null || scores === void 0 ? void 0 : scores.max_percentage,
|
|
105
105
|
suffix: "%"
|
|
106
106
|
}), /*#__PURE__*/React.createElement(AnalysisMetric, {
|
|
107
107
|
metricKey: "lowscore",
|
|
108
|
-
label: t('
|
|
108
|
+
label: t('Low Score'),
|
|
109
109
|
value: scores === null || scores === void 0 ? void 0 : scores.min_percentage,
|
|
110
110
|
suffix: "%"
|
|
111
111
|
}), /*#__PURE__*/React.createElement(AnalysisMetric, {
|
|
112
112
|
metricKey: "meanscore",
|
|
113
|
-
label: t('
|
|
113
|
+
label: t('Mean Score'),
|
|
114
114
|
value: scores === null || scores === void 0 ? void 0 : scores.mean_percentage,
|
|
115
115
|
suffix: "%"
|
|
116
116
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -122,7 +122,7 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
122
122
|
suffix: "%"
|
|
123
123
|
}), /*#__PURE__*/React.createElement(AnalysisMetric, {
|
|
124
124
|
metricKey: "mean_elapsed_sec",
|
|
125
|
-
label: t('
|
|
125
|
+
label: t('Mean Elapsed Time'),
|
|
126
126
|
value: formatTimeToFullNumeric(attempts === null || attempts === void 0 ? void 0 : attempts.mean_elapsed_sec)
|
|
127
127
|
})), /*#__PURE__*/React.createElement("div", {
|
|
128
128
|
className: styles.expandButtonContainer
|
|
@@ -64,17 +64,17 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
|
|
|
64
64
|
className: styles.metricsContainer
|
|
65
65
|
}, /*#__PURE__*/React.createElement(AnalysisMetric, {
|
|
66
66
|
metricKey: "highscore",
|
|
67
|
-
label: t('
|
|
67
|
+
label: t('High Score'),
|
|
68
68
|
value: (_quizAnalysis$scores = quizAnalysis.scores) === null || _quizAnalysis$scores === void 0 ? void 0 : _quizAnalysis$scores.max_percentage,
|
|
69
69
|
suffix: "%"
|
|
70
70
|
}), /*#__PURE__*/React.createElement(AnalysisMetric, {
|
|
71
71
|
metricKey: "lowscore",
|
|
72
|
-
label: t('
|
|
72
|
+
label: t('Low Score'),
|
|
73
73
|
value: (_quizAnalysis$scores2 = quizAnalysis.scores) === null || _quizAnalysis$scores2 === void 0 ? void 0 : _quizAnalysis$scores2.min_percentage,
|
|
74
74
|
suffix: "%"
|
|
75
75
|
}), /*#__PURE__*/React.createElement(AnalysisMetric, {
|
|
76
76
|
metricKey: "meanscore",
|
|
77
|
-
label: t('
|
|
77
|
+
label: t('Mean Score'),
|
|
78
78
|
value: (_quizAnalysis$scores3 = quizAnalysis.scores) === null || _quizAnalysis$scores3 === void 0 ? void 0 : _quizAnalysis$scores3.mean_percentage,
|
|
79
79
|
suffix: "%"
|
|
80
80
|
}));
|
package/lib/banks/api/banks.js
CHANGED
|
@@ -32,6 +32,8 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
32
32
|
|
|
33
33
|
var _helpers = require("../../common/api/helpers.js");
|
|
34
34
|
|
|
35
|
+
var _copyingBanksPoller = require("./copyingBanksPoller.js");
|
|
36
|
+
|
|
35
37
|
var _quizCommon = require("@instructure/quiz-common");
|
|
36
38
|
|
|
37
39
|
var _lodash = require("lodash");
|
|
@@ -204,6 +206,7 @@ var updateBank = function updateBank(bank) {
|
|
|
204
206
|
exports.updateBank = updateBank;
|
|
205
207
|
|
|
206
208
|
var deleteBank = function deleteBank(bankId) {
|
|
209
|
+
(0, _copyingBanksPoller.removeFromPolling)([bankId]);
|
|
207
210
|
var url = "".concat(banksApiEndpoint, "/").concat(bankId);
|
|
208
211
|
return function (dispatch, getState) {
|
|
209
212
|
var fetcher = new _Fetcher.default({
|
|
@@ -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.addToPolling = void 0;
|
|
8
|
+
exports.removeFromPolling = exports.addToPolling = void 0;
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
@@ -37,6 +37,14 @@ var addToPolling = function addToPolling(bankId, bankTitle) {
|
|
|
37
37
|
|
|
38
38
|
exports.addToPolling = addToPolling;
|
|
39
39
|
|
|
40
|
+
var removeFromPolling = function removeFromPolling(removeIds) {
|
|
41
|
+
pollingBanks = pollingBanks.filter(function (bank) {
|
|
42
|
+
return !removeIds.includes(bank.id);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.removeFromPolling = removeFromPolling;
|
|
47
|
+
|
|
40
48
|
var handlePollingBanks = /*#__PURE__*/function () {
|
|
41
49
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(dispatch) {
|
|
42
50
|
var getSpecificBanksFn,
|
|
@@ -86,7 +94,7 @@ var handlePollingBanks = /*#__PURE__*/function () {
|
|
|
86
94
|
finishedCopyingIds = finishedCopying.map(function (bank) {
|
|
87
95
|
return bank.id;
|
|
88
96
|
});
|
|
89
|
-
|
|
97
|
+
removeFromPolling(finishedCopyingIds);
|
|
90
98
|
|
|
91
99
|
if (pollingBanks.length > 0) {
|
|
92
100
|
setTimeout(function () {
|
|
@@ -107,10 +115,4 @@ var handlePollingBanks = /*#__PURE__*/function () {
|
|
|
107
115
|
return function handlePollingBanks(_x) {
|
|
108
116
|
return _ref.apply(this, arguments);
|
|
109
117
|
};
|
|
110
|
-
}();
|
|
111
|
-
|
|
112
|
-
var removeFinishedCopies = function removeFinishedCopies(finishedCopyingIds) {
|
|
113
|
-
pollingBanks = pollingBanks.filter(function (bank) {
|
|
114
|
-
return !finishedCopyingIds.includes(bank.id);
|
|
115
|
-
});
|
|
116
|
-
};
|
|
118
|
+
}();
|
|
@@ -232,7 +232,7 @@ var AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
|
232
232
|
var disabled = bankType === 'existing' && !this.props.selectedBank || bankType === 'new' && (!newBankTitle || !newBankTitle.trim()) || checkBankedContentShareabilityEnabled && contentShareableLoading;
|
|
233
233
|
return /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
234
234
|
type: "button",
|
|
235
|
-
|
|
235
|
+
color: "primary",
|
|
236
236
|
onClick: this.continueAction,
|
|
237
237
|
disabled: disabled,
|
|
238
238
|
margin: _quizCommon.XSMALL_SIDE_MARGIN,
|
|
@@ -444,10 +444,10 @@ var Bank = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_cl
|
|
|
444
444
|
return /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
445
445
|
margin: "small none",
|
|
446
446
|
ref: this.storeCreateBankEntryButtonRef,
|
|
447
|
-
|
|
447
|
+
color: "primary",
|
|
448
448
|
onClick: this.openAddBankEntryModal,
|
|
449
449
|
"data-automation": "sdk-new-bank-entry-button",
|
|
450
|
-
|
|
450
|
+
renderIcon: _uiIcons.IconPlusLine
|
|
451
451
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
452
452
|
alt: (0, _formatMessage.default)('Create Bank Entry')
|
|
453
453
|
}, (0, _formatMessage.default)('New')));
|
|
@@ -462,7 +462,7 @@ var Bank = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_cl
|
|
|
462
462
|
return /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
463
463
|
onClick: this.addBankToQuiz,
|
|
464
464
|
margin: "small none",
|
|
465
|
-
|
|
465
|
+
renderIcon: _uiIcons.IconPlusLine
|
|
466
466
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
467
467
|
alt: (0, _formatMessage.default)('Add this bank to quiz')
|
|
468
468
|
}, (0, _formatMessage.default)('All / Random')));
|
|
@@ -596,13 +596,15 @@ var BankEntry = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _de
|
|
|
596
596
|
text = (0, _formatMessage.default)('Edit Question Level Feedback');
|
|
597
597
|
}
|
|
598
598
|
|
|
599
|
-
return /*#__PURE__*/_react.default.createElement(_uiButtons.
|
|
600
|
-
variant: "icon",
|
|
599
|
+
return /*#__PURE__*/_react.default.createElement(_uiButtons.IconButton, {
|
|
601
600
|
onClick: this.openFeedbackModal,
|
|
601
|
+
withBackground: false,
|
|
602
|
+
withBorder: false,
|
|
602
603
|
disabled: disabled,
|
|
603
604
|
ref: this.storeFeedbackButtonRef,
|
|
604
|
-
|
|
605
|
-
|
|
605
|
+
renderIcon: icon,
|
|
606
|
+
screenReaderLabel: text
|
|
607
|
+
});
|
|
606
608
|
}
|
|
607
609
|
}, {
|
|
608
610
|
key: "getBankEntryId",
|
|
@@ -179,14 +179,16 @@ var BankEntryRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
179
179
|
var title = (0, _formatMessage.default)('Delete {type}', {
|
|
180
180
|
type: _this.type()
|
|
181
181
|
});
|
|
182
|
-
return /*#__PURE__*/_react.default.createElement(_uiButtons.
|
|
183
|
-
variant: "icon",
|
|
182
|
+
return /*#__PURE__*/_react.default.createElement(_uiButtons.IconButton, {
|
|
184
183
|
size: "medium",
|
|
184
|
+
withBackground: false,
|
|
185
|
+
withBorder: false,
|
|
185
186
|
onClick: _this.deleteBankEntry,
|
|
186
187
|
"data-automation": "sdk-delete-bank-entry-button",
|
|
187
|
-
|
|
188
|
-
title: title
|
|
189
|
-
|
|
188
|
+
renderIcon: _uiIcons.IconTrashLine,
|
|
189
|
+
title: title,
|
|
190
|
+
screenReaderLabel: title
|
|
191
|
+
});
|
|
190
192
|
};
|
|
191
193
|
|
|
192
194
|
_this.navigateToBankEntry = function () {
|
|
@@ -263,15 +265,17 @@ var BankEntryRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
263
265
|
});
|
|
264
266
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
265
267
|
className: (0, _classnames.default)(styles.buttons, styles.addButton)
|
|
266
|
-
}, /*#__PURE__*/_react.default.createElement(_uiButtons.
|
|
267
|
-
|
|
268
|
+
}, /*#__PURE__*/_react.default.createElement(_uiButtons.IconButton, {
|
|
269
|
+
color: "primary",
|
|
270
|
+
shape: "circle",
|
|
268
271
|
size: "small",
|
|
269
272
|
onClick: this.addToQuiz,
|
|
270
273
|
"data-automation": "sdk-add-bank-entry-button",
|
|
271
274
|
disabled: this.props.bankEntry.isStimulus && this.props.stimulusId !== null,
|
|
272
|
-
|
|
273
|
-
title: title
|
|
274
|
-
|
|
275
|
+
renderIcon: _uiIcons.IconPlusLine,
|
|
276
|
+
title: title,
|
|
277
|
+
screenReaderLabel: title
|
|
278
|
+
}));
|
|
275
279
|
} // This empty div is necessary for spacing
|
|
276
280
|
|
|
277
281
|
|
|
@@ -281,15 +285,17 @@ var BankEntryRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
281
285
|
key: "renderMoveButton",
|
|
282
286
|
value: function renderMoveButton() {
|
|
283
287
|
var title = this.moveModalTitle();
|
|
284
|
-
return /*#__PURE__*/_react.default.createElement(_uiButtons.
|
|
288
|
+
return /*#__PURE__*/_react.default.createElement(_uiButtons.IconButton, {
|
|
285
289
|
ref: this.storeCopyMoveBankEntryButtonRef,
|
|
286
|
-
variant: "icon",
|
|
287
290
|
size: "medium",
|
|
291
|
+
withBackground: false,
|
|
292
|
+
withBorder: false,
|
|
288
293
|
onClick: this.openCopyMoveBankEntryModal,
|
|
289
294
|
"data-automation": "sdk-copy-move-bank-entry-button",
|
|
290
|
-
|
|
291
|
-
title: title
|
|
292
|
-
|
|
295
|
+
renderIcon: _uiIcons.IconCopyLine,
|
|
296
|
+
title: title,
|
|
297
|
+
screenReaderLabel: title
|
|
298
|
+
});
|
|
293
299
|
}
|
|
294
300
|
}, {
|
|
295
301
|
key: "entryHeader",
|
|
@@ -350,15 +356,17 @@ var BankEntryRow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
350
356
|
var title = (0, _formatMessage.default)('Edit {type}', {
|
|
351
357
|
type: this.type()
|
|
352
358
|
});
|
|
353
|
-
return /*#__PURE__*/_react.default.createElement(_uiButtons.
|
|
359
|
+
return /*#__PURE__*/_react.default.createElement(_uiButtons.IconButton, {
|
|
354
360
|
ref: this.storeEditButtonRef,
|
|
355
|
-
variant: "icon",
|
|
356
361
|
size: "medium",
|
|
362
|
+
withBackground: false,
|
|
363
|
+
withBorder: false,
|
|
357
364
|
onClick: this.navigateToBankEntry,
|
|
358
365
|
"data-automation": "sdk-edit-bank-entry-button",
|
|
359
|
-
|
|
360
|
-
title: title
|
|
361
|
-
|
|
366
|
+
renderIcon: _uiIcons.IconEditLine,
|
|
367
|
+
title: title,
|
|
368
|
+
screenReaderLabel: title
|
|
369
|
+
});
|
|
362
370
|
}
|
|
363
371
|
}, {
|
|
364
372
|
key: "renderTags",
|
|
@@ -161,10 +161,9 @@ var BankSearch = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _d
|
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
var text = allInteractions ? hide() : show();
|
|
164
|
-
return /*#__PURE__*/_react.default.createElement(_uiButtons.
|
|
164
|
+
return /*#__PURE__*/_react.default.createElement(_uiButtons.CondensedButton, {
|
|
165
165
|
onClick: toggleAllInteractions,
|
|
166
|
-
margin: "none small"
|
|
167
|
-
variant: "link"
|
|
166
|
+
margin: "none small"
|
|
168
167
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
169
168
|
alt: text
|
|
170
169
|
}, text));
|
|
@@ -194,8 +193,8 @@ var BankSearch = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _d
|
|
|
194
193
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
195
194
|
as: "div"
|
|
196
195
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
shouldGrow: true,
|
|
197
|
+
shouldShrink: true
|
|
199
198
|
}, /*#__PURE__*/_react.default.createElement(_uiTextInput.TextInput, {
|
|
200
199
|
renderLabel: /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Search')),
|
|
201
200
|
type: "search",
|
|
@@ -205,7 +204,7 @@ var BankSearch = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _d
|
|
|
205
204
|
})), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
206
205
|
onClick: toggleFilters,
|
|
207
206
|
margin: "none none none small",
|
|
208
|
-
|
|
207
|
+
renderIcon: _uiIcons.IconPlusLine,
|
|
209
208
|
"data-automation": "sdk-search-filter-button"
|
|
210
209
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
211
210
|
alt: showFilters ? (0, _formatMessage.default)('Hide search filters') : (0, _formatMessage.default)('Show search filters')
|
|
@@ -371,7 +371,7 @@ var Banks = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
371
371
|
type: "button",
|
|
372
372
|
onClick: this.handleSortingButtonClick,
|
|
373
373
|
"data-automation": "sdk-sort-banks-button",
|
|
374
|
-
|
|
374
|
+
renderIcon: this.getSortingOrderIcon()
|
|
375
375
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
376
376
|
alt: this.getSortAssistiveText()
|
|
377
377
|
}, (0, _formatMessage.default)('Sort')))));
|
|
@@ -403,10 +403,10 @@ var Banks = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
403
403
|
}, (0, _formatMessage.default)('Banks')), /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
404
404
|
ref: this.handleCreateBankButtonRef,
|
|
405
405
|
type: "button",
|
|
406
|
-
|
|
406
|
+
color: "primary",
|
|
407
407
|
onClick: this.onCreateBank,
|
|
408
408
|
"data-automation": "sdk-create-new-bank-button",
|
|
409
|
-
|
|
409
|
+
renderIcon: _uiIcons.IconPlusLine
|
|
410
410
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
411
411
|
alt: (0, _formatMessage.default)('Create Bank')
|
|
412
412
|
}, (0, _formatMessage.default)('Bank'))));
|