@instructure/quiz-core 20.36.1-rc.2 → 20.36.1-rc.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.
@@ -94,7 +94,7 @@ export var ExtraTimeSettings = /*#__PURE__*/function (_Component) {
94
94
  minutesLabel: t('Minutes'),
95
95
  minutesDataAutomation: "sdk-moderation-time-minutes",
96
96
  description: t('Additional time'),
97
- margin: "medium none"
97
+ margin: "medium none none none"
98
98
  }), timeAdjustmentType === 'timerMultiplierEnabled' && /*#__PURE__*/React.createElement(ExtraTimeMultiplier, {
99
99
  onChange: this.onChangeMultiplier,
100
100
  timerMultiplierValue: timerSettings.timerMultiplierValue,
@@ -4,7 +4,6 @@ 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';
8
7
  import { Tooltip } from '@instructure/ui-tooltip';
9
8
  import { Modal } from '@instructure/ui-modal';
10
9
  import { TruncateText } from '@instructure/ui-truncate-text';
@@ -13,8 +12,6 @@ import { View } from '@instructure/ui-view';
13
12
  import { Button, CloseButton } from '@instructure/ui-buttons';
14
13
  import t from '@instructure/quiz-i18n/es/format-message';
15
14
  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";
18
15
  export var AccommodationModal = /*#__PURE__*/function (_Component) {
19
16
  _inherits(AccommodationModal, _Component);
20
17
  var _super = _createSuper(AccommodationModal);
@@ -57,7 +54,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
57
54
  }, _this.props.studentName));
58
55
  };
59
56
  _this.renderHeading = function () {
60
- if (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
57
+ if (_this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
61
58
  return /*#__PURE__*/React.createElement(Heading, null, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Student Accommodation')), t('Student Accommodation'));
62
59
  }
63
60
  var _this$props = _this.props,
@@ -84,7 +81,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
84
81
  _createClass(AccommodationModal, [{
85
82
  key: "labelText",
86
83
  value: function labelText() {
87
- if (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
84
+ if (this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
88
85
  return t('Student Accommodation');
89
86
  }
90
87
  return this.props.studentName || t('Accommodations Modal');
@@ -93,7 +90,6 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
93
90
  key: "render",
94
91
  value: function render() {
95
92
  var _this$props2 = this.props,
96
- studentName = _this$props2.studentName,
97
93
  open = _this$props2.open,
98
94
  closeModal = _this$props2.closeModal,
99
95
  mountNode = _this$props2.mountNode,
@@ -109,12 +105,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
109
105
  placement: "end",
110
106
  offset: "medium",
111
107
  screenReaderLabel: t('Close')
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, {
108
+ }), this.renderHeading()), /*#__PURE__*/React.createElement(Modal.Body, null, children), /*#__PURE__*/React.createElement(Modal.Footer, null, /*#__PURE__*/React.createElement(Button, {
118
109
  onClick: this.cancelAction,
119
110
  margin: "xxx-small",
120
111
  "data-automation": "sdk-moderation-cancel"
@@ -137,7 +128,8 @@ AccommodationModal.propTypes = {
137
128
  onDismiss: PropTypes.func,
138
129
  mountNode: PropTypes.string,
139
130
  // this is just to fix chromatic
140
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)])
131
+ children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
132
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: PropTypes.bool.isRequired
141
133
  };
142
134
  AccommodationModal.defaultProps = {
143
135
  children: [],
@@ -325,7 +325,8 @@ export var ModerateTable = (_dec = withStyleOverrides(generateStyle, generateCom
325
325
  css: this.props.styles.page
326
326
  }, jsx(ModerateTray, {
327
327
  onClose: this.onCloseTray,
328
- onSave: this.props.onSaveTray
328
+ onSave: this.props.onSaveTray,
329
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled
329
330
  }, jsx(Flex.Item, null, !this.props.anonymousGrading && _ref6), this.props.children), this.renderContent());
330
331
  }
331
332
  }]);
@@ -380,7 +381,8 @@ export var ModerateTable = (_dec = withStyleOverrides(generateStyle, generateCom
380
381
  getQuizSessions: PropTypes.func.isRequired,
381
382
  addSuccess: PropTypes.func.isRequired,
382
383
  styles: PropTypes.object,
383
- makeStyles: PropTypes.func
384
+ makeStyles: PropTypes.func,
385
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: PropTypes.bool.isRequired
384
386
  }, _ModerateTable.defaultProps = {
385
387
  anonymousGrading: false,
386
388
  children: void 0,
@@ -8,6 +8,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
10
  import { Text } from '@instructure/ui-text';
11
+ import { Heading } from '@instructure/ui-heading';
11
12
  import { Tooltip } from '@instructure/ui-tooltip';
12
13
  import { Tray } from '@instructure/ui-tray';
13
14
  import { Button, CloseButton } from '@instructure/ui-buttons';
@@ -15,7 +16,6 @@ import { TruncateText } from '@instructure/ui-truncate-text';
15
16
  import { Modal } from '@instructure/ui-modal';
16
17
  import { liveRegion } from '@instructure/quiz-common';
17
18
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
18
- import { featureOn } from "../../../../common/util/featureCheck.js";
19
19
  export var ModerateTray = /*#__PURE__*/function (_Component) {
20
20
  _inherits(ModerateTray, _Component);
21
21
  var _super = _createSuper(ModerateTray);
@@ -67,20 +67,15 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
67
67
  _this.props.closeTray();
68
68
  };
69
69
  _this.renderTitleAndCloseButton = function () {
70
- return /*#__PURE__*/React.createElement(Flex, {
71
- justifyItems: "space-between"
72
- }, /*#__PURE__*/React.createElement(Flex.Item, {
73
- shouldGrow: true,
74
- shouldShrink: true
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, {
70
+ return /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement(CloseButton, {
80
71
  onClick: _this.props.closeTray,
81
72
  elementRef: _this.setCloseRef,
73
+ placement: "end",
74
+ offset: "medium",
82
75
  screenReaderLabel: t('Close')
83
- })));
76
+ }), _this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled ? /*#__PURE__*/React.createElement(Heading, {
77
+ level: "h3"
78
+ }, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('In Progress Accommodation')), t('In Progress Accommodation')) : _this.renderHeading());
84
79
  };
85
80
  _this.renderChildren = function () {
86
81
  return React.Children.map(_this.props.children, function (child) {
@@ -128,12 +123,12 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
128
123
  /*#__PURE__*/
129
124
  // When using TruncateText inside a Tooltip, a focusable wrapper element is required
130
125
  // tabIndex={0} makes the div focusable and allows KO users to access the tooltip
131
- React.createElement(View, {
126
+ React.createElement(Heading, {
132
127
  display: "block",
133
128
  borderRadius: "small",
134
129
  position: "relative",
135
130
  withFocusOutline: this.state.titleIsTruncated && focused,
136
- as: "h2",
131
+ level: "h3",
137
132
  tabIndex: this.state.isTruncated ? 0 : null
138
133
  }, /*#__PURE__*/React.createElement(ScreenReaderContent, null, this.labelText()), /*#__PURE__*/React.createElement(TruncateText, {
139
134
  "aria-hidden": "true",
@@ -146,9 +141,6 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
146
141
  }, {
147
142
  key: "renderName",
148
143
  value: function renderName(renderProps) {
149
- if (!featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
150
- return null;
151
- }
152
144
  var focused = renderProps && renderProps.focused;
153
145
  return (
154
146
  /*#__PURE__*/
@@ -159,8 +151,7 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
159
151
  borderRadius: "small",
160
152
  position: "relative",
161
153
  withFocusOutline: this.state.participantNameIsTruncated && focused,
162
- tabIndex: this.state.participantNameIsTruncated ? 0 : null,
163
- margin: "small 0"
154
+ tabIndex: this.state.participantNameIsTruncated ? 0 : null
164
155
  }, /*#__PURE__*/React.createElement(ScreenReaderContent, null, this.props.participantName), /*#__PURE__*/React.createElement(TruncateText, {
165
156
  "aria-hidden": "true",
166
157
  maxLines: 2,
@@ -175,9 +166,6 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
175
166
  key: "renderNameWithTooltip",
176
167
  value: function renderNameWithTooltip() {
177
168
  var _this3 = this;
178
- if (!featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
179
- return null;
180
- }
181
169
  return this.state.titleIsTruncated ? /*#__PURE__*/React.createElement(Tooltip, {
182
170
  placement: "start",
183
171
  renderTip: this.props.participantName,
@@ -192,7 +180,7 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
192
180
  }, {
193
181
  key: "labelText",
194
182
  value: function labelText() {
195
- if (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
183
+ if (this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
196
184
  return t('In Progress Accommodation');
197
185
  }
198
186
  if (this.props.participantName) {
@@ -211,19 +199,21 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
211
199
  onExited: this.handleTrayExited,
212
200
  open: this.props.isOpen,
213
201
  placement: "end",
214
- size: featureOn('atteq_apply_changes_to_current_quiz_attempts') ? 'regular' : void 0,
202
+ size: this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled ? 'regular' : void 0,
215
203
  shouldCloseOnDocumentClick: true,
216
204
  ref: this.setTrayRef
217
205
  }, /*#__PURE__*/React.createElement(Flex, {
218
206
  as: "div",
219
207
  direction: "column",
220
208
  height: "100vh"
221
- }, /*#__PURE__*/React.createElement(Flex.Item, {
222
- padding: "small medium"
223
- }, this.renderTitleAndCloseButton()), /*#__PURE__*/React.createElement(Flex.Item, {
209
+ }, this.renderTitleAndCloseButton(), this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled && /*#__PURE__*/React.createElement(Flex.Item, {
210
+ padding: "medium medium 0 medium"
211
+ }, this.renderNameWithTooltip()), /*#__PURE__*/React.createElement(Flex.Item, {
212
+ padding: "medium"
213
+ }, t('These settings apply to current and all future attempts.')), /*#__PURE__*/React.createElement(Flex.Item, {
224
214
  shouldGrow: true,
225
215
  padding: "0 medium"
226
- }, this.renderNameWithTooltip(), this.renderChildren()), featureOn('add_time_to_existing_quiz_sessions') && /*#__PURE__*/React.createElement(Flex.Item, null, this.renderFooter())));
216
+ }, this.renderChildren()), this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled && /*#__PURE__*/React.createElement(Flex.Item, null, this.renderFooter())));
227
217
  }
228
218
  }]);
229
219
  ModerateTray.displayName = "ModerateTray";
@@ -235,7 +225,8 @@ ModerateTray.propTypes = {
235
225
  isOpen: PropTypes.bool.isRequired,
236
226
  onClose: PropTypes.func,
237
227
  onSave: PropTypes.func.isRequired,
238
- participantName: PropTypes.string
228
+ participantName: PropTypes.string,
229
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: PropTypes.bool.isRequired
239
230
  };
240
231
  ModerateTray.defaultProps = {
241
232
  onClose: void 0,
@@ -102,7 +102,7 @@ var ExtraTimeSettings = /*#__PURE__*/function (_Component) {
102
102
  minutesLabel: (0, _formatMessage.default)('Minutes'),
103
103
  minutesDataAutomation: "sdk-moderation-time-minutes",
104
104
  description: (0, _formatMessage.default)('Additional time'),
105
- margin: "medium none"
105
+ margin: "medium none none none"
106
106
  }), timeAdjustmentType === 'timerMultiplierEnabled' && /*#__PURE__*/_react.default.createElement(_index2.default, {
107
107
  onChange: this.onChangeMultiplier,
108
108
  timerMultiplierValue: timerSettings.timerMultiplierValue,
@@ -12,7 +12,6 @@ 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");
16
15
  var _uiTooltip = require("@instructure/ui-tooltip");
17
16
  var _uiModal = require("@instructure/ui-modal");
18
17
  var _uiTruncateText = require("@instructure/ui-truncate-text");
@@ -21,8 +20,6 @@ var _uiView = require("@instructure/ui-view");
21
20
  var _uiButtons = require("@instructure/ui-buttons");
22
21
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
23
22
  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");
26
23
  var AccommodationModal = /*#__PURE__*/function (_Component) {
27
24
  (0, _inherits2.default)(AccommodationModal, _Component);
28
25
  var _super = (0, _createSuper2.default)(AccommodationModal);
@@ -65,7 +62,7 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
65
62
  }, _this.props.studentName));
66
63
  };
67
64
  _this.renderHeading = function () {
68
- if ((0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
65
+ if (_this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
69
66
  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
67
  }
71
68
  var _this$props = _this.props,
@@ -92,7 +89,7 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
92
89
  (0, _createClass2.default)(AccommodationModal, [{
93
90
  key: "labelText",
94
91
  value: function labelText() {
95
- if ((0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
92
+ if (this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
96
93
  return (0, _formatMessage.default)('Student Accommodation');
97
94
  }
98
95
  return this.props.studentName || (0, _formatMessage.default)('Accommodations Modal');
@@ -101,7 +98,6 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
101
98
  key: "render",
102
99
  value: function render() {
103
100
  var _this$props2 = this.props,
104
- studentName = _this$props2.studentName,
105
101
  open = _this$props2.open,
106
102
  closeModal = _this$props2.closeModal,
107
103
  mountNode = _this$props2.mountNode,
@@ -117,12 +113,7 @@ var AccommodationModal = /*#__PURE__*/function (_Component) {
117
113
  placement: "end",
118
114
  offset: "medium",
119
115
  screenReaderLabel: (0, _formatMessage.default)('Close')
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, {
116
+ }), this.renderHeading()), /*#__PURE__*/_react.default.createElement(_uiModal.Modal.Body, null, children), /*#__PURE__*/_react.default.createElement(_uiModal.Modal.Footer, null, /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
126
117
  onClick: this.cancelAction,
127
118
  margin: "xxx-small",
128
119
  "data-automation": "sdk-moderation-cancel"
@@ -146,7 +137,8 @@ AccommodationModal.propTypes = {
146
137
  onDismiss: _propTypes.default.func,
147
138
  mountNode: _propTypes.default.string,
148
139
  // this is just to fix chromatic
149
- children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.arrayOf(_propTypes.default.node)])
140
+ children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.arrayOf(_propTypes.default.node)]),
141
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: _propTypes.default.bool.isRequired
150
142
  };
151
143
  AccommodationModal.defaultProps = {
152
144
  children: [],
@@ -332,7 +332,8 @@ var ModerateTable = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
332
332
  css: this.props.styles.page
333
333
  }, (0, _emotion.jsx)(_index4.default, {
334
334
  onClose: this.onCloseTray,
335
- onSave: this.props.onSaveTray
335
+ onSave: this.props.onSaveTray,
336
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled
336
337
  }, (0, _emotion.jsx)(_uiFlex.Flex.Item, null, !this.props.anonymousGrading && _ref6), this.props.children), this.renderContent());
337
338
  }
338
339
  }]);
@@ -387,7 +388,8 @@ var ModerateTable = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
387
388
  getQuizSessions: _propTypes.default.func.isRequired,
388
389
  addSuccess: _propTypes.default.func.isRequired,
389
390
  styles: _propTypes.default.object,
390
- makeStyles: _propTypes.default.func
391
+ makeStyles: _propTypes.default.func,
392
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: _propTypes.default.bool.isRequired
391
393
  }, _ModerateTable.defaultProps = {
392
394
  anonymousGrading: false,
393
395
  children: void 0,
@@ -16,6 +16,7 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
16
16
  var _uiFlex = require("@instructure/ui-flex");
17
17
  var _uiView = require("@instructure/ui-view");
18
18
  var _uiText = require("@instructure/ui-text");
19
+ var _uiHeading = require("@instructure/ui-heading");
19
20
  var _uiTooltip = require("@instructure/ui-tooltip");
20
21
  var _uiTray = require("@instructure/ui-tray");
21
22
  var _uiButtons = require("@instructure/ui-buttons");
@@ -23,7 +24,6 @@ var _uiTruncateText = require("@instructure/ui-truncate-text");
23
24
  var _uiModal = require("@instructure/ui-modal");
24
25
  var _quizCommon = require("@instructure/quiz-common");
25
26
  var _uiA11yContent = require("@instructure/ui-a11y-content");
26
- var _featureCheck = require("../../../../common/util/featureCheck.js");
27
27
  var ModerateTray = /*#__PURE__*/function (_Component) {
28
28
  (0, _inherits2.default)(ModerateTray, _Component);
29
29
  var _super = (0, _createSuper2.default)(ModerateTray);
@@ -75,20 +75,15 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
75
75
  _this.props.closeTray();
76
76
  };
77
77
  _this.renderTitleAndCloseButton = function () {
78
- return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
79
- justifyItems: "space-between"
80
- }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
81
- shouldGrow: true,
82
- shouldShrink: true
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, {
78
+ return /*#__PURE__*/_react.default.createElement(_uiModal.Modal.Header, null, /*#__PURE__*/_react.default.createElement(_uiButtons.CloseButton, {
88
79
  onClick: _this.props.closeTray,
89
80
  elementRef: _this.setCloseRef,
81
+ placement: "end",
82
+ offset: "medium",
90
83
  screenReaderLabel: (0, _formatMessage.default)('Close')
91
- })));
84
+ }), _this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled ? /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
85
+ level: "h3"
86
+ }, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('In Progress Accommodation')), (0, _formatMessage.default)('In Progress Accommodation')) : _this.renderHeading());
92
87
  };
93
88
  _this.renderChildren = function () {
94
89
  return _react.default.Children.map(_this.props.children, function (child) {
@@ -136,12 +131,12 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
136
131
  /*#__PURE__*/
137
132
  // When using TruncateText inside a Tooltip, a focusable wrapper element is required
138
133
  // tabIndex={0} makes the div focusable and allows KO users to access the tooltip
139
- _react.default.createElement(_uiView.View, {
134
+ _react.default.createElement(_uiHeading.Heading, {
140
135
  display: "block",
141
136
  borderRadius: "small",
142
137
  position: "relative",
143
138
  withFocusOutline: this.state.titleIsTruncated && focused,
144
- as: "h2",
139
+ level: "h3",
145
140
  tabIndex: this.state.isTruncated ? 0 : null
146
141
  }, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, this.labelText()), /*#__PURE__*/_react.default.createElement(_uiTruncateText.TruncateText, {
147
142
  "aria-hidden": "true",
@@ -154,9 +149,6 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
154
149
  }, {
155
150
  key: "renderName",
156
151
  value: function renderName(renderProps) {
157
- if (!(0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
158
- return null;
159
- }
160
152
  var focused = renderProps && renderProps.focused;
161
153
  return (
162
154
  /*#__PURE__*/
@@ -167,8 +159,7 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
167
159
  borderRadius: "small",
168
160
  position: "relative",
169
161
  withFocusOutline: this.state.participantNameIsTruncated && focused,
170
- tabIndex: this.state.participantNameIsTruncated ? 0 : null,
171
- margin: "small 0"
162
+ tabIndex: this.state.participantNameIsTruncated ? 0 : null
172
163
  }, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, this.props.participantName), /*#__PURE__*/_react.default.createElement(_uiTruncateText.TruncateText, {
173
164
  "aria-hidden": "true",
174
165
  maxLines: 2,
@@ -183,9 +174,6 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
183
174
  key: "renderNameWithTooltip",
184
175
  value: function renderNameWithTooltip() {
185
176
  var _this3 = this;
186
- if (!(0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
187
- return null;
188
- }
189
177
  return this.state.titleIsTruncated ? /*#__PURE__*/_react.default.createElement(_uiTooltip.Tooltip, {
190
178
  placement: "start",
191
179
  renderTip: this.props.participantName,
@@ -200,7 +188,7 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
200
188
  }, {
201
189
  key: "labelText",
202
190
  value: function labelText() {
203
- if ((0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts')) {
191
+ if (this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
204
192
  return (0, _formatMessage.default)('In Progress Accommodation');
205
193
  }
206
194
  if (this.props.participantName) {
@@ -219,19 +207,21 @@ var ModerateTray = /*#__PURE__*/function (_Component) {
219
207
  onExited: this.handleTrayExited,
220
208
  open: this.props.isOpen,
221
209
  placement: "end",
222
- size: (0, _featureCheck.featureOn)('atteq_apply_changes_to_current_quiz_attempts') ? 'regular' : void 0,
210
+ size: this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled ? 'regular' : void 0,
223
211
  shouldCloseOnDocumentClick: true,
224
212
  ref: this.setTrayRef
225
213
  }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
226
214
  as: "div",
227
215
  direction: "column",
228
216
  height: "100vh"
229
- }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
230
- padding: "small medium"
231
- }, this.renderTitleAndCloseButton()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
217
+ }, this.renderTitleAndCloseButton(), this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled && /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
218
+ padding: "medium medium 0 medium"
219
+ }, this.renderNameWithTooltip()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
220
+ padding: "medium"
221
+ }, (0, _formatMessage.default)('These settings apply to current and all future attempts.')), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
232
222
  shouldGrow: true,
233
223
  padding: "0 medium"
234
- }, this.renderNameWithTooltip(), this.renderChildren()), (0, _featureCheck.featureOn)('add_time_to_existing_quiz_sessions') && /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderFooter())));
224
+ }, this.renderChildren()), this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled && /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, this.renderFooter())));
235
225
  }
236
226
  }]);
237
227
  ModerateTray.displayName = "ModerateTray";
@@ -244,7 +234,8 @@ ModerateTray.propTypes = {
244
234
  isOpen: _propTypes.default.bool.isRequired,
245
235
  onClose: _propTypes.default.func,
246
236
  onSave: _propTypes.default.func.isRequired,
247
- participantName: _propTypes.default.string
237
+ participantName: _propTypes.default.string,
238
+ atteqApplyChangesToCurrentQuizAttemptsEnabled: _propTypes.default.bool.isRequired
248
239
  };
249
240
  ModerateTray.defaultProps = {
250
241
  onClose: void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.36.1-rc.2+e9e02e68b",
3
+ "version": "20.36.1-rc.3+c9b688fb5",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -46,11 +46,11 @@
46
46
  "@instructure/emotion": "^8.56.3",
47
47
  "@instructure/grading-utils": "^1.0.0",
48
48
  "@instructure/outcomes-ui": "^3.2.2",
49
- "@instructure/quiz-common": "^20.36.1-rc.2+e9e02e68b",
50
- "@instructure/quiz-i18n": "^20.36.1-rc.2+e9e02e68b",
51
- "@instructure/quiz-interactions": "^20.36.1-rc.2+e9e02e68b",
52
- "@instructure/quiz-number-input": "^20.36.1-rc.2+e9e02e68b",
53
- "@instructure/quiz-rce": "^20.36.1-rc.2+e9e02e68b",
49
+ "@instructure/quiz-common": "^20.36.1-rc.3+c9b688fb5",
50
+ "@instructure/quiz-i18n": "^20.36.1-rc.3+c9b688fb5",
51
+ "@instructure/quiz-interactions": "^20.36.1-rc.3+c9b688fb5",
52
+ "@instructure/quiz-number-input": "^20.36.1-rc.3+c9b688fb5",
53
+ "@instructure/quiz-rce": "^20.36.1-rc.3+c9b688fb5",
54
54
  "@instructure/ui-a11y-content": "^8.56.3",
55
55
  "@instructure/ui-alerts": "^8.56.3",
56
56
  "@instructure/ui-avatar": "^8.56.3",
@@ -114,7 +114,7 @@
114
114
  "file-saver": "~2.0.5",
115
115
  "humps": "^2.0.0",
116
116
  "immutable": "^3.8.1",
117
- "instructure-validations": "^20.36.1-rc.2+e9e02e68b",
117
+ "instructure-validations": "^20.36.1-rc.3+c9b688fb5",
118
118
  "ipaddr.js": "^1.5.4",
119
119
  "isomorphic-fetch": "^2.2.0",
120
120
  "isuuid": "^0.1.0",
@@ -163,7 +163,7 @@
163
163
  "jquery": "^2.2.3",
164
164
  "karma-junit-reporter": "^2.0.1",
165
165
  "most-subject": "^5.3.0",
166
- "quiz-presets": "^20.36.1-rc.2+e9e02e68b",
166
+ "quiz-presets": "^20.36.1-rc.3+c9b688fb5",
167
167
  "react": "^16.8.6",
168
168
  "react-addons-test-utils": "^15.6.2",
169
169
  "react-dom": "^16.8.6",
@@ -179,5 +179,5 @@
179
179
  "publishConfig": {
180
180
  "access": "public"
181
181
  },
182
- "gitHead": "e9e02e68b7ceac79699136f724fe7298b203dd5b"
182
+ "gitHead": "c9b688fb57c71b74ea4c045c17f11147dc5e0187"
183
183
  }