@instructure/quiz-core 20.30.1-snapshot.1 → 20.30.1-snapshot.3
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/Banks/presenter.js +1 -1
- package/es/banks/components/NavWrapper/presenter.js +1 -1
- package/es/banks/components/SharingModal/ShareList/ShareList.examples.js +10 -10
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +1 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/styles.js +1 -2
- package/es/common/components/ImportModal/index.js +3 -3
- package/es/common/components/PrintFontSizeModal/presenter.js +1 -1
- package/es/common/components/RceConfigProvider/presenter.js +1 -0
- package/es/common/components/RceConfigProvider/rceConfigFetcher.js +1 -1
- package/es/common/components/layout/sidebar/Sidebar/Sidebar.examples.js +2 -2
- package/es/common/components/shared/overlay/index.js +1 -1
- package/es/common/kinesis/client.js +2 -2
- package/es/common/records/QuizSession.js +1 -0
- package/es/common/util/componentForItem.js +1 -1
- package/es/common/util/interactionTypeRecordForItem.js +1 -1
- package/es/index.js +6 -6
- package/es/moderating/components/resources/AccommodationsModal/index.js +21 -2
- package/es/moderating/components/resources/OutstandingQuizzesModal/OutstandingQuizzesModal.examples.js +40 -40
- package/es/moderating/components/sidebar/ModerateTray/presenter.js +95 -22
- package/es/reporting/api/getAnalysesExport.js +1 -1
- package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +2 -2
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +3 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/popoverContent.js +3 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +1 -1
- package/lib/banks/components/Banks/presenter.js +1 -1
- package/lib/banks/components/NavWrapper/presenter.js +1 -1
- package/lib/banks/components/SharingModal/ShareList/ShareList.examples.js +10 -10
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +1 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/styles.js +1 -2
- package/lib/common/components/ImportModal/index.js +3 -3
- package/lib/common/components/PrintFontSizeModal/presenter.js +1 -1
- package/lib/common/components/RceConfigProvider/presenter.js +1 -0
- package/lib/common/components/RceConfigProvider/rceConfigFetcher.js +1 -1
- package/lib/common/components/layout/sidebar/Sidebar/Sidebar.examples.js +2 -2
- package/lib/common/components/shared/overlay/index.js +1 -1
- package/lib/common/kinesis/client.js +2 -2
- package/lib/common/records/QuizSession.js +1 -0
- package/lib/common/util/componentForItem.js +1 -1
- package/lib/common/util/interactionTypeRecordForItem.js +1 -1
- package/lib/moderating/components/resources/AccommodationsModal/index.js +21 -2
- package/lib/moderating/components/resources/OutstandingQuizzesModal/OutstandingQuizzesModal.examples.js +40 -40
- package/lib/moderating/components/sidebar/ModerateTray/presenter.js +95 -22
- package/lib/reporting/api/getAnalysesExport.js +1 -1
- package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +2 -2
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/styles.js +3 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/popoverContent.js +3 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -1
- package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +1 -1
- package/package.json +9 -9
|
@@ -13,7 +13,7 @@ var generateStyle = function generateStyle(componentTheme, props) {
|
|
|
13
13
|
},
|
|
14
14
|
tableWidthMax: {},
|
|
15
15
|
tableContainer: _objectSpread(_objectSpread({}, tableContainerStyles), {}, {
|
|
16
|
-
|
|
16
|
+
table: {
|
|
17
17
|
borderCollapse: 'separate',
|
|
18
18
|
borderSpacing: '0 1px'
|
|
19
19
|
},
|
|
@@ -43,7 +43,7 @@ var generateStyle = function generateStyle(componentTheme, props) {
|
|
|
43
43
|
},
|
|
44
44
|
iconCorrect: {
|
|
45
45
|
backgroundColor: componentTheme.colorGreen,
|
|
46
|
-
|
|
46
|
+
svg: {
|
|
47
47
|
fill: 'white'
|
|
48
48
|
}
|
|
49
49
|
},
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/popoverContent.js
CHANGED
|
@@ -5,7 +5,7 @@ export var standardDeviation = {
|
|
|
5
5
|
screenReaderLabel: t('Standard deviation tooltip')
|
|
6
6
|
};
|
|
7
7
|
export var cronbachsAlpha = {
|
|
8
|
-
title: t(
|
|
9
|
-
body: t(
|
|
10
|
-
screenReaderLabel: t(
|
|
8
|
+
title: t("Cronbach's Alpha"),
|
|
9
|
+
body: t("Cronbach's alpha is an internal consistency measure that estimates the reliability of a quiz. Values range from 0 to 1, with higher values indicating greater reliability."),
|
|
10
|
+
screenReaderLabel: t("Cronbach's alpha tooltip")
|
|
11
11
|
};
|
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -52,7 +52,7 @@ export var NewQuizAnalysis = (_dec = withStyle(generateStyle, generateComponentT
|
|
|
52
52
|
}), jsx(AnalysisPopoverMetric, {
|
|
53
53
|
metricKey: "cronbachs_alpha",
|
|
54
54
|
value: scores === null || scores === void 0 ? void 0 : scores.cronbachs_alpha,
|
|
55
|
-
label: t(
|
|
55
|
+
label: t("Cronbach's Alpha"),
|
|
56
56
|
popoverDescription: cronbachsAlpha
|
|
57
57
|
})));
|
|
58
58
|
};
|
|
@@ -162,7 +162,7 @@ export var QuizAndItemAnalysis = (_dec = withStyle(generateStyle, generateCompon
|
|
|
162
162
|
case 'cronbachsAlpha':
|
|
163
163
|
metrics.push(jsx(MetricsListItem, {
|
|
164
164
|
key: "cronbachsAlpha",
|
|
165
|
-
renderLabel: t(
|
|
165
|
+
renderLabel: t("Cronbach's Alpha"),
|
|
166
166
|
renderValue: quizAnalysis.cronbachsAlpha(),
|
|
167
167
|
customStyles: _this2.props.styles.metric,
|
|
168
168
|
isGroupChild: true
|
|
@@ -210,7 +210,7 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
210
210
|
hero: _ref4
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
-
return (0, _formatMessage.default)(
|
|
213
|
+
return (0, _formatMessage.default)("You don't have any banks yet");
|
|
214
214
|
};
|
|
215
215
|
_this.state = {
|
|
216
216
|
searchTerms: _this.props.searchTerms || ''
|
|
@@ -114,7 +114,7 @@ var NavWrapper = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
114
114
|
return (0, _emotion.jsx)(_uiView.View, null, (0, _emotion.jsx)(_emotion.Global, {
|
|
115
115
|
styles: {
|
|
116
116
|
'body.tox-fullscreen .nav': {
|
|
117
|
-
|
|
117
|
+
display: 'none'
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}), (0, _emotion.jsx)("div", {
|
|
@@ -8,17 +8,17 @@ var _immutable = require("immutable");
|
|
|
8
8
|
var _default = {
|
|
9
9
|
propValues: {
|
|
10
10
|
shares: [(0, _immutable.fromJS)([{
|
|
11
|
-
title:
|
|
12
|
-
entity_type:
|
|
13
|
-
entity_id:
|
|
14
|
-
permission:
|
|
15
|
-
id:
|
|
11
|
+
title: 'Test Person',
|
|
12
|
+
entity_type: 'user',
|
|
13
|
+
entity_id: 'banana',
|
|
14
|
+
permission: 'edit',
|
|
15
|
+
id: '5'
|
|
16
16
|
}]), (0, _immutable.fromJS)([{
|
|
17
|
-
title:
|
|
18
|
-
entity_type:
|
|
19
|
-
entity_id:
|
|
20
|
-
permission:
|
|
21
|
-
id:
|
|
17
|
+
title: 'Course X',
|
|
18
|
+
entity_type: 'course',
|
|
19
|
+
entity_id: 'X',
|
|
20
|
+
permission: 'read',
|
|
21
|
+
id: '7'
|
|
22
22
|
}])],
|
|
23
23
|
onPermissionChange: [Function.prototype],
|
|
24
24
|
onPersonRemove: [Function.prototype],
|
|
@@ -22,8 +22,7 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
22
22
|
marginLeft: componentTheme.feedbackSectionLeftMarg
|
|
23
23
|
}),
|
|
24
24
|
pointsInput: {
|
|
25
|
-
width: '6.1rem'
|
|
26
|
-
/* wide enough to fit 3 decimal places (i.e. 8.888) */
|
|
25
|
+
width: '6.1rem' /* wide enough to fit 3 decimal places (i.e. 8.888) */,
|
|
27
26
|
fontSize: componentTheme.pointsInputFontSize,
|
|
28
27
|
display: 'inline-flex'
|
|
29
28
|
}
|
|
@@ -15,8 +15,7 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
15
15
|
quizEntryEdit: {
|
|
16
16
|
fontSize: componentTheme.quizEntryEditFontSize,
|
|
17
17
|
position: 'relative',
|
|
18
|
-
transform: 'translate3d(0, 0, 0)'
|
|
19
|
-
/* for drag and drop preview to work */
|
|
18
|
+
transform: 'translate3d(0, 0, 0)' /* for drag and drop preview to work */,
|
|
20
19
|
margin: "".concat(componentTheme.quizEntryEditMargin, " 0"),
|
|
21
20
|
zIndex: '3333'
|
|
22
21
|
}
|
|
@@ -26,11 +26,11 @@ function progressValue(progressNumber) {
|
|
|
26
26
|
var callsToCheck = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
27
27
|
var callProgressWhenCompleted = 1;
|
|
28
28
|
// We are using 50 because 50 == (100 / 2.0) and import and API calls each contribute 1/2 of the overall progress
|
|
29
|
-
return progressNumber
|
|
29
|
+
return progressNumber ?
|
|
30
30
|
// If importing, then the calls are completed and we skip the calculation
|
|
31
|
-
|
|
31
|
+
(callProgressWhenCompleted + progressNumber) * 50 :
|
|
32
32
|
// If no progressNumber, then the callProgress counts is working on the first 50%
|
|
33
|
-
|
|
33
|
+
callProgress(callsToCheck, callsMade) * 50;
|
|
34
34
|
}
|
|
35
35
|
var generateImportModalId = function generateImportModalId(id) {
|
|
36
36
|
return "".concat(id, "_").concat(_quizCommon.IMPORT_MODAL);
|
|
@@ -121,7 +121,7 @@ var PrintFontSizeModal = (_dec = (0, _emotion.withStyle)(_styles.default, _theme
|
|
|
121
121
|
description: (0, _formatMessage.default)('Text size'),
|
|
122
122
|
"data-automation": "print-font-size-modal-radio-group"
|
|
123
123
|
}, this.sizes.map(function (size) {
|
|
124
|
-
var label = (0, _emotion.jsx)("div", null, (0, _emotion.jsx)("span", null, size.label),
|
|
124
|
+
var label = (0, _emotion.jsx)("div", null, (0, _emotion.jsx)("span", null, size.label), ' ', (0, _emotion.jsx)("p", {
|
|
125
125
|
"aria-hidden": "true",
|
|
126
126
|
style: {
|
|
127
127
|
fontSize: "".concat(size.size, "rem"),
|
|
@@ -111,6 +111,7 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(_ref2) {
|
|
|
111
111
|
displayOldLinks: displayOldLinks
|
|
112
112
|
};
|
|
113
113
|
(0, _react.useEffect)(function () {
|
|
114
|
+
;
|
|
114
115
|
(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
115
116
|
var json;
|
|
116
117
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
@@ -58,7 +58,7 @@ var Overlay = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
58
58
|
return (0, _emotion.jsx)(_react.default.Fragment, null, (0, _emotion.jsx)(_emotion.Global, {
|
|
59
59
|
styles: {
|
|
60
60
|
'body.tox-fullscreen .overlay': {
|
|
61
|
-
|
|
61
|
+
zIndex: '0'
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}), (0, _emotion.jsx)("div", {
|
|
@@ -29,8 +29,8 @@ var buildKinesisClient = function buildKinesisClient(configuration, credentials)
|
|
|
29
29
|
};
|
|
30
30
|
exports.buildKinesisClient = buildKinesisClient;
|
|
31
31
|
var buildCredentials = function buildCredentials(credentialParams) {
|
|
32
|
-
var creds = new _global.Credentials(credentialParams.access_key_id, credentialParams.secret_access_key, credentialParams.session_token // credentialParams
|
|
33
|
-
|
|
32
|
+
var creds = new _global.Credentials(credentialParams.access_key_id, credentialParams.secret_access_key, credentialParams.session_token) // credentialParams
|
|
33
|
+
;
|
|
34
34
|
creds.expireTime = Date.parse(credentialParams.expiration);
|
|
35
35
|
return creds;
|
|
36
36
|
};
|
|
@@ -148,6 +148,7 @@ var QuizSession = /*#__PURE__*/function (_ReduxRecord) {
|
|
|
148
148
|
// Still accurate?
|
|
149
149
|
var email, fullName, givenName;
|
|
150
150
|
if (this.user) {
|
|
151
|
+
;
|
|
151
152
|
var _this$user$toJS = this.user.toJS();
|
|
152
153
|
email = _this$user$toJS.email;
|
|
153
154
|
fullName = _this$user$toJS.fullName;
|
|
@@ -10,7 +10,7 @@ var _require = require('humps'),
|
|
|
10
10
|
pascalize = _require.pascalize;
|
|
11
11
|
var slugToNameMap = {
|
|
12
12
|
'multi-answer': 'MultipleAnswer',
|
|
13
|
-
|
|
13
|
+
choice: 'MultipleChoice'
|
|
14
14
|
};
|
|
15
15
|
var componentForItem = function componentForItem(intTypeSlug, usage) {
|
|
16
16
|
var componentKey = slugToNameMap[intTypeSlug];
|
|
@@ -10,7 +10,7 @@ var _require = require('humps'),
|
|
|
10
10
|
pascalize = _require.pascalize;
|
|
11
11
|
var slugToNameMap = {
|
|
12
12
|
'multi-answer': 'MultipleAnswer',
|
|
13
|
-
|
|
13
|
+
choice: 'MultipleChoice'
|
|
14
14
|
};
|
|
15
15
|
var interactionTypeRecordForItem = function interactionTypeRecordForItem(intTypeSlug) {
|
|
16
16
|
if (!intTypeSlug) {
|
|
@@ -12,6 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
var _uiText = require("@instructure/ui-text");
|
|
15
16
|
var _uiTooltip = require("@instructure/ui-tooltip");
|
|
16
17
|
var _uiModal = require("@instructure/ui-modal");
|
|
17
18
|
var _uiTruncateText = require("@instructure/ui-truncate-text");
|
|
@@ -20,6 +21,8 @@ var _uiView = require("@instructure/ui-view");
|
|
|
20
21
|
var _uiButtons = require("@instructure/ui-buttons");
|
|
21
22
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
22
23
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
24
|
+
var _featureCheck = require("../../../../common/util/featureCheck.js");
|
|
25
|
+
var _index = require("../../../../common/components/shared/IfFeature/index.js");
|
|
23
26
|
var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
24
27
|
(0, _inherits2.default)(AccommodationModal, _Component);
|
|
25
28
|
var _super = (0, _createSuper2.default)(AccommodationModal);
|
|
@@ -62,6 +65,9 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
62
65
|
}, _this.props.studentName));
|
|
63
66
|
};
|
|
64
67
|
_this.renderHeading = function () {
|
|
68
|
+
if ((0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, null, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Student Accommodation')), (0, _formatMessage.default)('Student Accommodation'));
|
|
70
|
+
}
|
|
65
71
|
var _this$props = _this.props,
|
|
66
72
|
mountNode = _this$props.mountNode,
|
|
67
73
|
studentName = _this$props.studentName;
|
|
@@ -84,6 +90,14 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
84
90
|
return _this;
|
|
85
91
|
}
|
|
86
92
|
(0, _createClass2.default)(AccommodationModal, [{
|
|
93
|
+
key: "labelText",
|
|
94
|
+
value: function labelText() {
|
|
95
|
+
if ((0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
96
|
+
return (0, _formatMessage.default)('Student Accommodation');
|
|
97
|
+
}
|
|
98
|
+
return this.props.studentName || (0, _formatMessage.default)('Accommodations Modal');
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
87
101
|
key: "render",
|
|
88
102
|
value: function render() {
|
|
89
103
|
var _this$props2 = this.props,
|
|
@@ -94,7 +108,7 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
94
108
|
children = _this$props2.children;
|
|
95
109
|
return /*#__PURE__*/_react.default.createElement(_uiModal.Modal, {
|
|
96
110
|
open: open,
|
|
97
|
-
label:
|
|
111
|
+
label: this.labelText(),
|
|
98
112
|
mountNode: mountNode,
|
|
99
113
|
size: "small",
|
|
100
114
|
onExited: this.handleAccommodationsModalExited
|
|
@@ -103,7 +117,12 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
103
117
|
placement: "end",
|
|
104
118
|
offset: "medium",
|
|
105
119
|
screenReaderLabel: (0, _formatMessage.default)('Close')
|
|
106
|
-
}), this.renderHeading()), /*#__PURE__*/_react.default.createElement(_uiModal.Modal.Body, null,
|
|
120
|
+
}), this.renderHeading()), /*#__PURE__*/_react.default.createElement(_uiModal.Modal.Body, null, /*#__PURE__*/_react.default.createElement(_index.IfFeature, {
|
|
121
|
+
name: "atteq_apply_changes_to_current_quiz_attempts"
|
|
122
|
+
}, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
123
|
+
weight: "bold",
|
|
124
|
+
as: "h2"
|
|
125
|
+
}, studentName)), children), /*#__PURE__*/_react.default.createElement(_uiModal.Modal.Footer, null, /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
107
126
|
onClick: this.cancelAction,
|
|
108
127
|
margin: "xxx-small",
|
|
109
128
|
"data-automation": "sdk-moderation-cancel"
|
|
@@ -7,66 +7,66 @@ exports.default = void 0;
|
|
|
7
7
|
var _default = {
|
|
8
8
|
propValues: {
|
|
9
9
|
quizSessionIdsAndUsers: [[{
|
|
10
|
-
id:
|
|
11
|
-
name:
|
|
10
|
+
id: '12',
|
|
11
|
+
name: 'Student A'
|
|
12
12
|
}, {
|
|
13
|
-
id:
|
|
14
|
-
name:
|
|
13
|
+
id: '15',
|
|
14
|
+
name: 'Student B'
|
|
15
15
|
}, {
|
|
16
|
-
id:
|
|
17
|
-
name:
|
|
16
|
+
id: '16',
|
|
17
|
+
name: 'Student C'
|
|
18
18
|
}, {
|
|
19
|
-
id:
|
|
20
|
-
name:
|
|
19
|
+
id: '18',
|
|
20
|
+
name: 'Student D'
|
|
21
21
|
}, {
|
|
22
|
-
id:
|
|
23
|
-
name:
|
|
22
|
+
id: '19',
|
|
23
|
+
name: 'Student E'
|
|
24
24
|
}, {
|
|
25
|
-
id:
|
|
26
|
-
name:
|
|
25
|
+
id: '21',
|
|
26
|
+
name: 'Student F'
|
|
27
27
|
}, {
|
|
28
|
-
id:
|
|
29
|
-
name:
|
|
28
|
+
id: '22',
|
|
29
|
+
name: 'Student G'
|
|
30
30
|
}, {
|
|
31
|
-
id:
|
|
32
|
-
name:
|
|
31
|
+
id: '26',
|
|
32
|
+
name: 'Student H'
|
|
33
33
|
}, {
|
|
34
|
-
id:
|
|
35
|
-
name:
|
|
34
|
+
id: '39',
|
|
35
|
+
name: 'Student K'
|
|
36
36
|
}], [{
|
|
37
|
-
id:
|
|
38
|
-
name:
|
|
37
|
+
id: '12',
|
|
38
|
+
name: 'Student A'
|
|
39
39
|
}]],
|
|
40
40
|
quizSessionsData: [[{
|
|
41
|
-
id:
|
|
42
|
-
status:
|
|
41
|
+
id: '12',
|
|
42
|
+
status: 'in_progress'
|
|
43
43
|
}, {
|
|
44
|
-
id:
|
|
45
|
-
status:
|
|
44
|
+
id: '15',
|
|
45
|
+
status: 'in_progress'
|
|
46
46
|
}, {
|
|
47
|
-
id:
|
|
48
|
-
status:
|
|
47
|
+
id: '16',
|
|
48
|
+
status: 'in_progress'
|
|
49
49
|
}, {
|
|
50
|
-
id:
|
|
51
|
-
status:
|
|
50
|
+
id: '18',
|
|
51
|
+
status: 'in_progress'
|
|
52
52
|
}, {
|
|
53
|
-
id:
|
|
54
|
-
status:
|
|
53
|
+
id: '19',
|
|
54
|
+
status: 'in_progress'
|
|
55
55
|
}, {
|
|
56
|
-
id:
|
|
57
|
-
status:
|
|
56
|
+
id: '21',
|
|
57
|
+
status: 'in_progress'
|
|
58
58
|
}, {
|
|
59
|
-
id:
|
|
60
|
-
status:
|
|
59
|
+
id: '22',
|
|
60
|
+
status: 'in_progress'
|
|
61
61
|
}, {
|
|
62
|
-
id:
|
|
63
|
-
status:
|
|
62
|
+
id: '26',
|
|
63
|
+
status: 'in_progress'
|
|
64
64
|
}, {
|
|
65
|
-
id:
|
|
66
|
-
status:
|
|
65
|
+
id: '39',
|
|
66
|
+
status: 'in_progress'
|
|
67
67
|
}], [{
|
|
68
|
-
id:
|
|
69
|
-
name:
|
|
68
|
+
id: '12',
|
|
69
|
+
name: 'Student A'
|
|
70
70
|
}]]
|
|
71
71
|
},
|
|
72
72
|
getComponentProps: function getComponentProps(props) {
|
|
@@ -15,6 +15,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
16
16
|
var _uiFlex = require("@instructure/ui-flex");
|
|
17
17
|
var _uiView = require("@instructure/ui-view");
|
|
18
|
+
var _uiText = require("@instructure/ui-text");
|
|
18
19
|
var _uiTooltip = require("@instructure/ui-tooltip");
|
|
19
20
|
var _uiTray = require("@instructure/ui-tray");
|
|
20
21
|
var _uiButtons = require("@instructure/ui-buttons");
|
|
@@ -34,12 +35,20 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
34
35
|
}
|
|
35
36
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
36
37
|
_this.state = {
|
|
37
|
-
|
|
38
|
+
titleIsTruncated: false,
|
|
39
|
+
participantNameIsTruncated: false
|
|
38
40
|
};
|
|
39
|
-
_this.
|
|
40
|
-
if (_this.state.
|
|
41
|
+
_this.handleTitleUpdate = function (titleIsTruncated) {
|
|
42
|
+
if (_this.state.titleIsTruncated !== titleIsTruncated) {
|
|
41
43
|
_this.setState({
|
|
42
|
-
|
|
44
|
+
titleIsTruncated: titleIsTruncated
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
_this.handleParticipantNameUpdate = function (participantNameIsTruncated) {
|
|
49
|
+
if (_this.state.participantNameIsTruncated !== participantNameIsTruncated) {
|
|
50
|
+
_this.setState({
|
|
51
|
+
participantNameIsTruncated: participantNameIsTruncated
|
|
43
52
|
});
|
|
44
53
|
}
|
|
45
54
|
};
|
|
@@ -48,7 +57,8 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
48
57
|
};
|
|
49
58
|
_this.handleTrayExited = function () {
|
|
50
59
|
_this.setState({
|
|
51
|
-
|
|
60
|
+
titleIsTruncated: false,
|
|
61
|
+
participantNameIsTruncated: false
|
|
52
62
|
});
|
|
53
63
|
};
|
|
54
64
|
_this.setCloseRef = function (el) {
|
|
@@ -65,19 +75,16 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
65
75
|
_this.props.closeTray();
|
|
66
76
|
};
|
|
67
77
|
_this.renderTitleAndCloseButton = function () {
|
|
68
|
-
return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex,
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
79
|
+
justifyItems: "space-between"
|
|
80
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
69
81
|
shouldGrow: true,
|
|
70
82
|
shouldShrink: true
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
var focused = _ref.focused;
|
|
77
|
-
return _this.renderName({
|
|
78
|
-
focused: focused
|
|
79
|
-
});
|
|
80
|
-
}) : _this.renderName()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_uiButtons.CloseButton, {
|
|
83
|
+
}, (0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts') ? /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
84
|
+
as: "h2",
|
|
85
|
+
size: "large",
|
|
86
|
+
weight: "bold"
|
|
87
|
+
}, (0, _formatMessage.default)('In Progress Accommodation')) : _this.renderHeading()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_uiButtons.CloseButton, {
|
|
81
88
|
onClick: _this.props.closeTray,
|
|
82
89
|
elementRef: _this.setCloseRef,
|
|
83
90
|
screenReaderLabel: (0, _formatMessage.default)('Close')
|
|
@@ -106,9 +113,25 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
106
113
|
return _this;
|
|
107
114
|
}
|
|
108
115
|
(0, _createClass2.default)(ModerateTray, [{
|
|
109
|
-
key: "
|
|
110
|
-
value: function
|
|
111
|
-
var
|
|
116
|
+
key: "renderHeading",
|
|
117
|
+
value: function renderHeading() {
|
|
118
|
+
var _this2 = this;
|
|
119
|
+
return this.state.titleIsTruncated ? /*#__PURE__*/_react.default.createElement(_uiTooltip.Tooltip, {
|
|
120
|
+
placement: "start",
|
|
121
|
+
renderTip: this.labelText(),
|
|
122
|
+
mountNode: this.getTrayRef || null
|
|
123
|
+
}, function (_ref) {
|
|
124
|
+
var focused = _ref.focused;
|
|
125
|
+
return _this2.renderHeadingName({
|
|
126
|
+
focused: focused
|
|
127
|
+
});
|
|
128
|
+
}) : this.renderHeadingName();
|
|
129
|
+
}
|
|
130
|
+
}, {
|
|
131
|
+
key: "renderHeadingName",
|
|
132
|
+
value: function renderHeadingName() {
|
|
133
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
134
|
+
focused = _ref2.focused;
|
|
112
135
|
return (
|
|
113
136
|
/*#__PURE__*/
|
|
114
137
|
// When using TruncateText inside a Tooltip, a focusable wrapper element is required
|
|
@@ -117,20 +140,69 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
117
140
|
display: "block",
|
|
118
141
|
borderRadius: "small",
|
|
119
142
|
position: "relative",
|
|
120
|
-
withFocusOutline: this.state.
|
|
143
|
+
withFocusOutline: this.state.titleIsTruncated && focused,
|
|
121
144
|
as: "h2",
|
|
122
145
|
tabIndex: this.state.isTruncated ? 0 : null
|
|
123
146
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, this.labelText()), /*#__PURE__*/_react.default.createElement(_uiTruncateText.TruncateText, {
|
|
124
147
|
"aria-hidden": "true",
|
|
125
148
|
maxLines: 2,
|
|
126
149
|
truncate: "character",
|
|
127
|
-
onUpdate: this.
|
|
150
|
+
onUpdate: this.handleTitleUpdate
|
|
128
151
|
}, this.labelText()))
|
|
129
152
|
);
|
|
130
153
|
}
|
|
154
|
+
}, {
|
|
155
|
+
key: "renderName",
|
|
156
|
+
value: function renderName(renderProps) {
|
|
157
|
+
if (!(0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
var focused = renderProps && renderProps.focused;
|
|
161
|
+
return (
|
|
162
|
+
/*#__PURE__*/
|
|
163
|
+
// When using TruncateText inside a Tooltip, a focusable wrapper element is required
|
|
164
|
+
// tabIndex={0} makes the div focusable and allows KO users to access the tooltip
|
|
165
|
+
_react.default.createElement(_uiView.View, {
|
|
166
|
+
display: "block",
|
|
167
|
+
borderRadius: "small",
|
|
168
|
+
position: "relative",
|
|
169
|
+
withFocusOutline: this.state.participantNameIsTruncated && focused,
|
|
170
|
+
tabIndex: this.state.participantNameIsTruncated ? 0 : null,
|
|
171
|
+
margin: "small 0"
|
|
172
|
+
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, this.props.participantName), /*#__PURE__*/_react.default.createElement(_uiTruncateText.TruncateText, {
|
|
173
|
+
"aria-hidden": "true",
|
|
174
|
+
maxLines: 2,
|
|
175
|
+
truncate: "character",
|
|
176
|
+
onUpdate: this.handleParticipantNameUpdate
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
178
|
+
weight: "bold"
|
|
179
|
+
}, this.props.participantName)))
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
}, {
|
|
183
|
+
key: "renderNameWithTooltip",
|
|
184
|
+
value: function renderNameWithTooltip() {
|
|
185
|
+
var _this3 = this;
|
|
186
|
+
if (!(0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
return this.state.titleIsTruncated ? /*#__PURE__*/_react.default.createElement(_uiTooltip.Tooltip, {
|
|
190
|
+
placement: "start",
|
|
191
|
+
renderTip: this.props.participantName,
|
|
192
|
+
mountNode: this.getTrayRef || null
|
|
193
|
+
}, function (_ref3) {
|
|
194
|
+
var focused = _ref3.focused;
|
|
195
|
+
return _this3.renderName({
|
|
196
|
+
focused: focused
|
|
197
|
+
});
|
|
198
|
+
}) : this.renderName();
|
|
199
|
+
}
|
|
131
200
|
}, {
|
|
132
201
|
key: "labelText",
|
|
133
202
|
value: function labelText() {
|
|
203
|
+
if ((0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
204
|
+
return (0, _formatMessage.default)('In Progress Accommodation');
|
|
205
|
+
}
|
|
134
206
|
if (this.props.participantName) {
|
|
135
207
|
return this.props.participantName;
|
|
136
208
|
}
|
|
@@ -147,6 +219,7 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
147
219
|
onExited: this.handleTrayExited,
|
|
148
220
|
open: this.props.isOpen,
|
|
149
221
|
placement: "end",
|
|
222
|
+
size: (0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts') ? 'regular' : void 0,
|
|
150
223
|
shouldCloseOnDocumentClick: true,
|
|
151
224
|
ref: this.setTrayRef
|
|
152
225
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
@@ -158,7 +231,7 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
158
231
|
}, this.renderTitleAndCloseButton()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
159
232
|
shouldGrow: true,
|
|
160
233
|
padding: "0 medium"
|
|
161
|
-
}, this.renderChildren()), (0, _featureCheck.featureOn)('add_time_to_existing_quiz_sessions') && /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderFooter())));
|
|
234
|
+
}, this.renderNameWithTooltip(), this.renderChildren()), (0, _featureCheck.featureOn)('add_time_to_existing_quiz_sessions') && /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderFooter())));
|
|
162
235
|
}
|
|
163
236
|
}]);
|
|
164
237
|
ModerateTray.displayName = "ModerateTray";
|
|
@@ -28,8 +28,8 @@ var generateStyle = function generateStyle(componentTheme, props) {
|
|
|
28
28
|
animationName: contentAnimation,
|
|
29
29
|
animationFillMode: 'forwards',
|
|
30
30
|
animationDuration: '0.3s',
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
th: contentCellStyles,
|
|
32
|
+
td: contentCellStyles
|
|
33
33
|
},
|
|
34
34
|
bar: {
|
|
35
35
|
background: componentTheme.barBackgroundColor,
|
|
@@ -92,7 +92,7 @@ var QuizAnalysisOverview = (_dec = (0, _emotion.withStyle)(_styles.default, _the
|
|
|
92
92
|
isGroupChild: true
|
|
93
93
|
}), (0, _emotion.jsx)(_index4.default, {
|
|
94
94
|
key: "cronbachsAlpha",
|
|
95
|
-
renderLabel: (0, _formatMessage.default)(
|
|
95
|
+
renderLabel: (0, _formatMessage.default)("Cronbach's Alpha"),
|
|
96
96
|
renderValue: quizAnalysis.cronbachsAlpha(),
|
|
97
97
|
customStyles: this.props.styles.metric,
|
|
98
98
|
isGroupChild: true
|