@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
|
@@ -202,7 +202,7 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
202
202
|
hero: _ref4
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
return t(
|
|
205
|
+
return t("You don't have any banks yet");
|
|
206
206
|
};
|
|
207
207
|
_this.state = {
|
|
208
208
|
searchTerms: _this.props.searchTerms || ''
|
|
@@ -2,17 +2,17 @@ import { fromJS } from 'immutable';
|
|
|
2
2
|
export default {
|
|
3
3
|
propValues: {
|
|
4
4
|
shares: [fromJS([{
|
|
5
|
-
title:
|
|
6
|
-
entity_type:
|
|
7
|
-
entity_id:
|
|
8
|
-
permission:
|
|
9
|
-
id:
|
|
5
|
+
title: 'Test Person',
|
|
6
|
+
entity_type: 'user',
|
|
7
|
+
entity_id: 'banana',
|
|
8
|
+
permission: 'edit',
|
|
9
|
+
id: '5'
|
|
10
10
|
}]), fromJS([{
|
|
11
|
-
title:
|
|
12
|
-
entity_type:
|
|
13
|
-
entity_id:
|
|
14
|
-
permission:
|
|
15
|
-
id:
|
|
11
|
+
title: 'Course X',
|
|
12
|
+
entity_type: 'course',
|
|
13
|
+
entity_id: 'X',
|
|
14
|
+
permission: 'read',
|
|
15
|
+
id: '7'
|
|
16
16
|
}])],
|
|
17
17
|
onPermissionChange: [Function.prototype],
|
|
18
18
|
onPersonRemove: [Function.prototype],
|
|
@@ -15,8 +15,7 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
15
15
|
marginLeft: componentTheme.feedbackSectionLeftMarg
|
|
16
16
|
}),
|
|
17
17
|
pointsInput: {
|
|
18
|
-
width: '6.1rem'
|
|
19
|
-
/* wide enough to fit 3 decimal places (i.e. 8.888) */
|
|
18
|
+
width: '6.1rem' /* wide enough to fit 3 decimal places (i.e. 8.888) */,
|
|
20
19
|
fontSize: componentTheme.pointsInputFontSize,
|
|
21
20
|
display: 'inline-flex'
|
|
22
21
|
}
|
|
@@ -9,8 +9,7 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
9
9
|
quizEntryEdit: {
|
|
10
10
|
fontSize: componentTheme.quizEntryEditFontSize,
|
|
11
11
|
position: 'relative',
|
|
12
|
-
transform: 'translate3d(0, 0, 0)'
|
|
13
|
-
/* for drag and drop preview to work */
|
|
12
|
+
transform: 'translate3d(0, 0, 0)' /* for drag and drop preview to work */,
|
|
14
13
|
margin: "".concat(componentTheme.quizEntryEditMargin, " 0"),
|
|
15
14
|
zIndex: '3333'
|
|
16
15
|
}
|
|
@@ -18,11 +18,11 @@ export function progressValue(progressNumber) {
|
|
|
18
18
|
var callsToCheck = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
19
19
|
var callProgressWhenCompleted = 1;
|
|
20
20
|
// We are using 50 because 50 == (100 / 2.0) and import and API calls each contribute 1/2 of the overall progress
|
|
21
|
-
return progressNumber
|
|
21
|
+
return progressNumber ?
|
|
22
22
|
// If importing, then the calls are completed and we skip the calculation
|
|
23
|
-
|
|
23
|
+
(callProgressWhenCompleted + progressNumber) * 50 :
|
|
24
24
|
// If no progressNumber, then the callProgress counts is working on the first 50%
|
|
25
|
-
|
|
25
|
+
callProgress(callsToCheck, callsMade) * 50;
|
|
26
26
|
}
|
|
27
27
|
export var generateImportModalId = function generateImportModalId(id) {
|
|
28
28
|
return "".concat(id, "_").concat(IMPORT_MODAL);
|
|
@@ -114,7 +114,7 @@ export var PrintFontSizeModal = (_dec = withStyle(generateStyle, generateCompone
|
|
|
114
114
|
description: t('Text size'),
|
|
115
115
|
"data-automation": "print-font-size-modal-radio-group"
|
|
116
116
|
}, this.sizes.map(function (size) {
|
|
117
|
-
var label = jsx("div", null, jsx("span", null, size.label),
|
|
117
|
+
var label = jsx("div", null, jsx("span", null, size.label), ' ', jsx("p", {
|
|
118
118
|
"aria-hidden": "true",
|
|
119
119
|
style: {
|
|
120
120
|
fontSize: "".concat(size.size, "rem"),
|
|
@@ -103,6 +103,7 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(_ref2) {
|
|
|
103
103
|
displayOldLinks: displayOldLinks
|
|
104
104
|
};
|
|
105
105
|
useEffect(function () {
|
|
106
|
+
;
|
|
106
107
|
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
107
108
|
var json;
|
|
108
109
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
@@ -20,8 +20,8 @@ export var buildKinesisClient = function buildKinesisClient(configuration, crede
|
|
|
20
20
|
return new Kinesis(kinesisConfig);
|
|
21
21
|
};
|
|
22
22
|
export var buildCredentials = function buildCredentials(credentialParams) {
|
|
23
|
-
var creds = new Credentials(credentialParams.access_key_id, credentialParams.secret_access_key, credentialParams.session_token // credentialParams
|
|
24
|
-
|
|
23
|
+
var creds = new Credentials(credentialParams.access_key_id, credentialParams.secret_access_key, credentialParams.session_token) // credentialParams
|
|
24
|
+
;
|
|
25
25
|
creds.expireTime = Date.parse(credentialParams.expiration);
|
|
26
26
|
return creds;
|
|
27
27
|
};
|
|
@@ -141,6 +141,7 @@ export var QuizSession = /*#__PURE__*/function (_ReduxRecord) {
|
|
|
141
141
|
// Still accurate?
|
|
142
142
|
var email, fullName, givenName;
|
|
143
143
|
if (this.user) {
|
|
144
|
+
;
|
|
144
145
|
var _this$user$toJS = this.user.toJS();
|
|
145
146
|
email = _this$user$toJS.email;
|
|
146
147
|
fullName = _this$user$toJS.fullName;
|
|
@@ -3,7 +3,7 @@ var _require = require('humps'),
|
|
|
3
3
|
import * as interactions from '@instructure/quiz-interactions';
|
|
4
4
|
var slugToNameMap = {
|
|
5
5
|
'multi-answer': 'MultipleAnswer',
|
|
6
|
-
|
|
6
|
+
choice: 'MultipleChoice'
|
|
7
7
|
};
|
|
8
8
|
export var componentForItem = function componentForItem(intTypeSlug, usage) {
|
|
9
9
|
var componentKey = slugToNameMap[intTypeSlug];
|
|
@@ -3,7 +3,7 @@ var _require = require('humps'),
|
|
|
3
3
|
import * as interactions from '@instructure/quiz-interactions';
|
|
4
4
|
var slugToNameMap = {
|
|
5
5
|
'multi-answer': 'MultipleAnswer',
|
|
6
|
-
|
|
6
|
+
choice: 'MultipleChoice'
|
|
7
7
|
};
|
|
8
8
|
var interactionTypeRecordForItem = function interactionTypeRecordForItem(intTypeSlug) {
|
|
9
9
|
if (!intTypeSlug) {
|
package/es/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint "import/newline-after-import": "warn" */
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* In g/356542 we tried importing takingApiActions from here, and it caused a weird karma issue.
|
|
5
|
-
* Nothing from this file should be imported from within quiz-core!
|
|
6
|
-
* These exports are for other packages to use.
|
|
7
|
-
* We should look into configuring an import/no-restricted-paths eslint rule to prevent this.
|
|
8
|
-
*/
|
|
3
|
+
*
|
|
4
|
+
* In g/356542 we tried importing takingApiActions from here, and it caused a weird karma issue.
|
|
5
|
+
* Nothing from this file should be imported from within quiz-core!
|
|
6
|
+
* These exports are for other packages to use.
|
|
7
|
+
* We should look into configuring an import/no-restricted-paths eslint rule to prevent this.
|
|
8
|
+
*/
|
|
9
9
|
// Components
|
|
10
10
|
export { DragDroppableSDKApp as SDKApp } from "./common/components/SDKApp/index.js";
|
|
11
11
|
export { ModerateTable } from "./moderating/components/resources/ModerateTable/index.js";
|
|
@@ -4,6 +4,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
+
import { Text } from '@instructure/ui-text';
|
|
7
8
|
import { Tooltip } from '@instructure/ui-tooltip';
|
|
8
9
|
import { Modal } from '@instructure/ui-modal';
|
|
9
10
|
import { TruncateText } from '@instructure/ui-truncate-text';
|
|
@@ -12,6 +13,8 @@ import { View } from '@instructure/ui-view';
|
|
|
12
13
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
13
14
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
14
15
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
16
|
+
import { featureOn } from "../../../../common/util/featureCheck.js";
|
|
17
|
+
import { IfFeature } from "../../../../common/components/shared/IfFeature/index.js";
|
|
15
18
|
export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
16
19
|
_inherits(AccommodationModal, _Component);
|
|
17
20
|
var _super = _createSuper(AccommodationModal);
|
|
@@ -54,6 +57,9 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
54
57
|
}, _this.props.studentName));
|
|
55
58
|
};
|
|
56
59
|
_this.renderHeading = function () {
|
|
60
|
+
if (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(Heading, null, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Student Accommodation')), t('Student Accommodation'));
|
|
62
|
+
}
|
|
57
63
|
var _this$props = _this.props,
|
|
58
64
|
mountNode = _this$props.mountNode,
|
|
59
65
|
studentName = _this$props.studentName;
|
|
@@ -76,6 +82,14 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
76
82
|
return _this;
|
|
77
83
|
}
|
|
78
84
|
_createClass(AccommodationModal, [{
|
|
85
|
+
key: "labelText",
|
|
86
|
+
value: function labelText() {
|
|
87
|
+
if (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
88
|
+
return t('Student Accommodation');
|
|
89
|
+
}
|
|
90
|
+
return this.props.studentName || t('Accommodations Modal');
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
79
93
|
key: "render",
|
|
80
94
|
value: function render() {
|
|
81
95
|
var _this$props2 = this.props,
|
|
@@ -86,7 +100,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
86
100
|
children = _this$props2.children;
|
|
87
101
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
88
102
|
open: open,
|
|
89
|
-
label:
|
|
103
|
+
label: this.labelText(),
|
|
90
104
|
mountNode: mountNode,
|
|
91
105
|
size: "small",
|
|
92
106
|
onExited: this.handleAccommodationsModalExited
|
|
@@ -95,7 +109,12 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
95
109
|
placement: "end",
|
|
96
110
|
offset: "medium",
|
|
97
111
|
screenReaderLabel: t('Close')
|
|
98
|
-
}), this.renderHeading()), /*#__PURE__*/React.createElement(Modal.Body, null,
|
|
112
|
+
}), this.renderHeading()), /*#__PURE__*/React.createElement(Modal.Body, null, /*#__PURE__*/React.createElement(IfFeature, {
|
|
113
|
+
name: "atteq_apply_changes_to_current_quiz_attempts"
|
|
114
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
115
|
+
weight: "bold",
|
|
116
|
+
as: "h2"
|
|
117
|
+
}, studentName)), children), /*#__PURE__*/React.createElement(Modal.Footer, null, /*#__PURE__*/React.createElement(Button, {
|
|
99
118
|
onClick: this.cancelAction,
|
|
100
119
|
margin: "xxx-small",
|
|
101
120
|
"data-automation": "sdk-moderation-cancel"
|
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
propValues: {
|
|
3
3
|
quizSessionIdsAndUsers: [[{
|
|
4
|
-
id:
|
|
5
|
-
name:
|
|
4
|
+
id: '12',
|
|
5
|
+
name: 'Student A'
|
|
6
6
|
}, {
|
|
7
|
-
id:
|
|
8
|
-
name:
|
|
7
|
+
id: '15',
|
|
8
|
+
name: 'Student B'
|
|
9
9
|
}, {
|
|
10
|
-
id:
|
|
11
|
-
name:
|
|
10
|
+
id: '16',
|
|
11
|
+
name: 'Student C'
|
|
12
12
|
}, {
|
|
13
|
-
id:
|
|
14
|
-
name:
|
|
13
|
+
id: '18',
|
|
14
|
+
name: 'Student D'
|
|
15
15
|
}, {
|
|
16
|
-
id:
|
|
17
|
-
name:
|
|
16
|
+
id: '19',
|
|
17
|
+
name: 'Student E'
|
|
18
18
|
}, {
|
|
19
|
-
id:
|
|
20
|
-
name:
|
|
19
|
+
id: '21',
|
|
20
|
+
name: 'Student F'
|
|
21
21
|
}, {
|
|
22
|
-
id:
|
|
23
|
-
name:
|
|
22
|
+
id: '22',
|
|
23
|
+
name: 'Student G'
|
|
24
24
|
}, {
|
|
25
|
-
id:
|
|
26
|
-
name:
|
|
25
|
+
id: '26',
|
|
26
|
+
name: 'Student H'
|
|
27
27
|
}, {
|
|
28
|
-
id:
|
|
29
|
-
name:
|
|
28
|
+
id: '39',
|
|
29
|
+
name: 'Student K'
|
|
30
30
|
}], [{
|
|
31
|
-
id:
|
|
32
|
-
name:
|
|
31
|
+
id: '12',
|
|
32
|
+
name: 'Student A'
|
|
33
33
|
}]],
|
|
34
34
|
quizSessionsData: [[{
|
|
35
|
-
id:
|
|
36
|
-
status:
|
|
35
|
+
id: '12',
|
|
36
|
+
status: 'in_progress'
|
|
37
37
|
}, {
|
|
38
|
-
id:
|
|
39
|
-
status:
|
|
38
|
+
id: '15',
|
|
39
|
+
status: 'in_progress'
|
|
40
40
|
}, {
|
|
41
|
-
id:
|
|
42
|
-
status:
|
|
41
|
+
id: '16',
|
|
42
|
+
status: 'in_progress'
|
|
43
43
|
}, {
|
|
44
|
-
id:
|
|
45
|
-
status:
|
|
44
|
+
id: '18',
|
|
45
|
+
status: 'in_progress'
|
|
46
46
|
}, {
|
|
47
|
-
id:
|
|
48
|
-
status:
|
|
47
|
+
id: '19',
|
|
48
|
+
status: 'in_progress'
|
|
49
49
|
}, {
|
|
50
|
-
id:
|
|
51
|
-
status:
|
|
50
|
+
id: '21',
|
|
51
|
+
status: 'in_progress'
|
|
52
52
|
}, {
|
|
53
|
-
id:
|
|
54
|
-
status:
|
|
53
|
+
id: '22',
|
|
54
|
+
status: 'in_progress'
|
|
55
55
|
}, {
|
|
56
|
-
id:
|
|
57
|
-
status:
|
|
56
|
+
id: '26',
|
|
57
|
+
status: 'in_progress'
|
|
58
58
|
}, {
|
|
59
|
-
id:
|
|
60
|
-
status:
|
|
59
|
+
id: '39',
|
|
60
|
+
status: 'in_progress'
|
|
61
61
|
}], [{
|
|
62
|
-
id:
|
|
63
|
-
name:
|
|
62
|
+
id: '12',
|
|
63
|
+
name: 'Student A'
|
|
64
64
|
}]]
|
|
65
65
|
},
|
|
66
66
|
getComponentProps: function getComponentProps(props) {
|
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
8
8
|
import { Flex } from '@instructure/ui-flex';
|
|
9
9
|
import { View } from '@instructure/ui-view';
|
|
10
|
+
import { Text } from '@instructure/ui-text';
|
|
10
11
|
import { Tooltip } from '@instructure/ui-tooltip';
|
|
11
12
|
import { Tray } from '@instructure/ui-tray';
|
|
12
13
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
@@ -26,12 +27,20 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
26
27
|
}
|
|
27
28
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
28
29
|
_this.state = {
|
|
29
|
-
|
|
30
|
+
titleIsTruncated: false,
|
|
31
|
+
participantNameIsTruncated: false
|
|
30
32
|
};
|
|
31
|
-
_this.
|
|
32
|
-
if (_this.state.
|
|
33
|
+
_this.handleTitleUpdate = function (titleIsTruncated) {
|
|
34
|
+
if (_this.state.titleIsTruncated !== titleIsTruncated) {
|
|
33
35
|
_this.setState({
|
|
34
|
-
|
|
36
|
+
titleIsTruncated: titleIsTruncated
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
_this.handleParticipantNameUpdate = function (participantNameIsTruncated) {
|
|
41
|
+
if (_this.state.participantNameIsTruncated !== participantNameIsTruncated) {
|
|
42
|
+
_this.setState({
|
|
43
|
+
participantNameIsTruncated: participantNameIsTruncated
|
|
35
44
|
});
|
|
36
45
|
}
|
|
37
46
|
};
|
|
@@ -40,7 +49,8 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
40
49
|
};
|
|
41
50
|
_this.handleTrayExited = function () {
|
|
42
51
|
_this.setState({
|
|
43
|
-
|
|
52
|
+
titleIsTruncated: false,
|
|
53
|
+
participantNameIsTruncated: false
|
|
44
54
|
});
|
|
45
55
|
};
|
|
46
56
|
_this.setCloseRef = function (el) {
|
|
@@ -57,19 +67,16 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
57
67
|
_this.props.closeTray();
|
|
58
68
|
};
|
|
59
69
|
_this.renderTitleAndCloseButton = function () {
|
|
60
|
-
return /*#__PURE__*/React.createElement(Flex,
|
|
70
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
71
|
+
justifyItems: "space-between"
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
61
73
|
shouldGrow: true,
|
|
62
74
|
shouldShrink: true
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
var focused = _ref.focused;
|
|
69
|
-
return _this.renderName({
|
|
70
|
-
focused: focused
|
|
71
|
-
});
|
|
72
|
-
}) : _this.renderName()), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(CloseButton, {
|
|
75
|
+
}, featureOn('atteq_apply_changes_to_current_quiz_attempts') ? /*#__PURE__*/React.createElement(Text, {
|
|
76
|
+
as: "h2",
|
|
77
|
+
size: "large",
|
|
78
|
+
weight: "bold"
|
|
79
|
+
}, t('In Progress Accommodation')) : _this.renderHeading()), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(CloseButton, {
|
|
73
80
|
onClick: _this.props.closeTray,
|
|
74
81
|
elementRef: _this.setCloseRef,
|
|
75
82
|
screenReaderLabel: t('Close')
|
|
@@ -98,9 +105,25 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
98
105
|
return _this;
|
|
99
106
|
}
|
|
100
107
|
_createClass(ModerateTray, [{
|
|
101
|
-
key: "
|
|
102
|
-
value: function
|
|
103
|
-
var
|
|
108
|
+
key: "renderHeading",
|
|
109
|
+
value: function renderHeading() {
|
|
110
|
+
var _this2 = this;
|
|
111
|
+
return this.state.titleIsTruncated ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
112
|
+
placement: "start",
|
|
113
|
+
renderTip: this.labelText(),
|
|
114
|
+
mountNode: this.getTrayRef || null
|
|
115
|
+
}, function (_ref) {
|
|
116
|
+
var focused = _ref.focused;
|
|
117
|
+
return _this2.renderHeadingName({
|
|
118
|
+
focused: focused
|
|
119
|
+
});
|
|
120
|
+
}) : this.renderHeadingName();
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "renderHeadingName",
|
|
124
|
+
value: function renderHeadingName() {
|
|
125
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
126
|
+
focused = _ref2.focused;
|
|
104
127
|
return (
|
|
105
128
|
/*#__PURE__*/
|
|
106
129
|
// When using TruncateText inside a Tooltip, a focusable wrapper element is required
|
|
@@ -109,20 +132,69 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
109
132
|
display: "block",
|
|
110
133
|
borderRadius: "small",
|
|
111
134
|
position: "relative",
|
|
112
|
-
withFocusOutline: this.state.
|
|
135
|
+
withFocusOutline: this.state.titleIsTruncated && focused,
|
|
113
136
|
as: "h2",
|
|
114
137
|
tabIndex: this.state.isTruncated ? 0 : null
|
|
115
138
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, this.labelText()), /*#__PURE__*/React.createElement(TruncateText, {
|
|
116
139
|
"aria-hidden": "true",
|
|
117
140
|
maxLines: 2,
|
|
118
141
|
truncate: "character",
|
|
119
|
-
onUpdate: this.
|
|
142
|
+
onUpdate: this.handleTitleUpdate
|
|
120
143
|
}, this.labelText()))
|
|
121
144
|
);
|
|
122
145
|
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "renderName",
|
|
148
|
+
value: function renderName(renderProps) {
|
|
149
|
+
if (!featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
var focused = renderProps && renderProps.focused;
|
|
153
|
+
return (
|
|
154
|
+
/*#__PURE__*/
|
|
155
|
+
// When using TruncateText inside a Tooltip, a focusable wrapper element is required
|
|
156
|
+
// tabIndex={0} makes the div focusable and allows KO users to access the tooltip
|
|
157
|
+
React.createElement(View, {
|
|
158
|
+
display: "block",
|
|
159
|
+
borderRadius: "small",
|
|
160
|
+
position: "relative",
|
|
161
|
+
withFocusOutline: this.state.participantNameIsTruncated && focused,
|
|
162
|
+
tabIndex: this.state.participantNameIsTruncated ? 0 : null,
|
|
163
|
+
margin: "small 0"
|
|
164
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, this.props.participantName), /*#__PURE__*/React.createElement(TruncateText, {
|
|
165
|
+
"aria-hidden": "true",
|
|
166
|
+
maxLines: 2,
|
|
167
|
+
truncate: "character",
|
|
168
|
+
onUpdate: this.handleParticipantNameUpdate
|
|
169
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
170
|
+
weight: "bold"
|
|
171
|
+
}, this.props.participantName)))
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
key: "renderNameWithTooltip",
|
|
176
|
+
value: function renderNameWithTooltip() {
|
|
177
|
+
var _this3 = this;
|
|
178
|
+
if (!featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
return this.state.titleIsTruncated ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
182
|
+
placement: "start",
|
|
183
|
+
renderTip: this.props.participantName,
|
|
184
|
+
mountNode: this.getTrayRef || null
|
|
185
|
+
}, function (_ref3) {
|
|
186
|
+
var focused = _ref3.focused;
|
|
187
|
+
return _this3.renderName({
|
|
188
|
+
focused: focused
|
|
189
|
+
});
|
|
190
|
+
}) : this.renderName();
|
|
191
|
+
}
|
|
123
192
|
}, {
|
|
124
193
|
key: "labelText",
|
|
125
194
|
value: function labelText() {
|
|
195
|
+
if (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
196
|
+
return t('In Progress Accommodation');
|
|
197
|
+
}
|
|
126
198
|
if (this.props.participantName) {
|
|
127
199
|
return this.props.participantName;
|
|
128
200
|
}
|
|
@@ -139,6 +211,7 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
139
211
|
onExited: this.handleTrayExited,
|
|
140
212
|
open: this.props.isOpen,
|
|
141
213
|
placement: "end",
|
|
214
|
+
size: featureOn('atteq_apply_changes_to_current_quiz_attempts') ? 'regular' : void 0,
|
|
142
215
|
shouldCloseOnDocumentClick: true,
|
|
143
216
|
ref: this.setTrayRef
|
|
144
217
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
@@ -150,7 +223,7 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
150
223
|
}, this.renderTitleAndCloseButton()), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
151
224
|
shouldGrow: true,
|
|
152
225
|
padding: "0 medium"
|
|
153
|
-
}, this.renderChildren()), featureOn('add_time_to_existing_quiz_sessions') && /*#__PURE__*/React.createElement(Flex.Item, null, this.renderFooter())));
|
|
226
|
+
}, this.renderNameWithTooltip(), this.renderChildren()), featureOn('add_time_to_existing_quiz_sessions') && /*#__PURE__*/React.createElement(Flex.Item, null, this.renderFooter())));
|
|
154
227
|
}
|
|
155
228
|
}]);
|
|
156
229
|
ModerateTray.displayName = "ModerateTray";
|
|
@@ -21,8 +21,8 @@ var generateStyle = function generateStyle(componentTheme, props) {
|
|
|
21
21
|
animationName: contentAnimation,
|
|
22
22
|
animationFillMode: 'forwards',
|
|
23
23
|
animationDuration: '0.3s',
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
th: contentCellStyles,
|
|
25
|
+
td: contentCellStyles
|
|
26
26
|
},
|
|
27
27
|
bar: {
|
|
28
28
|
background: componentTheme.barBackgroundColor,
|
|
@@ -84,7 +84,7 @@ export var QuizAnalysisOverview = (_dec = withStyle(generateStyle, generateCompo
|
|
|
84
84
|
isGroupChild: true
|
|
85
85
|
}), jsx(MetricsListItem, {
|
|
86
86
|
key: "cronbachsAlpha",
|
|
87
|
-
renderLabel: t(
|
|
87
|
+
renderLabel: t("Cronbach's Alpha"),
|
|
88
88
|
renderValue: quizAnalysis.cronbachsAlpha(),
|
|
89
89
|
customStyles: this.props.styles.metric,
|
|
90
90
|
isGroupChild: true
|
|
@@ -7,13 +7,13 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
7
7
|
width: '46px',
|
|
8
8
|
justifyContent: 'center',
|
|
9
9
|
alignItems: 'center',
|
|
10
|
-
|
|
10
|
+
svg: {
|
|
11
11
|
fill: 'white'
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
collapsingTable: {
|
|
15
15
|
minWidth: '500px',
|
|
16
|
-
|
|
16
|
+
table: {
|
|
17
17
|
borderCollapse: 'separate',
|
|
18
18
|
borderSpacing: '0 12px'
|
|
19
19
|
},
|
|
@@ -126,7 +126,7 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
126
126
|
paddingLeft: '45px'
|
|
127
127
|
},
|
|
128
128
|
iconWhite: {
|
|
129
|
-
|
|
129
|
+
svg: {
|
|
130
130
|
fill: 'white'
|
|
131
131
|
}
|
|
132
132
|
},
|