@instructure/quiz-core 18.3.1-rc.2 → 18.3.1-rc.21
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/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/presenter.js +6 -6
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/ChoiceInfo → AnswerFrequencySummary/ChoiceType}/presenter.js +46 -28
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +54 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +22 -26
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +3 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg +58 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +9 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/errorMessages.js +7 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +19 -13
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/generateReports.js +5 -4
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +92 -30
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +8 -6
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +13 -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/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/presenter.js +8 -8
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/ChoiceInfo → AnswerFrequencySummary/ChoiceType}/presenter.js +53 -32
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +75 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +1 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +21 -25
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg +58 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +14 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorMessages.js +15 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +19 -13
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/generateReports.js +6 -4
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +95 -30
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +12 -6
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +14 -2
- package/package.json +12 -11
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/AnswerSummaryTableRow/index.js +0 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/ChoiceInfo/index.js +0 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/index.js +0 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js +0 -65
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/AnswerSummaryTableRow/index.js +0 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/ChoiceInfo/index.js +0 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/index.js +0 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js +0 -87
- /package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/theme.js +0 -0
- /package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable → AnswerFrequencySummary/ChoiceType}/theme.js +0 -0
- /package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/theme.js +0 -0
- /package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable → AnswerFrequencySummary/ChoiceType}/theme.js +0 -0
|
@@ -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'))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChoiceTypeTableRow as default } from "./presenter.js";
|
|
@@ -30,15 +30,15 @@ var _ref = /*#__PURE__*/React.createElement(IconCheckSolid, null);
|
|
|
30
30
|
|
|
31
31
|
var _ref2 = /*#__PURE__*/React.createElement(IconXSolid, null);
|
|
32
32
|
|
|
33
|
-
export var
|
|
34
|
-
_inherits(
|
|
33
|
+
export var ChoiceTypeTableRow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
34
|
+
_inherits(ChoiceTypeTableRow, _Component);
|
|
35
35
|
|
|
36
|
-
var _super = _createSuper(
|
|
36
|
+
var _super = _createSuper(ChoiceTypeTableRow);
|
|
37
37
|
|
|
38
|
-
function
|
|
38
|
+
function ChoiceTypeTableRow() {
|
|
39
39
|
var _this;
|
|
40
40
|
|
|
41
|
-
_classCallCheck(this,
|
|
41
|
+
_classCallCheck(this, ChoiceTypeTableRow);
|
|
42
42
|
|
|
43
43
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
44
|
args[_key] = arguments[_key];
|
|
@@ -112,7 +112,7 @@ export var AnswerSummaryTableRow = (_dec = themeable(theme, styles), _dec(_class
|
|
|
112
112
|
return _this;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
return
|
|
115
|
+
return ChoiceTypeTableRow;
|
|
116
116
|
}(Component), _class2.displayName = 'Row', _class2.propTypes = {
|
|
117
117
|
choice: PropTypes.shape({
|
|
118
118
|
body: PropTypes.string,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChoiceType as default } from "./presenter.js";
|
|
@@ -2,21 +2,36 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
|
|
6
|
+
var _dec, _class, _class2, _temp;
|
|
7
|
+
|
|
5
8
|
import React, { Component } from 'react';
|
|
6
9
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
7
10
|
import { Table } from '@instructure/ui-table';
|
|
11
|
+
import { Flex } from '@instructure/ui-flex';
|
|
12
|
+
import { Heading } from '@instructure/ui-heading';
|
|
13
|
+
import { themeable } from '@instructure/ui-themeable';
|
|
8
14
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
9
|
-
import AnswerSummaryTableRow from "../AnswerSummaryTableRow/index.js";
|
|
10
15
|
import PropTypes from 'prop-types';
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
import ChoiceTypeTableRow from "./ChoiceTypeTableRow/index.js";
|
|
17
|
+
import { choiceTypeAnswerSummaryPropType } from "../../propTypes.js";
|
|
18
|
+
var styles = {
|
|
19
|
+
componentId: 'ZuPLN',
|
|
20
|
+
template: function template(theme) {
|
|
21
|
+
return "\n\n.ZuPLN_rMrG{display:flex;flex-basis:100%;flex-direction:column;padding-bottom:".concat(theme.tableBottomPadding || 'inherit', "}");
|
|
22
|
+
},
|
|
23
|
+
'tableWrapper': 'ZuPLN_rMrG'
|
|
24
|
+
};
|
|
25
|
+
import theme from "./theme.js";
|
|
26
|
+
export var ChoiceType = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
27
|
+
_inherits(ChoiceType, _Component);
|
|
13
28
|
|
|
14
|
-
var _super = _createSuper(
|
|
29
|
+
var _super = _createSuper(ChoiceType);
|
|
15
30
|
|
|
16
|
-
function
|
|
31
|
+
function ChoiceType() {
|
|
17
32
|
var _this;
|
|
18
33
|
|
|
19
|
-
_classCallCheck(this,
|
|
34
|
+
_classCallCheck(this, ChoiceType);
|
|
20
35
|
|
|
21
36
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
37
|
args[_key] = arguments[_key];
|
|
@@ -25,7 +40,7 @@ export var ChoiceInfo = /*#__PURE__*/function (_Component) {
|
|
|
25
40
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
26
41
|
|
|
27
42
|
_this.renderRow = function (choice, choiceIndex) {
|
|
28
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
+
return /*#__PURE__*/React.createElement(ChoiceTypeTableRow, {
|
|
29
44
|
key: choiceIndex,
|
|
30
45
|
choice: choice,
|
|
31
46
|
choiceIndex: choiceIndex
|
|
@@ -39,7 +54,7 @@ export var ChoiceInfo = /*#__PURE__*/function (_Component) {
|
|
|
39
54
|
correct: false,
|
|
40
55
|
count: payload.count
|
|
41
56
|
};
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
57
|
+
return /*#__PURE__*/React.createElement(ChoiceTypeTableRow, {
|
|
43
58
|
key: choiceIndex,
|
|
44
59
|
choice: asChoice,
|
|
45
60
|
choiceIndex: choiceIndex
|
|
@@ -49,19 +64,32 @@ export var ChoiceInfo = /*#__PURE__*/function (_Component) {
|
|
|
49
64
|
return _this;
|
|
50
65
|
}
|
|
51
66
|
|
|
52
|
-
_createClass(
|
|
67
|
+
_createClass(ChoiceType, [{
|
|
53
68
|
key: "render",
|
|
54
69
|
value: function render() {
|
|
55
70
|
var _this$props = this.props,
|
|
56
|
-
|
|
57
|
-
noAnswer = _this$props.noAnswer,
|
|
71
|
+
answerSummary = _this$props.answerSummary,
|
|
58
72
|
itemId = _this$props.itemId;
|
|
73
|
+
var choices = answerSummary.choices,
|
|
74
|
+
noAnswer = answerSummary.no_answer;
|
|
59
75
|
var numberOfChoices = choices.length;
|
|
60
76
|
var spacingHeaderId = "answer-frequency-summary-spacing-".concat(itemId);
|
|
61
77
|
var answerHeaderId = "answer-frequency-summary-answer-".concat(itemId);
|
|
62
78
|
var respondentsHeaderId = "answer-frequency-summary-respondents-".concat(itemId);
|
|
63
79
|
var percentageHeaderId = "answer-frequency-summary-percentage-".concat(itemId);
|
|
64
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Flex, {
|
|
81
|
+
direction: "row"
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
83
|
+
shouldGrow: true
|
|
84
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: styles.tableWrapper
|
|
86
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
87
|
+
margin: "large 0 small 0",
|
|
88
|
+
level: "h4",
|
|
89
|
+
theme: {
|
|
90
|
+
h4FontWeight: 'normal'
|
|
91
|
+
}
|
|
92
|
+
}, t('Answer Frequency Summary')), /*#__PURE__*/React.createElement(Table, {
|
|
65
93
|
caption: t('Answer Frequency Summary')
|
|
66
94
|
}, /*#__PURE__*/React.createElement(Table.Head, null, /*#__PURE__*/React.createElement(Table.Row, null, /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
67
95
|
id: spacingHeaderId,
|
|
@@ -76,23 +104,13 @@ export var ChoiceInfo = /*#__PURE__*/function (_Component) {
|
|
|
76
104
|
id: percentageHeaderId,
|
|
77
105
|
height: "47px",
|
|
78
106
|
textAlign: "center"
|
|
79
|
-
}, t('%')))), /*#__PURE__*/React.createElement(Table.Body, null, choices.map(this.renderRow), this.renderNoAnswer(noAnswer, numberOfChoices))));
|
|
107
|
+
}, t('%')))), /*#__PURE__*/React.createElement(Table.Body, null, choices.map(this.renderRow), this.renderNoAnswer(noAnswer, numberOfChoices)))))));
|
|
80
108
|
}
|
|
81
109
|
}]);
|
|
82
110
|
|
|
83
|
-
|
|
84
|
-
return
|
|
85
|
-
}(Component)
|
|
86
|
-
ChoiceInfo.propTypes = {
|
|
111
|
+
ChoiceType.displayName = "ChoiceType";
|
|
112
|
+
return ChoiceType;
|
|
113
|
+
}(Component), _class2.propTypes = {
|
|
87
114
|
itemId: PropTypes.number,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
correct: PropTypes.bool,
|
|
91
|
-
count: PropTypes.number,
|
|
92
|
-
percentage: PropTypes.number
|
|
93
|
-
})),
|
|
94
|
-
noAnswer: PropTypes.shape({
|
|
95
|
-
count: PropTypes.number,
|
|
96
|
-
percentage: PropTypes.number
|
|
97
|
-
})
|
|
98
|
-
}.isRequired;
|
|
115
|
+
answerSummary: choiceTypeAnswerSummaryPropType
|
|
116
|
+
}.isRequired, _temp)) || _class);
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AnswerFrequencySummary as default } from "./presenter.js";
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
3
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
4
|
+
import React, { Component } from 'react';
|
|
5
|
+
import { PropTypes } from '@instructure/quiz-interactions';
|
|
6
|
+
import { ChoiceType } from "./ChoiceType/presenter.js";
|
|
7
|
+
import { answerSummaryPropType } from "../propTypes.js";
|
|
8
|
+
var afsTableComponentMap = new Map();
|
|
9
|
+
afsTableComponentMap.set('true-false', ChoiceType);
|
|
10
|
+
afsTableComponentMap.set('choice', ChoiceType);
|
|
11
|
+
afsTableComponentMap.set('multi-answer', ChoiceType);
|
|
12
|
+
export var AnswerFrequencySummary = /*#__PURE__*/function (_Component) {
|
|
13
|
+
_inherits(AnswerFrequencySummary, _Component);
|
|
14
|
+
|
|
15
|
+
var _super = _createSuper(AnswerFrequencySummary);
|
|
16
|
+
|
|
17
|
+
function AnswerFrequencySummary() {
|
|
18
|
+
var _this;
|
|
19
|
+
|
|
20
|
+
_classCallCheck(this, AnswerFrequencySummary);
|
|
21
|
+
|
|
22
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
|
+
args[_key] = arguments[_key];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
27
|
+
|
|
28
|
+
_this.render = function () {
|
|
29
|
+
var _this$props = _this.props,
|
|
30
|
+
itemId = _this$props.itemId,
|
|
31
|
+
answerSummary = _this$props.answerSummary,
|
|
32
|
+
interactionType = _this$props.interactionType;
|
|
33
|
+
var AfsTableComponent = afsTableComponentMap.get(interactionType);
|
|
34
|
+
|
|
35
|
+
if (!AfsTableComponent) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return /*#__PURE__*/React.createElement(AfsTableComponent, {
|
|
40
|
+
itemId: itemId,
|
|
41
|
+
answerSummary: answerSummary
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return _this;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return AnswerFrequencySummary;
|
|
49
|
+
}(Component);
|
|
50
|
+
AnswerFrequencySummary.propTypes = {
|
|
51
|
+
itemId: PropTypes.number,
|
|
52
|
+
answerSummary: answerSummaryPropType,
|
|
53
|
+
interactionType: PropTypes.string
|
|
54
|
+
}.isRequired;
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js
CHANGED
|
@@ -10,20 +10,20 @@ import { Heading } from '@instructure/ui-heading';
|
|
|
10
10
|
import { PresentationContent } from '@instructure/ui-a11y-content';
|
|
11
11
|
import React, { Component } from 'react';
|
|
12
12
|
var styles = {
|
|
13
|
-
componentId: '
|
|
13
|
+
componentId: 'ewlJT',
|
|
14
14
|
template: function template(theme) {
|
|
15
|
-
return "\n\n.
|
|
15
|
+
return "\n\n.ewlJT_eKXQ{padding:".concat(theme.cardWrapperPadding || 'inherit', "}\n\n.ewlJT_bwlc{gap:24px;justify-content:space-between;position:relative;row-gap:32px}\n\n.ewlJT_bwlc,.ewlJT_bqdH{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap}\n\n.ewlJT_bqdH{row-gap:24px}\n\n.ewlJT_NpIG{position:absolute;right:").concat(theme.viewPaddingRight || 'inherit', ";top:0}\n\n.ewlJT_eoBe{font-size:").concat(theme.metricNumberContextFontSize || 'inherit', ";font-weight:").concat(theme.metricNumberContextFontWeight || 'inherit', "}\n\n.ewlJT_fFDJ{display:none}\n\n.ewlJT_fxkJ{margin-top:-8px}\n\n.ewlJT_esVF{min-height:48px}\n\n.ewlJT_eTZq{position:relative}\n\n.ewlJT_eTZq:after{background:linear-gradient(180deg,hsla(0,0%,100%,0),#fff);content:\"\";height:48px;left:0;position:absolute;top:0;width:100%}\n\n.ewlJT_cVld{max-width:100%;width:calc(25% + 350px)}");
|
|
16
16
|
},
|
|
17
|
-
'cardWrapper': '
|
|
18
|
-
'itemCardInnerContainer': '
|
|
19
|
-
'metricsContainer': '
|
|
20
|
-
'itemCardToggleButtonWrapper': '
|
|
21
|
-
'metricNumberContext': '
|
|
22
|
-
'hiddenMetrics': '
|
|
23
|
-
'itemBodyToggleButtonWrapper': '
|
|
24
|
-
'itemBody': '
|
|
25
|
-
'hiddenItemBody': '
|
|
26
|
-
'
|
|
17
|
+
'cardWrapper': 'ewlJT_eKXQ',
|
|
18
|
+
'itemCardInnerContainer': 'ewlJT_bwlc',
|
|
19
|
+
'metricsContainer': 'ewlJT_bqdH',
|
|
20
|
+
'itemCardToggleButtonWrapper': 'ewlJT_NpIG',
|
|
21
|
+
'metricNumberContext': 'ewlJT_eoBe',
|
|
22
|
+
'hiddenMetrics': 'ewlJT_fFDJ',
|
|
23
|
+
'itemBodyToggleButtonWrapper': 'ewlJT_fxkJ',
|
|
24
|
+
'itemBody': 'ewlJT_esVF',
|
|
25
|
+
'hiddenItemBody': 'ewlJT_eTZq',
|
|
26
|
+
'answerFrequencySummaryContainer': 'ewlJT_cVld'
|
|
27
27
|
};
|
|
28
28
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
29
29
|
import ExpandButton from "../../../../../common/components/shared/ExpandButton/index.js";
|
|
@@ -36,13 +36,12 @@ import AnalysisMetric from "../AnalysisMetric/index.js";
|
|
|
36
36
|
import AnalysisPopoverMetric from "../AnalysisPopoverMetric/index.js";
|
|
37
37
|
import classnames from 'classnames';
|
|
38
38
|
import { interactionTypesNameDictionary } from "../../../../../common/util/interactionTypeMetadata.js";
|
|
39
|
-
import
|
|
39
|
+
import AnswerFrequencySummary from "../AnswerFrequencySummary/index.js";
|
|
40
40
|
import { itemAnalysisPropType } from "../propTypes.js";
|
|
41
41
|
import { Flex } from '@instructure/ui-flex';
|
|
42
42
|
import { RichContentRenderer, ensureMathIsReady, ensureMathRendered } from '@instructure/quiz-rce';
|
|
43
43
|
import { ensureImagesLoaded } from "../../../../../common/util/printUtils.js";
|
|
44
44
|
import { PropTypes } from '@instructure/quiz-interactions';
|
|
45
|
-
var supportedTables = ['choice', 'true-false', 'multi-answer'];
|
|
46
45
|
export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
47
46
|
_inherits(NewItemAnalysis, _Component);
|
|
48
47
|
|
|
@@ -194,19 +193,16 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
194
193
|
}))))));
|
|
195
194
|
};
|
|
196
195
|
|
|
197
|
-
_this.renderAnswerSummaryTable = function (itemId, answer_summary,
|
|
198
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
196
|
+
_this.renderAnswerSummaryTable = function (itemId, answer_summary, metricsClass, interactionType) {
|
|
197
|
+
return /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
199
198
|
className: metricsClass
|
|
200
199
|
}, /*#__PURE__*/React.createElement("div", {
|
|
201
|
-
className: styles.
|
|
202
|
-
},
|
|
203
|
-
direction: "row"
|
|
204
|
-
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
205
|
-
shouldGrow: true
|
|
206
|
-
}, /*#__PURE__*/React.createElement(AnswerSummaryTable, {
|
|
200
|
+
className: styles.answerFrequencySummaryContainer
|
|
201
|
+
}, /*#__PURE__*/React.createElement(AnswerFrequencySummary, {
|
|
207
202
|
itemId: itemId,
|
|
208
|
-
answerSummary: answer_summary
|
|
209
|
-
|
|
203
|
+
answerSummary: answer_summary,
|
|
204
|
+
interactionType: interactionType
|
|
205
|
+
}))));
|
|
210
206
|
};
|
|
211
207
|
|
|
212
208
|
return _this;
|
|
@@ -256,7 +252,7 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
256
252
|
metadata = itemAnalysis.metadata,
|
|
257
253
|
scores = itemAnalysis.scores;
|
|
258
254
|
var itemId = metadata.item_id;
|
|
259
|
-
var
|
|
255
|
+
var interactionType = metadata.interaction_type;
|
|
260
256
|
var metricsClass = classnames(_defineProperty({}, styles.hiddenMetrics, !this.state.metricsExpanded));
|
|
261
257
|
var itemBodyClass = classnames(styles.itemBody, _defineProperty({}, styles.hiddenItemBody, this.isBodyHigherThanContainer() && !this.state.bodyExpanded));
|
|
262
258
|
var title = (_metadata$item_title = metadata.item_title) !== null && _metadata$item_title !== void 0 ? _metadata$item_title : t('Untitled item');
|
|
@@ -280,7 +276,7 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
280
276
|
padding: "small xx-small none none",
|
|
281
277
|
overflowY: "hidden",
|
|
282
278
|
size: !this.state.bodyExpanded ? '60px' : void 0
|
|
283
|
-
}, this.renderRichContent(metadata.item_body, itemBodyClass, itemId)))), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderMetrics(scores, metricsClass)))), showFrequencyTable &&
|
|
279
|
+
}, this.renderRichContent(metadata.item_body, itemBodyClass, itemId)))), /*#__PURE__*/React.createElement(Flex.Item, null, this.renderMetrics(scores, metricsClass)))), showFrequencyTable && this.renderAnswerSummaryTable(itemId, answer_summary, metricsClass, interactionType)));
|
|
284
280
|
}
|
|
285
281
|
}]);
|
|
286
282
|
|
|
@@ -157,8 +157,9 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
|
|
|
157
157
|
var _this$props3 = this.props,
|
|
158
158
|
fetchInProgress = _this$props3.fetchInProgress,
|
|
159
159
|
name = _this$props3.name,
|
|
160
|
-
quizAnalysis = _this$props3.quizAnalysis
|
|
161
|
-
|
|
160
|
+
quizAnalysis = _this$props3.quizAnalysis,
|
|
161
|
+
analysisError = _this$props3.analysisError;
|
|
162
|
+
var reportCardStyles = classnames(styles.reportCard, _defineProperty({}, styles.emptyReportCard, !quizAnalysis && !analysisError));
|
|
162
163
|
return /*#__PURE__*/React.createElement(Card, {
|
|
163
164
|
className: reportCardStyles
|
|
164
165
|
}, /*#__PURE__*/React.createElement("div", {
|