@instructure/quiz-core 20.7.1-rc.7 → 20.7.1-rc.9

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.
@@ -9,28 +9,28 @@ import t from '@instructure/quiz-i18n/es/format-message';
9
9
  import { Table } from '@instructure/ui-table';
10
10
  import { onlyAggregatePropType } from "../../../propTypes.js";
11
11
  import PropTypes from 'prop-types';
12
- import { IconCheckSolid, IconXSolid, IconNoSolid, IconOvalHalfSolid } from '@instructure/ui-icons';
12
+ import { IconCheckSolid, IconXSolid, IconNoSolid, IconGradebookSolid } from '@instructure/ui-icons';
13
13
  import { themeable } from '@instructure/ui-themeable';
14
14
  import theme from "./theme.js";
15
15
  var styles = {
16
- componentId: 'fSsSV',
16
+ componentId: 'fMmrG',
17
17
  template: function template(theme) {
18
- return "\n\n.fSsSV_cvRx{align-items:center;display:flex;height:100%;justify-content:center;min-height:47px;width:46px}\n\n.fSsSV_fPIL{min-width:500px}\n\n.fSsSV_fPIL table{border-collapse:separate;border-spacing:0 12px}\n\n.fSsSV_fPIL thead th{border-color:".concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}\n\n.fSsSV_fPIL table tbody tr td{border-style:solid;border-width:2px 0 2px 0;width:33.33%}\n\n.fSsSV_fPIL table tbody tr th:first-child{border-radius:4px 0 0 4px;border-style:solid;border-width:2px 0 2px 2px;font-weight:400}\n\n.fSsSV_fPIL table tbody tr td:last-child{border-radius:0 4px 4px 0;border-style:solid;border-width:2px 2px 2px 0}\n\n.fSsSV_dzqP table tbody tr:first-child td,.fSsSV_dzqP table tbody tr:first-child th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_fZpZ table tbody tr:first-child td,.fSsSV_fZpZ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_fZpZ table tbody tr:nth-child(2) td,.fSsSV_fZpZ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_dgTJ table tbody tr:first-child td,.fSsSV_dgTJ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_dgTJ table tbody tr:nth-child(2) td,.fSsSV_dgTJ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_dgTJ table tbody tr:nth-child(3) td,.fSsSV_dgTJ table tbody tr:nth-child(3) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:first-child td,.fSsSV_bUPM table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:nth-child(2) td,.fSsSV_bUPM table tbody tr:nth-child(2) th{border-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:nth-child(3) td,.fSsSV_bUPM table tbody tr:nth-child(3) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:nth-child(4) td,.fSsSV_bUPM table tbody tr:nth-child(4) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_bvau{background-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_cxOH{background-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_eRkO{background-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fSsSV_eKcq{background-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_euQM{padding:12px 0 12px 10px}\n\n.fSsSV_fuuc{padding-left:45px}\n\n.fSsSV_vDgC svg{fill:#fff}\n\n.fSsSV_fHMm{border-color:").concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}");
18
+ return "\n\n.fMmrG_cvRx{align-items:center;display:flex;height:100%;justify-content:center;min-height:47px;width:46px}\n\n.fMmrG_fPIL{min-width:500px}\n\n.fMmrG_fPIL table{border-collapse:separate;border-spacing:0 12px}\n\n.fMmrG_fPIL thead th{border-color:".concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}\n\n.fMmrG_fPIL table tbody tr td{border-style:solid;border-width:2px 0 2px 0;width:33.33%}\n\n.fMmrG_fPIL table tbody tr th:first-child{border-radius:4px 0 0 4px;border-style:solid;border-width:2px 0 2px 2px;font-weight:400}\n\n.fMmrG_fPIL table tbody tr td:last-child{border-radius:0 4px 4px 0;border-style:solid;border-width:2px 2px 2px 0}\n\n.fMmrG_dzqP table tbody tr:first-child td,.fMmrG_dzqP table tbody tr:first-child th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_fZpZ table tbody tr:first-child td,.fMmrG_fZpZ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_fZpZ table tbody tr:nth-child(2) td,.fMmrG_fZpZ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_dgTJ table tbody tr:first-child td,.fMmrG_dgTJ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_dgTJ table tbody tr:nth-child(2) td,.fMmrG_dgTJ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_dgTJ table tbody tr:nth-child(3) td,.fMmrG_dgTJ table tbody tr:nth-child(3) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:first-child td,.fMmrG_bYLj table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:nth-child(2) td,.fMmrG_bYLj table tbody tr:nth-child(2) th{border-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:nth-child(3) td,.fMmrG_bYLj table tbody tr:nth-child(3) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:nth-child(4) td,.fMmrG_bYLj table tbody tr:nth-child(4) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_bvau{background-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_cxOH{background-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_dsqS{background-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fMmrG_eKcq{background-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_euQM{padding:12px 0 12px 10px}\n\n.fMmrG_fuuc{padding-left:45px}\n\n.fMmrG_vDgC svg{fill:#fff}\n\n.fMmrG_fHMm{border-color:").concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}");
19
19
  },
20
- 'iconWrapper': 'fSsSV_cvRx',
21
- 'collapsingTable': 'fSsSV_fPIL',
22
- 'onlyNoanswer': 'fSsSV_dzqP',
23
- 'correctIncorrect': 'fSsSV_fZpZ',
24
- 'correctIncorrectNoanswer': 'fSsSV_dgTJ',
25
- 'correctIncorrectNoanswerPartial': 'fSsSV_bUPM',
26
- 'correctBackground': 'fSsSV_bvau',
27
- 'incorrectBackground': 'fSsSV_cxOH',
28
- 'partialCorrectBackground': 'fSsSV_eRkO',
29
- 'noAnswerBackground': 'fSsSV_eKcq',
30
- 'labelWrapper': 'fSsSV_euQM',
31
- 'firstHeaderCell': 'fSsSV_fuuc',
32
- 'iconWhite': 'fSsSV_vDgC',
33
- 'headerCell': 'fSsSV_fHMm'
20
+ 'iconWrapper': 'fMmrG_cvRx',
21
+ 'collapsingTable': 'fMmrG_fPIL',
22
+ 'onlyNoanswer': 'fMmrG_dzqP',
23
+ 'correctIncorrect': 'fMmrG_fZpZ',
24
+ 'correctIncorrectNoanswer': 'fMmrG_dgTJ',
25
+ 'correctIncorrectNoanswerGraded': 'fMmrG_bYLj',
26
+ 'correctBackground': 'fMmrG_bvau',
27
+ 'incorrectBackground': 'fMmrG_cxOH',
28
+ 'gradedBackground': 'fMmrG_dsqS',
29
+ 'noAnswerBackground': 'fMmrG_eKcq',
30
+ 'labelWrapper': 'fMmrG_euQM',
31
+ 'firstHeaderCell': 'fMmrG_fuuc',
32
+ 'iconWhite': 'fMmrG_vDgC',
33
+ 'headerCell': 'fMmrG_fHMm'
34
34
  };
35
35
  import { Flex } from '@instructure/ui-flex';
36
36
  import classNames from 'classnames';
@@ -40,11 +40,11 @@ import { noAnswerMissing } from "./popoverContent.js";
40
40
  var noAnswerKey = 'noAnswer';
41
41
  var incorrectKey = 'incorrect';
42
42
  var correctKey = 'correct';
43
- var partialCorrectKey = 'partialCorrect';
43
+ var gradedKey = 'graded';
44
44
 
45
45
  var _ref = /*#__PURE__*/React.createElement(IconCheckSolid, null);
46
46
 
47
- var _ref2 = /*#__PURE__*/React.createElement(IconOvalHalfSolid, null);
47
+ var _ref2 = /*#__PURE__*/React.createElement(IconGradebookSolid, null);
48
48
 
49
49
  var _ref3 = /*#__PURE__*/React.createElement(IconXSolid, null);
50
50
 
@@ -122,9 +122,9 @@ export var AggregationTable = (_dec = themeable(theme, styles), _dec(_class = (_
122
122
  }, /*#__PURE__*/React.createElement(Text, null, concatenatedPercentage)));
123
123
  };
124
124
 
125
- _this.partialCorrectExist = function () {
126
- var aggregate = _this.props.answerSummary.aggregate;
127
- return !!(aggregate === null || aggregate === void 0 ? void 0 : aggregate.partial_correct);
125
+ _this.gradedExist = function () {
126
+ var graded = _this.props.answerSummary.graded;
127
+ return !!graded;
128
128
  };
129
129
 
130
130
  _this.correctExist = function () {
@@ -142,24 +142,19 @@ export var AggregationTable = (_dec = themeable(theme, styles), _dec(_class = (_
142
142
  return !!no_answer;
143
143
  };
144
144
 
145
- _this.getCorrectLabel = function () {
146
- return _this.partialCorrectExist() ? t('Fully correct') : t('Correct');
147
- };
148
-
149
145
  _this.renderCorrect = function () {
150
146
  var aggregate = _this.props.answerSummary.aggregate;
151
147
  var correct = aggregate.correct;
152
148
  var correctCount = correct.count || 0;
153
149
  var correctPercentage = correct.percentage || 0;
154
- return _this.renderRow(correctKey, _ref, _this.getCorrectLabel(), correctCount, correctPercentage);
150
+ return _this.renderRow(correctKey, _ref, t('Correct'), correctCount, correctPercentage);
155
151
  };
156
152
 
157
- _this.renderPartialCorrect = function () {
158
- var aggregate = _this.props.answerSummary.aggregate;
159
- var partial_correct = aggregate.partial_correct;
160
- var partialCorrectCount = partial_correct.count || 0;
161
- var partialCorrectPercentage = partial_correct.percentage || 0;
162
- return _this.renderRow(partialCorrectKey, _ref2, t('Partially correct'), partialCorrectCount, partialCorrectPercentage);
153
+ _this.renderGraded = function () {
154
+ var graded = _this.props.answerSummary.graded;
155
+ var gradedCount = graded.count || 0;
156
+ var gradedPercentage = graded.percentage || 0;
157
+ return _this.renderRow(gradedKey, _ref2, t('Graded'), gradedCount, gradedPercentage);
163
158
  };
164
159
 
165
160
  _this.renderIncorrect = function () {
@@ -180,16 +175,16 @@ export var AggregationTable = (_dec = themeable(theme, styles), _dec(_class = (_
180
175
  _this.getColorProfile = function () {
181
176
  var colorProfile;
182
177
 
183
- var correctIncorrectNoAnswerPartial = _this.partialCorrectExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
178
+ var correctIncorrectNoAnswerGraded = _this.gradedExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
184
179
 
185
- var correctIncorrectNoAnswer = !_this.partialCorrectExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
180
+ var correctIncorrectNoAnswer = !_this.gradedExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
186
181
 
187
- var onlyNoAnswer = _this.noAnswerExist() && !_this.partialCorrectExist() && !_this.correctExist() && !_this.incorrectExist();
182
+ var onlyNoAnswer = _this.noAnswerExist() && !_this.gradedExist() && !_this.correctExist() && !_this.incorrectExist();
188
183
 
189
184
  if (correctIncorrectNoAnswer) {
190
185
  colorProfile = 'correctIncorrectNoanswer';
191
- } else if (correctIncorrectNoAnswerPartial) {
192
- colorProfile = 'correctIncorrectNoanswerPartial';
186
+ } else if (correctIncorrectNoAnswerGraded) {
187
+ colorProfile = 'correctIncorrectNoanswerGraded';
193
188
  } else if (onlyNoAnswer) {
194
189
  colorProfile = 'onlyNoanswer';
195
190
  } else {
@@ -205,7 +200,7 @@ export var AggregationTable = (_dec = themeable(theme, styles), _dec(_class = (_
205
200
  className: classNames(styles.collapsingTable, styles[_this.getColorProfile()])
206
201
  }, /*#__PURE__*/React.createElement(Table, {
207
202
  caption: t('Answer Frequency Summary Aggregates')
208
- }, _this.renderHeaderRow(popover), /*#__PURE__*/React.createElement(Table.Body, null, _this.correctExist() && _this.renderCorrect(), _this.partialCorrectExist() && _this.renderPartialCorrect(), _this.incorrectExist() && _this.renderIncorrect(), _this.noAnswerExist() && _this.renderNoAnswer())));
203
+ }, _this.renderHeaderRow(popover), /*#__PURE__*/React.createElement(Table.Body, null, _this.correctExist() && _this.renderCorrect(), _this.gradedExist() && _this.renderGraded(), _this.incorrectExist() && _this.renderIncorrect(), _this.noAnswerExist() && _this.renderNoAnswer())));
209
204
  };
210
205
 
211
206
  return _this;
@@ -32,11 +32,11 @@ export var aggregateDetailPropType = PropTypes.shape({
32
32
  });
33
33
  export var aggregatePropType = PropTypes.shape({
34
34
  correct: aggregateDetailPropType.isRequired,
35
- incorrect: aggregateDetailPropType.isRequired,
36
- partial_correct: aggregateDetailPropType
35
+ incorrect: aggregateDetailPropType.isRequired
37
36
  });
38
37
  export var onlyAggregatePropType = PropTypes.shape({
39
38
  no_answer: aggregateDetailPropType,
39
+ graded: aggregateDetailPropType,
40
40
  aggregate: aggregatePropType
41
41
  });
42
42
  export var choiceTypeObject = PropTypes.shape({
@@ -44,33 +44,33 @@ var _popoverContent = require("./popoverContent.js");
44
44
  var _dec, _class, _class2, _temp;
45
45
 
46
46
  var styles = {
47
- componentId: 'fSsSV',
47
+ componentId: 'fMmrG',
48
48
  template: function template(theme) {
49
- return "\n\n.fSsSV_cvRx{align-items:center;display:flex;height:100%;justify-content:center;min-height:47px;width:46px}\n\n.fSsSV_fPIL{min-width:500px}\n\n.fSsSV_fPIL table{border-collapse:separate;border-spacing:0 12px}\n\n.fSsSV_fPIL thead th{border-color:".concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}\n\n.fSsSV_fPIL table tbody tr td{border-style:solid;border-width:2px 0 2px 0;width:33.33%}\n\n.fSsSV_fPIL table tbody tr th:first-child{border-radius:4px 0 0 4px;border-style:solid;border-width:2px 0 2px 2px;font-weight:400}\n\n.fSsSV_fPIL table tbody tr td:last-child{border-radius:0 4px 4px 0;border-style:solid;border-width:2px 2px 2px 0}\n\n.fSsSV_dzqP table tbody tr:first-child td,.fSsSV_dzqP table tbody tr:first-child th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_fZpZ table tbody tr:first-child td,.fSsSV_fZpZ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_fZpZ table tbody tr:nth-child(2) td,.fSsSV_fZpZ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_dgTJ table tbody tr:first-child td,.fSsSV_dgTJ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_dgTJ table tbody tr:nth-child(2) td,.fSsSV_dgTJ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_dgTJ table tbody tr:nth-child(3) td,.fSsSV_dgTJ table tbody tr:nth-child(3) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:first-child td,.fSsSV_bUPM table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:nth-child(2) td,.fSsSV_bUPM table tbody tr:nth-child(2) th{border-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:nth-child(3) td,.fSsSV_bUPM table tbody tr:nth-child(3) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_bUPM table tbody tr:nth-child(4) td,.fSsSV_bUPM table tbody tr:nth-child(4) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_bvau{background-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fSsSV_cxOH{background-color:").concat(theme.colorRed || 'inherit', "}\n\n.fSsSV_eRkO{background-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fSsSV_eKcq{background-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fSsSV_euQM{padding:12px 0 12px 10px}\n\n.fSsSV_fuuc{padding-left:45px}\n\n.fSsSV_vDgC svg{fill:#fff}\n\n.fSsSV_fHMm{border-color:").concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}");
49
+ return "\n\n.fMmrG_cvRx{align-items:center;display:flex;height:100%;justify-content:center;min-height:47px;width:46px}\n\n.fMmrG_fPIL{min-width:500px}\n\n.fMmrG_fPIL table{border-collapse:separate;border-spacing:0 12px}\n\n.fMmrG_fPIL thead th{border-color:".concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}\n\n.fMmrG_fPIL table tbody tr td{border-style:solid;border-width:2px 0 2px 0;width:33.33%}\n\n.fMmrG_fPIL table tbody tr th:first-child{border-radius:4px 0 0 4px;border-style:solid;border-width:2px 0 2px 2px;font-weight:400}\n\n.fMmrG_fPIL table tbody tr td:last-child{border-radius:0 4px 4px 0;border-style:solid;border-width:2px 2px 2px 0}\n\n.fMmrG_dzqP table tbody tr:first-child td,.fMmrG_dzqP table tbody tr:first-child th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_fZpZ table tbody tr:first-child td,.fMmrG_fZpZ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_fZpZ table tbody tr:nth-child(2) td,.fMmrG_fZpZ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_dgTJ table tbody tr:first-child td,.fMmrG_dgTJ table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_dgTJ table tbody tr:nth-child(2) td,.fMmrG_dgTJ table tbody tr:nth-child(2) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_dgTJ table tbody tr:nth-child(3) td,.fMmrG_dgTJ table tbody tr:nth-child(3) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:first-child td,.fMmrG_bYLj table tbody tr:first-child th{border-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:nth-child(2) td,.fMmrG_bYLj table tbody tr:nth-child(2) th{border-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:nth-child(3) td,.fMmrG_bYLj table tbody tr:nth-child(3) th{border-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_bYLj table tbody tr:nth-child(4) td,.fMmrG_bYLj table tbody tr:nth-child(4) th{border-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_bvau{background-color:").concat(theme.colorGreen || 'inherit', "}\n\n.fMmrG_cxOH{background-color:").concat(theme.colorRed || 'inherit', "}\n\n.fMmrG_dsqS{background-color:").concat(theme.colorBlue || 'inherit', "}\n\n.fMmrG_eKcq{background-color:").concat(theme.colorGrey || 'inherit', "}\n\n.fMmrG_euQM{padding:12px 0 12px 10px}\n\n.fMmrG_fuuc{padding-left:45px}\n\n.fMmrG_vDgC svg{fill:#fff}\n\n.fMmrG_fHMm{border-color:").concat(theme.colorHeaderBottomBorder || 'inherit', ";border-style:solid;border-width:0 0 1px 0}");
50
50
  },
51
- 'iconWrapper': 'fSsSV_cvRx',
52
- 'collapsingTable': 'fSsSV_fPIL',
53
- 'onlyNoanswer': 'fSsSV_dzqP',
54
- 'correctIncorrect': 'fSsSV_fZpZ',
55
- 'correctIncorrectNoanswer': 'fSsSV_dgTJ',
56
- 'correctIncorrectNoanswerPartial': 'fSsSV_bUPM',
57
- 'correctBackground': 'fSsSV_bvau',
58
- 'incorrectBackground': 'fSsSV_cxOH',
59
- 'partialCorrectBackground': 'fSsSV_eRkO',
60
- 'noAnswerBackground': 'fSsSV_eKcq',
61
- 'labelWrapper': 'fSsSV_euQM',
62
- 'firstHeaderCell': 'fSsSV_fuuc',
63
- 'iconWhite': 'fSsSV_vDgC',
64
- 'headerCell': 'fSsSV_fHMm'
51
+ 'iconWrapper': 'fMmrG_cvRx',
52
+ 'collapsingTable': 'fMmrG_fPIL',
53
+ 'onlyNoanswer': 'fMmrG_dzqP',
54
+ 'correctIncorrect': 'fMmrG_fZpZ',
55
+ 'correctIncorrectNoanswer': 'fMmrG_dgTJ',
56
+ 'correctIncorrectNoanswerGraded': 'fMmrG_bYLj',
57
+ 'correctBackground': 'fMmrG_bvau',
58
+ 'incorrectBackground': 'fMmrG_cxOH',
59
+ 'gradedBackground': 'fMmrG_dsqS',
60
+ 'noAnswerBackground': 'fMmrG_eKcq',
61
+ 'labelWrapper': 'fMmrG_euQM',
62
+ 'firstHeaderCell': 'fMmrG_fuuc',
63
+ 'iconWhite': 'fMmrG_vDgC',
64
+ 'headerCell': 'fMmrG_fHMm'
65
65
  };
66
66
  var noAnswerKey = 'noAnswer';
67
67
  var incorrectKey = 'incorrect';
68
68
  var correctKey = 'correct';
69
- var partialCorrectKey = 'partialCorrect';
69
+ var gradedKey = 'graded';
70
70
 
71
71
  var _ref = /*#__PURE__*/_react.default.createElement(_uiIcons.IconCheckSolid, null);
72
72
 
73
- var _ref2 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconOvalHalfSolid, null);
73
+ var _ref2 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconGradebookSolid, null);
74
74
 
75
75
  var _ref3 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconXSolid, null);
76
76
 
@@ -148,9 +148,9 @@ var AggregationTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
148
148
  }, /*#__PURE__*/_react.default.createElement(_uiText.Text, null, concatenatedPercentage)));
149
149
  };
150
150
 
151
- _this.partialCorrectExist = function () {
152
- var aggregate = _this.props.answerSummary.aggregate;
153
- return !!(aggregate === null || aggregate === void 0 ? void 0 : aggregate.partial_correct);
151
+ _this.gradedExist = function () {
152
+ var graded = _this.props.answerSummary.graded;
153
+ return !!graded;
154
154
  };
155
155
 
156
156
  _this.correctExist = function () {
@@ -168,24 +168,19 @@ var AggregationTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
168
168
  return !!no_answer;
169
169
  };
170
170
 
171
- _this.getCorrectLabel = function () {
172
- return _this.partialCorrectExist() ? (0, _formatMessage.default)('Fully correct') : (0, _formatMessage.default)('Correct');
173
- };
174
-
175
171
  _this.renderCorrect = function () {
176
172
  var aggregate = _this.props.answerSummary.aggregate;
177
173
  var correct = aggregate.correct;
178
174
  var correctCount = correct.count || 0;
179
175
  var correctPercentage = correct.percentage || 0;
180
- return _this.renderRow(correctKey, _ref, _this.getCorrectLabel(), correctCount, correctPercentage);
176
+ return _this.renderRow(correctKey, _ref, (0, _formatMessage.default)('Correct'), correctCount, correctPercentage);
181
177
  };
182
178
 
183
- _this.renderPartialCorrect = function () {
184
- var aggregate = _this.props.answerSummary.aggregate;
185
- var partial_correct = aggregate.partial_correct;
186
- var partialCorrectCount = partial_correct.count || 0;
187
- var partialCorrectPercentage = partial_correct.percentage || 0;
188
- return _this.renderRow(partialCorrectKey, _ref2, (0, _formatMessage.default)('Partially correct'), partialCorrectCount, partialCorrectPercentage);
179
+ _this.renderGraded = function () {
180
+ var graded = _this.props.answerSummary.graded;
181
+ var gradedCount = graded.count || 0;
182
+ var gradedPercentage = graded.percentage || 0;
183
+ return _this.renderRow(gradedKey, _ref2, (0, _formatMessage.default)('Graded'), gradedCount, gradedPercentage);
189
184
  };
190
185
 
191
186
  _this.renderIncorrect = function () {
@@ -206,16 +201,16 @@ var AggregationTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
206
201
  _this.getColorProfile = function () {
207
202
  var colorProfile;
208
203
 
209
- var correctIncorrectNoAnswerPartial = _this.partialCorrectExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
204
+ var correctIncorrectNoAnswerGraded = _this.gradedExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
210
205
 
211
- var correctIncorrectNoAnswer = !_this.partialCorrectExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
206
+ var correctIncorrectNoAnswer = !_this.gradedExist() && _this.noAnswerExist() && _this.correctExist() && _this.incorrectExist();
212
207
 
213
- var onlyNoAnswer = _this.noAnswerExist() && !_this.partialCorrectExist() && !_this.correctExist() && !_this.incorrectExist();
208
+ var onlyNoAnswer = _this.noAnswerExist() && !_this.gradedExist() && !_this.correctExist() && !_this.incorrectExist();
214
209
 
215
210
  if (correctIncorrectNoAnswer) {
216
211
  colorProfile = 'correctIncorrectNoanswer';
217
- } else if (correctIncorrectNoAnswerPartial) {
218
- colorProfile = 'correctIncorrectNoanswerPartial';
212
+ } else if (correctIncorrectNoAnswerGraded) {
213
+ colorProfile = 'correctIncorrectNoanswerGraded';
219
214
  } else if (onlyNoAnswer) {
220
215
  colorProfile = 'onlyNoanswer';
221
216
  } else {
@@ -231,7 +226,7 @@ var AggregationTable = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
231
226
  className: (0, _classnames.default)(styles.collapsingTable, styles[_this.getColorProfile()])
232
227
  }, /*#__PURE__*/_react.default.createElement(_uiTable.Table, {
233
228
  caption: (0, _formatMessage.default)('Answer Frequency Summary Aggregates')
234
- }, _this.renderHeaderRow(popover), /*#__PURE__*/_react.default.createElement(_uiTable.Table.Body, null, _this.correctExist() && _this.renderCorrect(), _this.partialCorrectExist() && _this.renderPartialCorrect(), _this.incorrectExist() && _this.renderIncorrect(), _this.noAnswerExist() && _this.renderNoAnswer())));
229
+ }, _this.renderHeaderRow(popover), /*#__PURE__*/_react.default.createElement(_uiTable.Table.Body, null, _this.correctExist() && _this.renderCorrect(), _this.gradedExist() && _this.renderGraded(), _this.incorrectExist() && _this.renderIncorrect(), _this.noAnswerExist() && _this.renderNoAnswer())));
235
230
  };
236
231
 
237
232
  return _this;
@@ -51,14 +51,14 @@ exports.aggregateDetailPropType = aggregateDetailPropType;
51
51
 
52
52
  var aggregatePropType = _propTypes.default.shape({
53
53
  correct: aggregateDetailPropType.isRequired,
54
- incorrect: aggregateDetailPropType.isRequired,
55
- partial_correct: aggregateDetailPropType
54
+ incorrect: aggregateDetailPropType.isRequired
56
55
  });
57
56
 
58
57
  exports.aggregatePropType = aggregatePropType;
59
58
 
60
59
  var onlyAggregatePropType = _propTypes.default.shape({
61
60
  no_answer: aggregateDetailPropType,
61
+ graded: aggregateDetailPropType,
62
62
  aggregate: aggregatePropType
63
63
  });
64
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.7.1-rc.7+4c21df766",
3
+ "version": "20.7.1-rc.9+485a7bc4a",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -44,11 +44,11 @@
44
44
  "@instructure/emotion": "^8.51.0",
45
45
  "@instructure/grading-utils": "^1.0.0",
46
46
  "@instructure/outcomes-ui": "^3.1.0",
47
- "@instructure/quiz-common": "20.7.1-rc.7+4c21df766",
48
- "@instructure/quiz-i18n": "20.7.1-rc.7+4c21df766",
49
- "@instructure/quiz-interactions": "20.7.1-rc.7+4c21df766",
50
- "@instructure/quiz-number-input": "20.7.1-rc.7+4c21df766",
51
- "@instructure/quiz-rce": "20.7.1-rc.7+4c21df766",
47
+ "@instructure/quiz-common": "20.7.1-rc.9+485a7bc4a",
48
+ "@instructure/quiz-i18n": "20.7.1-rc.9+485a7bc4a",
49
+ "@instructure/quiz-interactions": "20.7.1-rc.9+485a7bc4a",
50
+ "@instructure/quiz-number-input": "20.7.1-rc.9+485a7bc4a",
51
+ "@instructure/quiz-rce": "20.7.1-rc.9+485a7bc4a",
52
52
  "@instructure/ui-a11y-content": "^8.51.0",
53
53
  "@instructure/ui-alerts": "^8.51.0",
54
54
  "@instructure/ui-avatar": "^8.51.0",
@@ -112,7 +112,7 @@
112
112
  "file-saver": "~2.0.5",
113
113
  "humps": "^2.0.0",
114
114
  "immutable": "^3.8.1",
115
- "instructure-validations": "20.7.1-rc.7+4c21df766",
115
+ "instructure-validations": "20.7.1-rc.9+485a7bc4a",
116
116
  "ipaddr.js": "^1.5.4",
117
117
  "isomorphic-fetch": "^2.2.0",
118
118
  "isuuid": "^0.1.0",
@@ -163,7 +163,7 @@
163
163
  "intl": "^1.2.4",
164
164
  "jquery": "^2.2.3",
165
165
  "most-subject": "^5.3.0",
166
- "quiz-presets": "20.7.1-rc.7+4c21df766",
166
+ "quiz-presets": "20.7.1-rc.9+485a7bc4a",
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": "4c21df766169812f225024117a853613158c265a"
182
+ "gitHead": "485a7bc4ac9b70e81b3a6bed06476c6c0a499f97"
183
183
  }