@instructure/quiz-core 20.37.1 → 20.38.0

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.
Files changed (91) hide show
  1. package/es/banks/components/BankSearch/presenter.js +1 -2
  2. package/es/building/api/stimuli.js +2 -1
  3. package/es/building/components/resources/DeleteStimulusModal/presenter.js +14 -7
  4. package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +11 -4
  5. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +1 -2
  6. package/es/common/actions/modifications.js +3 -2
  7. package/es/common/components/layout/Page/styles.js +13 -1
  8. package/es/common/components/layout/Page/theme.js +1 -2
  9. package/es/common/components/layout/sidebar/Sidebar/index.js +26 -4
  10. package/es/common/components/layout/sidebar/SidebarItem/presenter.js +13 -7
  11. package/es/common/components/layout/sidebar/Stimulus/presenter.js +14 -7
  12. package/es/common/components/resources/quiz/AddContent/Body/presenter.js +2 -2
  13. package/es/common/components/resources/quiz/instructions/styles.js +5 -2
  14. package/es/common/components/resources/stimulus/Stimulus/presenter.js +3 -2
  15. package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +14 -4
  16. package/es/common/components/resources/stimulus/StimulusEdit/styles.js +1 -5
  17. package/es/common/components/resources/stimulus/StimulusEdit/theme.js +0 -2
  18. package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +46 -29
  19. package/es/common/components/resources/stimulus/StimulusShow/index.js +10 -4
  20. package/es/common/components/resources/stimulus/StimulusShow/styles.js +0 -7
  21. package/es/common/components/resources/stimulus/StimulusShow/theme.js +0 -3
  22. package/es/common/components/shared/InteractionTypes/index.js +4 -1
  23. package/es/common/components/shared/InteractionTypes/presenter.js +38 -15
  24. package/es/common/components/shared/TimeUnitsInput/index.js +9 -8
  25. package/es/common/components/shared/drag_and_drop/dragAndDropUtils.js +3 -0
  26. package/es/common/records/QuizEntry.js +5 -0
  27. package/es/common/reducers/modifications.js +6 -3
  28. package/es/common/util/warningHelpers.js +15 -5
  29. package/es/moderating/components/resources/ModerateTable/presenter.js +1 -2
  30. package/es/moderating/components/sidebar/ModerateTray/presenter.js +1 -2
  31. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +1 -2
  32. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +1 -1
  33. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +1 -2
  34. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +1 -2
  35. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +1 -2
  36. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -2
  37. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +1 -2
  38. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +1 -2
  39. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +1 -2
  40. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +1 -2
  41. package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +1 -2
  42. package/es/reporting/components/resources/ReportCard/index.js +1 -2
  43. package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +1 -2
  44. package/es/reporting/components/resources/common/AnalysisUpdateDate/index.js +1 -1
  45. package/es/taking/api/taking.js +4 -0
  46. package/lib/banks/components/BankSearch/presenter.js +3 -4
  47. package/lib/building/api/stimuli.js +2 -1
  48. package/lib/building/components/resources/DeleteStimulusModal/presenter.js +14 -7
  49. package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +11 -4
  50. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +3 -4
  51. package/lib/common/actions/modifications.js +3 -2
  52. package/lib/common/components/layout/Page/styles.js +13 -1
  53. package/lib/common/components/layout/Page/theme.js +1 -2
  54. package/lib/common/components/layout/sidebar/Sidebar/index.js +25 -3
  55. package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +15 -9
  56. package/lib/common/components/layout/sidebar/Stimulus/presenter.js +16 -9
  57. package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +2 -2
  58. package/lib/common/components/resources/quiz/instructions/styles.js +5 -2
  59. package/lib/common/components/resources/stimulus/Stimulus/presenter.js +3 -2
  60. package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +14 -4
  61. package/lib/common/components/resources/stimulus/StimulusEdit/styles.js +1 -5
  62. package/lib/common/components/resources/stimulus/StimulusEdit/theme.js +0 -2
  63. package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +46 -29
  64. package/lib/common/components/resources/stimulus/StimulusShow/index.js +9 -3
  65. package/lib/common/components/resources/stimulus/StimulusShow/styles.js +0 -7
  66. package/lib/common/components/resources/stimulus/StimulusShow/theme.js +0 -3
  67. package/lib/common/components/shared/InteractionTypes/index.js +4 -1
  68. package/lib/common/components/shared/InteractionTypes/presenter.js +38 -15
  69. package/lib/common/components/shared/TimeUnitsInput/index.js +10 -9
  70. package/lib/common/components/shared/drag_and_drop/dragAndDropUtils.js +3 -0
  71. package/lib/common/records/QuizEntry.js +5 -0
  72. package/lib/common/reducers/modifications.js +6 -3
  73. package/lib/common/util/warningHelpers.js +15 -5
  74. package/lib/moderating/components/resources/ModerateTable/presenter.js +3 -4
  75. package/lib/moderating/components/sidebar/ModerateTray/presenter.js +5 -6
  76. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +6 -7
  77. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +9 -9
  78. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +2 -3
  79. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +5 -6
  80. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +4 -5
  81. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +3 -4
  82. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +3 -4
  83. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +8 -9
  84. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +20 -21
  85. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +9 -10
  86. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +20 -21
  87. package/lib/reporting/components/resources/ReportCard/index.js +1 -2
  88. package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +9 -10
  89. package/lib/reporting/components/resources/common/AnalysisUpdateDate/index.js +2 -2
  90. package/lib/taking/api/taking.js +4 -0
  91. package/package.json +8 -12
@@ -10,13 +10,14 @@ import PropTypes from 'prop-types';
10
10
  import ImmutablePropTypes from 'react-immutable-proptypes';
11
11
  import { IconBankLine } from '@instructure/ui-icons';
12
12
  import { jsx } from '@instructure/emotion';
13
+ import { Text } from '@instructure/ui-text';
13
14
  import StimulusShowInfo from "../StimulusShowInfo/index.js";
14
15
  import ActionButtons from "../../../../../building/components/resources/ActionButtons/index.js";
15
16
  import t from '@instructure/quiz-i18n/es/format-message';
16
17
  import generateStyle from "./styles.js";
17
18
  import generateComponentTheme from "./theme.js";
18
19
  import Overlay from "../../../shared/overlay/index.js";
19
- import { withStyleOverrides } from '@instructure/quiz-common';
20
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
20
21
  var _ref = jsx(IconBankLine, null);
21
22
  export var StimulusShow = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_StimulusShow = /*#__PURE__*/function (_Component) {
22
23
  _inherits(StimulusShow, _Component);
@@ -43,6 +44,7 @@ export var StimulusShow = (_dec = withStyleOverrides(generateStyle, generateComp
43
44
  }, {
44
45
  key: "render",
45
46
  value: function render() {
47
+ var stimulusLabel = this.props.stimulus.passage ? t('Passage') : t('Stimulus');
46
48
  return jsx(Overlay, {
47
49
  onClick: this.switchOnEditing,
48
50
  wrapperStyles: this.props.styles.stimulusWrapper,
@@ -54,9 +56,13 @@ export var StimulusShow = (_dec = withStyleOverrides(generateStyle, generateComp
54
56
  css: this.props.styles.header
55
57
  }, jsx("div", {
56
58
  css: this.props.styles.leftHeader
57
- }, this.renderBankIcon(), jsx("div", {
58
- css: this.props.styles.stimulusLabel
59
- }, t('Stimulus'))), jsx(ActionButtons, {
59
+ }, this.renderBankIcon(), jsx(Flex, {
60
+ margin: "0 x-small"
61
+ }, jsx(Text, {
62
+ size: "small",
63
+ color: "secondary",
64
+ margin: "0 x-small"
65
+ }, stimulusLabel))), jsx(ActionButtons, {
60
66
  connectDragSource: this.props.connectDragSource,
61
67
  displayPosition: this.props.displayPosition,
62
68
  onDelete: this.props.openDeleteStimulusModal,
@@ -16,13 +16,6 @@ var generateStyle = function generateStyle(componentTheme) {
16
16
  display: 'flex',
17
17
  overflow: 'hidden'
18
18
  },
19
- stimulusLabel: {
20
- color: componentTheme.stimulusLabelColor,
21
- fontSize: componentTheme.stimulusLabelFontSize,
22
- margin: "0 ".concat(componentTheme.stimulusLabelMargin),
23
- overflow: 'hidden',
24
- textOverflow: 'ellipsis'
25
- },
26
19
  stimulusContent: {
27
20
  height: '10%0',
28
21
  padding: "".concat(componentTheme.stimulusContentPaddingTop, " ").concat(componentTheme.stimulusContentPaddingLeftRight, " ").concat(componentTheme.stimulusContentPaddingBottom)
@@ -5,9 +5,6 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
5
5
  return {
6
6
  stimulusPadding: spacing.large,
7
7
  headerPadding: spacing.small,
8
- stimulusLabelColor: colors.ash,
9
- stimulusLabelFontSize: typography.fontSizeSmall,
10
- stimulusLabelMargin: spacing.xSmall,
11
8
  stimulusContentPaddingTop: spacing.large,
12
9
  stimulusContentPaddingBottom: spacing.small,
13
10
  stimulusContentPaddingLeftRight: spacing.small
@@ -1,6 +1,9 @@
1
1
  import { connect } from "../../../react-redux.js";
2
2
  import InteractionTypes from "./presenter.js";
3
+ import { featureOn } from "../../../../common/util/featureCheck.js";
3
4
  function mapStateToProps(state) {
4
- return {};
5
+ return {
6
+ allowPassageCreation: featureOn('passage')
7
+ };
5
8
  }
6
9
  export default connect(mapStateToProps)(InteractionTypes);
@@ -32,21 +32,37 @@ export var InteractionTypes = (_dec = withStyleOverrides(generateStyle, generate
32
32
  _this = _super.call.apply(_super, [this].concat(args));
33
33
  _this.renderInteractionTypeButton = function (intType, i) {
34
34
  var onClick, Icon, name, title, automation;
35
- if (intType.name === 'Stimulus') {
36
- onClick = _this.props.addStimulus;
37
- Icon = IconPlusLine;
38
- name = t('Stimulus');
39
- title = t('Add Stimulus');
40
- automation = 'sdk-interaction-button-stimulus';
41
- } else {
42
- onClick = partial(_this.props.addItem, intType);
43
- var metadata = interactionTypeMetadata(intType);
44
- Icon = metadata.icon;
45
- name = metadata.name;
46
- title = t('Add {name} Question', {
47
- name: name
48
- });
49
- automation = "sdk-interaction-button-".concat(intType.slug);
35
+ switch (intType.name) {
36
+ case 'Stimulus':
37
+ onClick = function onClick() {
38
+ return _this.props.addStimulus(false);
39
+ };
40
+ Icon = IconPlusLine;
41
+ name = t('Stimulus');
42
+ title = t('Add Stimulus');
43
+ automation = 'sdk-interaction-button-stimulus';
44
+ break;
45
+ case 'Passage':
46
+ onClick = function onClick() {
47
+ return _this.props.addStimulus(true);
48
+ };
49
+ Icon = IconPlusLine;
50
+ name = t('Passage');
51
+ title = t('Add Passage');
52
+ automation = 'sdk-interaction-button-passage';
53
+ break;
54
+ default:
55
+ {
56
+ onClick = partial(_this.props.addItem, intType);
57
+ var metadata = interactionTypeMetadata(intType);
58
+ Icon = metadata.icon;
59
+ name = metadata.name;
60
+ title = t('Add {name} Question', {
61
+ name: name
62
+ });
63
+ automation = "sdk-interaction-button-".concat(intType.slug);
64
+ break;
65
+ }
50
66
  }
51
67
  return jsx(Button, {
52
68
  key: intType.slug,
@@ -116,6 +132,12 @@ export var InteractionTypes = (_dec = withStyleOverrides(generateStyle, generate
116
132
  }, _this.renderInteractionTypeButton({
117
133
  name: 'Stimulus',
118
134
  slug: 'stimulus'
135
+ })), _this.props.allowPassageCreation && jsx(Grid.Col, {
136
+ width: 12 / _this.props.columns,
137
+ key: "passage"
138
+ }, _this.renderInteractionTypeButton({
139
+ name: 'Passage',
140
+ slug: 'passage'
119
141
  })));
120
142
  return [dividerRow, stimulusRow];
121
143
  }
@@ -139,6 +161,7 @@ export var InteractionTypes = (_dec = withStyleOverrides(generateStyle, generate
139
161
  addItem: PropTypes.func.isRequired,
140
162
  addStimulus: PropTypes.func.isRequired,
141
163
  allowStimulusCreation: PropTypes.bool,
164
+ allowPassageCreation: PropTypes.bool,
142
165
  types: ImmutablePropTypes.list,
143
166
  styles: PropTypes.object
144
167
  }, _InteractionTypes.defaultProps = {
@@ -4,10 +4,9 @@ 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 { FormFieldGroup } from '@instructure/ui-form-field';
7
+ import { FormFieldGroup } from '@instructure/quiz-common';
8
8
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
9
9
  import { View } from '@instructure/ui-view';
10
- import Errors from "../../../../common/components/shared/errors/Errors.js";
11
10
  import { List } from 'immutable';
12
11
  import { breakdownSeconds, DAY_IN_SECONDS, HOUR_IN_SECONDS, MINUTE_IN_SECONDS } from "../FormattedDuration/index.js";
13
12
  import t from '@instructure/quiz-i18n/es/format-message';
@@ -170,7 +169,12 @@ export var TimeUnitsInput = /*#__PURE__*/function (_Component) {
170
169
  daysError && errorArray.push(daysError);
171
170
  hoursError && errorArray.push(hoursError);
172
171
  minutesError && errorArray.push(minutesError);
173
- return List(errorArray);
172
+ return errorArray.map(function (error) {
173
+ return {
174
+ type: 'error',
175
+ text: error
176
+ };
177
+ });
174
178
  };
175
179
  return _this;
176
180
  }
@@ -241,7 +245,8 @@ export var TimeUnitsInput = /*#__PURE__*/function (_Component) {
241
245
  description: /*#__PURE__*/React.createElement(ScreenReaderContent, null, this.props.description),
242
246
  layout: "columns",
243
247
  vAlign: "top",
244
- startAt: "small"
248
+ startAt: "small",
249
+ messages: this.getErrorList()
245
250
  }, this.props.includeDays && /*#__PURE__*/React.createElement(NumberInput, {
246
251
  renderLabel: this.props.daysLabel,
247
252
  min: 0,
@@ -274,10 +279,6 @@ export var TimeUnitsInput = /*#__PURE__*/function (_Component) {
274
279
  }] : null,
275
280
  "data-automation": this.props.minutesDataAutomation,
276
281
  width: this.props.inputWidth
277
- })), /*#__PURE__*/React.createElement(View, {
278
- display: "block"
279
- }, /*#__PURE__*/React.createElement(Errors, {
280
- errorList: this.getErrorList()
281
282
  })));
282
283
  }
283
284
  }]);
@@ -30,6 +30,9 @@ export var posObjFromQuizEntry = cachePreviousArgs(function (quizEntryDragging,
30
30
  // handle dragging items over stimulus
31
31
  if (!quizEntryDragging.hasStimulus && quizEntryHovered.hasStimulus && (onRightHalf || inSidebar)) {
32
32
  if (deepInsideEntry && quizEntryHovered.getNestedEntries().size === 0) {
33
+ if (quizEntryHovered.isPassage) {
34
+ return null;
35
+ }
33
36
  newPositionObj.intoEmptyStimulus = true;
34
37
  return newPositionObj;
35
38
  } else if (deepInsideEntry) {
@@ -357,6 +357,11 @@ export var QuizEntry = (_dec = withStateCache(function () {
357
357
  get: function get() {
358
358
  return this.entryType === 'Stimulus';
359
359
  }
360
+ }, {
361
+ key: "isPassage",
362
+ get: function get() {
363
+ return Boolean(this.isStimulus && this.getEntry() && this.getEntry().passage);
364
+ }
360
365
  }, {
361
366
  key: "isItem",
362
367
  get: function get() {
@@ -73,9 +73,12 @@ export default (function () {
73
73
  quizEntries: [TEMPORARY_QUIZ_ENTRY_ID]
74
74
  };
75
75
  var stateWithStimulusQuizMods = updateObjectOfType(state, action.payload.quizId, stimulusQuizMods, 'quizzes');
76
- var tempStimulus = new Stimulus({
77
- id: TEMPORARY_STIMULUS_ID
78
- }).toJS();
76
+ var tempStimulus = new Stimulus(_objectSpread({
77
+ id: TEMPORARY_STIMULUS_ID,
78
+ passage: action.payload.isPassage
79
+ }, action.payload.isPassage && {
80
+ orientation: 'top'
81
+ })).toJS();
79
82
  var stateWithStimulusMods = updateObjectOfType(stateWithStimulusQuizMods, TEMPORARY_STIMULUS_ID, tempStimulus, 'stimuli');
80
83
  var stimulusPosition = action.payload.position === 0 ? 0.9 : action.payload.position - 0.1;
81
84
  var stimulusQuizEntryMods = {
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import partial from 'lodash/partial';
3
3
  import { Text } from '@instructure/ui-text';
4
+ import { View } from '@instructure/ui-view';
4
5
  import t from '@instructure/quiz-i18n/es/format-message';
5
6
  var propsForVersioningWrapper = function propsForVersioningWrapper(copyDescription, immutableDescription, isImmutable, shouldClone, setShouldClone, switchOffEditing, isEditing) {
6
7
  var alertType = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : 'warning';
@@ -82,12 +83,21 @@ export var propsForItemBankEntryEditPrompt = function propsForItemBankEntryEditP
82
83
  }, /*#__PURE__*/React.createElement("b", null, t('Banked Item.')), "\xA0", t('Some options and the points value can be changed here but editing must take place within the bank.'))]));
83
84
  };
84
85
  export var propsForStimulusBankEntryEditPrompt = function propsForStimulusBankEntryEditPrompt() {
85
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
86
- args[_key5] = arguments[_key5];
87
- }
88
- return propsForBankEntryEditPrompt.apply(void 0, args.concat([/*#__PURE__*/React.createElement(Text, {
86
+ var isPassage = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
87
+ var title = isPassage ? t('Banked Passage.') : t('Banked Stimulus.');
88
+ var content = isPassage ? t('Editing of this passage must take place within the bank.') : t('Editing of this stimulus must take place within the bank.');
89
+ var promptComponent = /*#__PURE__*/React.createElement(View, {
90
+ as: "div",
89
91
  "data-automation": "sdk-editInBanks-warning"
90
- }, /*#__PURE__*/React.createElement("b", null, t('Banked Stimulus.')), "\xA0", t('Editing of this stimulus must take place within the bank.'))]));
92
+ }, /*#__PURE__*/React.createElement(Text, {
93
+ weight: "bold"
94
+ }, title), /*#__PURE__*/React.createElement(View, {
95
+ margin: "0 0 0 xx-small"
96
+ }, /*#__PURE__*/React.createElement(Text, null, content)));
97
+ for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
98
+ args[_key5 - 1] = arguments[_key5];
99
+ }
100
+ return propsForBankEntryEditPrompt.apply(void 0, args.concat([promptComponent]));
91
101
  };
92
102
  export var propsForBankEntryUnauthorizedEdit = function propsForBankEntryUnauthorizedEdit(isEditing) {
93
103
  if (!isEditing) return {
@@ -11,7 +11,6 @@ import PropTypes from 'prop-types';
11
11
  import ImmutablePropTypes from 'react-immutable-proptypes';
12
12
  import { Text } from '@instructure/ui-text';
13
13
  import { Link } from '@instructure/ui-link';
14
- import { Flex } from '@instructure/ui-flex';
15
14
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
16
15
  import { Table } from '@instructure/ui-table';
17
16
  import { IconButton } from '@instructure/ui-buttons';
@@ -26,7 +25,7 @@ import Spinner from "../../../../common/components/shared/spinner/Spinner.js";
26
25
  import generateStyle from "./styles.js";
27
26
  import generateComponentTheme from "./theme.js";
28
27
  import ResetQuiz from "../../sidebar/ResetQuiz/index.js";
29
- import { OUTSTANDING_QUIZZES_MODAL, withStyleOverrides } from '@instructure/quiz-common';
28
+ import { Flex, OUTSTANDING_QUIZZES_MODAL, withStyleOverrides } from '@instructure/quiz-common';
30
29
  import { chunk } from 'lodash';
31
30
  var _ref2 = jsx(Flex.Item, null, jsx(IconInfoLine, null));
32
31
  var _ref4 = jsx(IconConfigureLine, null);
@@ -5,7 +5,6 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React, { Component } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import t from '@instructure/quiz-i18n/es/format-message';
8
- import { Flex } from '@instructure/ui-flex';
9
8
  import { View } from '@instructure/ui-view';
10
9
  import { Text } from '@instructure/ui-text';
11
10
  import { Heading } from '@instructure/ui-heading';
@@ -14,7 +13,7 @@ import { Tray } from '@instructure/ui-tray';
14
13
  import { Button, CloseButton } from '@instructure/ui-buttons';
15
14
  import { TruncateText } from '@instructure/ui-truncate-text';
16
15
  import { Modal } from '@instructure/ui-modal';
17
- import { liveRegion } from '@instructure/quiz-common';
16
+ import { Flex, liveRegion } from '@instructure/quiz-common';
18
17
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
19
18
  export var ModerateTray = /*#__PURE__*/function (_Component) {
20
19
  _inherits(ModerateTray, _Component);
@@ -5,7 +5,6 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  var _dec, _class, _MatchingTypeTable;
6
6
  /** @jsx jsx */
7
7
  import { Component } from 'react';
8
- import { Flex } from '@instructure/ui-flex';
9
8
  import generateStyle from "./styles.js";
10
9
  import t from '@instructure/quiz-i18n/es/format-message';
11
10
  import { Table } from '@instructure/ui-table';
@@ -17,7 +16,7 @@ import MatchingTypeOrderer from "../utils/matchingTypeOrderer.js";
17
16
  import { extractTextFromHtml } from '@instructure/quiz-interactions';
18
17
  import generateComponentTheme from "./theme.js";
19
18
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
20
- import { withStyleOverrides } from '@instructure/quiz-common';
19
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
21
20
  var _ref = jsx(IconCheckSolid, null);
22
21
  var _ref2 = jsx(Flex.Item, {
23
22
  width: "46px",
@@ -4,7 +4,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
4
4
  import React, { Component } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { choiceTypeObject } from "../../../../common/propTypes.js";
7
- import { Flex } from '@instructure/ui-flex';
7
+ import { Flex } from '@instructure/quiz-common';
8
8
  import ChoiceTypeTable from "../../shared/ChoiceTypeTable/index.js";
9
9
  import { Text } from '@instructure/ui-text';
10
10
  import t from '@instructure/quiz-i18n/es/format-message';
@@ -16,9 +16,8 @@ import { jsx } from '@instructure/emotion';
16
16
  import ChoiceTypeWithInfo from "./ChoiceTypeWithInfo/index.js";
17
17
  import generateStyle from "./styles.js";
18
18
  import generateComponentTheme from "./theme.js";
19
- import { Flex } from '@instructure/ui-flex';
20
19
  import { numericTypeAnswerSummaryPropType } from "../../../common/propTypes.js";
21
- import { withStyleOverrides } from '@instructure/quiz-common';
20
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
22
21
  export var NumericType = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_NumericType = /*#__PURE__*/function (_Component) {
23
22
  _inherits(NumericType, _Component);
24
23
  var _super = _createSuper(NumericType);
@@ -6,7 +6,6 @@ var _dec, _class, _ChoiceGroupTypeTable;
6
6
  import { Component } from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { choiceTypeObject } from "../../../../common/propTypes.js";
9
- import { Flex } from '@instructure/ui-flex';
10
9
  import { Text } from '@instructure/ui-text';
11
10
  import t from '@instructure/quiz-i18n/es/format-message';
12
11
  import ChoiceTypeTable from "../../shared/ChoiceTypeTable/index.js";
@@ -15,7 +14,7 @@ import { jsx } from '@instructure/emotion';
15
14
  import generateStyle from "./styles.js";
16
15
  import generateComponentTheme from "./theme.js";
17
16
  import ExpandableCard from "../../shared/ExpandableCard/index.js";
18
- import { withStyleOverrides } from '@instructure/quiz-common';
17
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
19
18
  export var ChoiceGroupTypeTable = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_ChoiceGroupTypeTable = /*#__PURE__*/function (_Component) {
20
19
  _inherits(ChoiceGroupTypeTable, _Component);
21
20
  var _super = _createSuper(ChoiceGroupTypeTable);
@@ -5,14 +5,13 @@ var _dec, _class, _AfsTableWrapper;
5
5
  /** @jsx jsx */
6
6
  import { Component } from 'react';
7
7
  import t from '@instructure/quiz-i18n/es/format-message';
8
- import { Flex } from '@instructure/ui-flex';
9
8
  import { Heading } from '@instructure/ui-heading';
10
9
  import { jsx } from '@instructure/emotion';
11
10
  import generateStyle from "./styles.js";
12
11
  import PropTypes from 'prop-types';
13
12
  import { noAnswerMissing } from "./popoverContent.js";
14
13
  import MetricPopover from "../../../MetricPopover/index.js";
15
- import { withStyleOverrides } from '@instructure/quiz-common';
14
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
16
15
  export var AfsTableWrapper = (_dec = withStyleOverrides(generateStyle, null), _dec(_class = (_AfsTableWrapper = /*#__PURE__*/function (_Component) {
17
16
  _inherits(AfsTableWrapper, _Component);
18
17
  var _super = _createSuper(AfsTableWrapper);
@@ -12,9 +12,8 @@ import { IconCheckSolid, IconXSolid, IconNoSolid, IconGradebookSolid } from '@in
12
12
  import { jsx } from '@instructure/emotion';
13
13
  import generateComponentTheme from "./theme.js";
14
14
  import generateStyle from "./styles.js";
15
- import { Flex } from '@instructure/ui-flex';
16
15
  import { Text } from '@instructure/ui-text';
17
- import { withStyleOverrides } from '@instructure/quiz-common';
16
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
18
17
  var noAnswerKey = 'noAnswer';
19
18
  var incorrectKey = 'incorrect';
20
19
  var correctKey = 'correct';
@@ -16,9 +16,8 @@ import generateStyle from "./styles.js";
16
16
  import generateComponentTheme from "./theme.js";
17
17
  import { IconCheckSolid, IconXSolid } from '@instructure/ui-icons';
18
18
  import { extractTextFromHtml } from '@instructure/quiz-interactions';
19
- import { Flex } from '@instructure/ui-flex';
20
19
  import { Text } from '@instructure/ui-text';
21
- import { withStyleOverrides } from '@instructure/quiz-common';
20
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
22
21
  var correctAttribute = 'correct';
23
22
  var incorrectAttribute = 'incorrect';
24
23
  var _ref = jsx(IconCheckSolid, null);
@@ -5,14 +5,13 @@ var _dec, _class, _ExpandableCard;
5
5
  /** @jsx jsx */
6
6
  import { Component } from 'react';
7
7
  import Card from "../../../../../../../common/components/shared/Card/index.js";
8
- import { Flex } from '@instructure/ui-flex';
9
8
  import { jsx } from '@instructure/emotion';
10
9
  import ExpandButton from "../../../../../../../common/components/shared/ExpandButton/index.js";
11
10
  import t from '@instructure/quiz-i18n/es/format-message';
12
11
  import generateStyle from "./styles.js";
13
12
  import generateComponentTheme from "./theme.js";
14
13
  import PropTypes from 'prop-types';
15
- import { withStyleOverrides } from '@instructure/quiz-common';
14
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
16
15
  export var ExpandableCard = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_ExpandableCard = /*#__PURE__*/function (_Component) {
17
16
  _inherits(ExpandableCard, _Component);
18
17
  var _super = _createSuper(ExpandableCard);
@@ -21,10 +21,9 @@ import AnalysisPopoverMetric from "../AnalysisPopoverMetric/index.js";
21
21
  import { interactionTypesNameDictionary } from "../../../../../common/util/interactionTypeMetadata.js";
22
22
  import AnswerFrequencySummary from "../AnswerFrequencySummary/index.js";
23
23
  import { afsFlags, itemAnalysisPropType } from "../../common/propTypes.js";
24
- import { Flex } from '@instructure/ui-flex';
25
24
  import { RichContentRenderer } from '@instructure/quiz-rce';
26
25
  import { ensureRCEContentIsLoaded } from "../../../../../common/util/rceChecker.js";
27
- import { RICH_FILL_BLANK_SLUG, withStyleOverrides } from '@instructure/quiz-common';
26
+ import { Flex, RICH_FILL_BLANK_SLUG, withStyleOverrides } from '@instructure/quiz-common';
28
27
  var parser = new DOMParser();
29
28
  var parsererrorElement = 'parsererror';
30
29
  var parseType = 'text/html';
@@ -9,7 +9,6 @@ import PropTypes from 'prop-types';
9
9
  import t from '@instructure/quiz-i18n/es/format-message';
10
10
  import { Text } from '@instructure/ui-text';
11
11
  import { Link } from '@instructure/ui-link';
12
- import { Flex } from '@instructure/ui-flex';
13
12
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
14
13
  import { jsx } from '@instructure/emotion';
15
14
  import Card from "../../../../../common/components/shared/Card/index.js";
@@ -21,7 +20,7 @@ import { AnalysisUpdateDate } from "../../common/AnalysisUpdateDate/index.js";
21
20
  import { itemAnalysisPropType, quizAnalysisPropType } from "../../common/propTypes.js";
22
21
  import { csvFormat } from "../exportFormats.js";
23
22
  import { ExportButton } from "../ExportButton/index.js";
24
- import { withStyleOverrides } from '@instructure/quiz-common';
23
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
25
24
  export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_NewQuizAndItemAnalysisReportCardPresenter = /*#__PURE__*/function (_Component) {
26
25
  _inherits(NewQuizAndItemAnalysisReportCardPresenter, _Component);
27
26
  var _super = _createSuper(NewQuizAndItemAnalysisReportCardPresenter);
@@ -9,7 +9,6 @@ import { Heading } from '@instructure/ui-heading';
9
9
  import NewItemAnalysis from "./NewItemAnalysis/index.js";
10
10
  import NewQuizAnalysis from "./NewQuizAnalysis/index.js";
11
11
  import t from '@instructure/quiz-i18n/es/format-message';
12
- import { Flex } from '@instructure/ui-flex';
13
12
  import { AnalysisUpdateDate } from "../common/AnalysisUpdateDate/index.js";
14
13
  import { itemAnalysisPropType, quizAnalysisPropType } from "../common/propTypes.js";
15
14
  import PropTypes from 'prop-types';
@@ -26,7 +25,7 @@ import { ExportButton } from "./ExportButton/index.js";
26
25
  import { jsx } from '@instructure/emotion';
27
26
  import generateStyle from "./styles.js";
28
27
  import generateComponentTheme from "./theme.js";
29
- import { withStyleOverrides } from '@instructure/quiz-common';
28
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
30
29
  var _ref = jsx(Flex.Item, {
31
30
  align: "center"
32
31
  }, jsx(PresentationContent, null, jsx(Img, {
@@ -12,9 +12,8 @@ import { jsx } from '@instructure/emotion';
12
12
  import Card from "../../../../common/components/shared/Card/index.js";
13
13
  import generateStyle from "./styles.js";
14
14
  import generateComponentTheme from "./theme.js";
15
- import { Flex } from '@instructure/ui-flex';
16
15
  import t from '@instructure/quiz-i18n/es/format-message';
17
- import { withStyleOverrides } from '@instructure/quiz-common';
16
+ import { Flex, withStyleOverrides } from '@instructure/quiz-common';
18
17
  export var ReportCard = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_ReportCard = /*#__PURE__*/function (_Component) {
19
18
  _inherits(ReportCard, _Component);
20
19
  var _super = _createSuper(ReportCard);
@@ -6,7 +6,6 @@ var _dec, _class, _StudentAnalysisReportCardPresenter;
6
6
  import React, { Component } from 'react';
7
7
  import { Text } from '@instructure/ui-text';
8
8
  import { Link } from '@instructure/ui-link';
9
- import { Flex } from '@instructure/ui-flex';
10
9
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
11
10
  import t from '@instructure/quiz-i18n/es/format-message';
12
11
  import Card from "../../../../../common/components/shared/Card/index.js";
@@ -14,7 +13,7 @@ import { generateStyle } from "./styles.js";
14
13
  import { generateComponentTheme } from "./theme.js";
15
14
  import { ExportButton } from "../../common/ExportButton/index.js";
16
15
  import Spinner from "../../../../../common/components/shared/spinner/Spinner.js";
17
- import { STUDENT_ANALYSES, withStyleOverrides } from '@instructure/quiz-common';
16
+ import { Flex, STUDENT_ANALYSES, withStyleOverrides } from '@instructure/quiz-common';
18
17
  import { AnalysisUpdateDate } from "../../common/AnalysisUpdateDate/index.js";
19
18
  export var StudentAnalysisReportCardPresenter = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_StudentAnalysisReportCardPresenter = /*#__PURE__*/function (_Component) {
20
19
  _inherits(StudentAnalysisReportCardPresenter, _Component);
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
7
7
  import t from '@instructure/quiz-i18n/es/format-message';
8
8
  import { displayDateAndTimeInTimezone } from "../../../../../common/util/formatTimespan.js";
9
9
  import { Text } from '@instructure/ui-text';
10
- import { Flex } from '@instructure/ui-flex';
10
+ import { Flex } from '@instructure/quiz-common';
11
11
  export var AnalysisUpdateDate = /*#__PURE__*/function (_Component) {
12
12
  _inherits(AnalysisUpdateDate, _Component);
13
13
  var _super = _createSuper(AnalysisUpdateDate);
@@ -181,6 +181,10 @@ var __getResponseForSessionItem = function __getResponseForSessionItem(sessionIt
181
181
  var __remainingQuestionPositions = function __remainingQuestionPositions(sessionItems, responses) {
182
182
  return sessionItems.toList().sortBy(function (si) {
183
183
  return si.get('position');
184
+ }).filterNot(function (si) {
185
+ var item = si.get('item');
186
+ var interactionType = item.get('interactionType');
187
+ return typeof interactionType === 'undefined' || interactionType === 'no-interaction';
184
188
  }).filterNot(function (si) {
185
189
  var item = new Item(si.get('item'));
186
190
  var itemUserResponse = __getResponseForSessionItem(si, responses);
@@ -17,7 +17,6 @@ var _uiIcons = require("@instructure/ui-icons");
17
17
  var _uiButtons = require("@instructure/ui-buttons");
18
18
  var _uiCheckbox = require("@instructure/ui-checkbox");
19
19
  var _uiView = require("@instructure/ui-view");
20
- var _uiFlex = require("@instructure/ui-flex");
21
20
  var _uiText = require("@instructure/ui-text");
22
21
  var _uiA11yContent = require("@instructure/ui-a11y-content");
23
22
  var _emotion = require("@instructure/emotion");
@@ -139,9 +138,9 @@ var BankSearch = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _t
139
138
  var _this$props2 = this.props,
140
139
  showFilters = _this$props2.showFilters,
141
140
  toggleFilters = _this$props2.toggleFilters;
142
- return (0, _emotion.jsx)("div", null, (0, _emotion.jsx)(_uiFlex.Flex, {
141
+ return (0, _emotion.jsx)("div", null, (0, _emotion.jsx)(_quizCommon.Flex, {
143
142
  as: "div"
144
- }, (0, _emotion.jsx)(_uiFlex.Flex.Item, {
143
+ }, (0, _emotion.jsx)(_quizCommon.Flex.Item, {
145
144
  shouldGrow: true,
146
145
  shouldShrink: true
147
146
  }, (0, _emotion.jsx)(_quizCommon.TextInput, {
@@ -151,7 +150,7 @@ var BankSearch = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _t
151
150
  onChange: this.updateSearch,
152
151
  value: this.props.search.get('text', '') || '',
153
152
  "data-automation": "sdk-bank-search-input"
154
- })), (0, _emotion.jsx)(_uiFlex.Flex.Item, null, (0, _emotion.jsx)(_uiButtons.Button, {
153
+ })), (0, _emotion.jsx)(_quizCommon.Flex.Item, null, (0, _emotion.jsx)(_uiButtons.Button, {
155
154
  onClick: toggleFilters,
156
155
  margin: "none none none small",
157
156
  renderIcon: _uiIcons.IconPlusLine,
@@ -28,7 +28,8 @@ function createStimulus(stimulus, parentId, parentType) {
28
28
  parent_stimulus_id: parentStimulusId,
29
29
  source_url: stimulus.sourceUrl,
30
30
  stimulus_type: stimulus.stimulusType,
31
- title: stimulus.title
31
+ title: stimulus.title,
32
+ passage: stimulus.passage
32
33
  };
33
34
  var requestBody = JSON.stringify({
34
35
  stimulus: stimulusParams