@instructure/quiz-core 18.3.1-rc.14 → 18.3.1-rc.16

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.
@@ -157,8 +157,9 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
157
157
  var _this$props3 = this.props,
158
158
  fetchInProgress = _this$props3.fetchInProgress,
159
159
  name = _this$props3.name,
160
- quizAnalysis = _this$props3.quizAnalysis;
161
- var reportCardStyles = classnames(styles.reportCard, _defineProperty({}, styles.emptyReportCard, !quizAnalysis));
160
+ quizAnalysis = _this$props3.quizAnalysis,
161
+ analysisError = _this$props3.analysisError;
162
+ var reportCardStyles = classnames(styles.reportCard, _defineProperty({}, styles.emptyReportCard, !quizAnalysis && !analysisError));
162
163
  return /*#__PURE__*/React.createElement(Card, {
163
164
  className: reportCardStyles
164
165
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,11 +1,13 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import { getReportGenerationFailure, getInsufficentSubmissionNumberError, getOngoingReportGenerationError } from "./errorMessages.js";
2
+ import { getReportGenerationFailure, getInsufficentSubmissionNumberError, getOngoingReportGenerationError, getMinimumThreeGradedSubmissionError, getNotEnoughDataAvailableError } from "./errorMessages.js";
3
3
  import { DEFAULT_ALERT_TIME } from '@instructure/quiz-common';
4
4
  export var INSUFFICIENT_NUMBER_OF_SESSIONS = 'INSUFFICIENT_NUMBER_OF_SESSIONS';
5
5
  export var ANALYSIS_GENERATION_IN_PROGRESS = 'ANALYSIS_GENERATION_IN_PROGRESS';
6
6
  export var GENERAL_ANALYSIS_ERROR = 'GENERAL_ANALYSIS_ERROR';
7
+ export var NOT_ENOUGH_FULLY_GRADED_SUBMISSION = 'NOT_ENOUGH_FULLY_GRADED_SUBMISSION';
8
+ export var NOT_ENOUGH_FULLY_GRADED_QUESTION = 'NOT_ENOUGH_FULLY_GRADED_QUESTION';
7
9
  var requestTimeErrorCodes = new Map().set(INSUFFICIENT_NUMBER_OF_SESSIONS, getInsufficentSubmissionNumberError()).set(ANALYSIS_GENERATION_IN_PROGRESS, getOngoingReportGenerationError()).set(GENERAL_ANALYSIS_ERROR, getReportGenerationFailure());
8
- var jobTimeErrorCodes = new Map();
10
+ var jobTimeErrorCodes = new Map().set(NOT_ENOUGH_FULLY_GRADED_SUBMISSION, getMinimumThreeGradedSubmissionError()).set(NOT_ENOUGH_FULLY_GRADED_QUESTION, getNotEnoughDataAvailableError());
9
11
  var errorCodesToMessages = new Map([].concat(_toConsumableArray(requestTimeErrorCodes), _toConsumableArray(jobTimeErrorCodes)));
10
12
  export var getErrorMessageForCode = function getErrorMessageForCode(code) {
11
13
  var defaultMsg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
@@ -13,4 +13,10 @@ export var getInsufficentSubmissionNumberError = function getInsufficentSubmissi
13
13
  };
14
14
  export var getOngoingReportGenerationError = function getOngoingReportGenerationError() {
15
15
  return t('A report for this quiz is currently being generated by another user. Please try again later.');
16
+ };
17
+ export var getMinimumThreeGradedSubmissionError = function getMinimumThreeGradedSubmissionError() {
18
+ return t('There is not enough data available to generate this report. A minimum of 3 fully graded submissions is required to generate. Please try again when more submissions are graded.');
19
+ };
20
+ export var getNotEnoughDataAvailableError = function getNotEnoughDataAvailableError() {
21
+ return t('There is not enough data available to generate this report. Please try again when more submissions are graded.');
16
22
  };
@@ -187,8 +187,9 @@ var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeab
187
187
  var _this$props3 = this.props,
188
188
  fetchInProgress = _this$props3.fetchInProgress,
189
189
  name = _this$props3.name,
190
- quizAnalysis = _this$props3.quizAnalysis;
191
- var reportCardStyles = (0, _classnames2.default)(styles.reportCard, (0, _defineProperty2.default)({}, styles.emptyReportCard, !quizAnalysis));
190
+ quizAnalysis = _this$props3.quizAnalysis,
191
+ analysisError = _this$props3.analysisError;
192
+ var reportCardStyles = (0, _classnames2.default)(styles.reportCard, (0, _defineProperty2.default)({}, styles.emptyReportCard, !quizAnalysis && !analysisError));
192
193
  return /*#__PURE__*/_react.default.createElement(_index.default, {
193
194
  className: reportCardStyles
194
195
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.getAlertTimeoutMsForCode = exports.getErrorMessageForCode = exports.GENERAL_ANALYSIS_ERROR = exports.ANALYSIS_GENERATION_IN_PROGRESS = exports.INSUFFICIENT_NUMBER_OF_SESSIONS = void 0;
8
+ exports.getAlertTimeoutMsForCode = exports.getErrorMessageForCode = exports.NOT_ENOUGH_FULLY_GRADED_QUESTION = exports.NOT_ENOUGH_FULLY_GRADED_SUBMISSION = exports.GENERAL_ANALYSIS_ERROR = exports.ANALYSIS_GENERATION_IN_PROGRESS = exports.INSUFFICIENT_NUMBER_OF_SESSIONS = void 0;
9
9
 
10
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
11
 
@@ -19,8 +19,12 @@ var ANALYSIS_GENERATION_IN_PROGRESS = 'ANALYSIS_GENERATION_IN_PROGRESS';
19
19
  exports.ANALYSIS_GENERATION_IN_PROGRESS = ANALYSIS_GENERATION_IN_PROGRESS;
20
20
  var GENERAL_ANALYSIS_ERROR = 'GENERAL_ANALYSIS_ERROR';
21
21
  exports.GENERAL_ANALYSIS_ERROR = GENERAL_ANALYSIS_ERROR;
22
+ var NOT_ENOUGH_FULLY_GRADED_SUBMISSION = 'NOT_ENOUGH_FULLY_GRADED_SUBMISSION';
23
+ exports.NOT_ENOUGH_FULLY_GRADED_SUBMISSION = NOT_ENOUGH_FULLY_GRADED_SUBMISSION;
24
+ var NOT_ENOUGH_FULLY_GRADED_QUESTION = 'NOT_ENOUGH_FULLY_GRADED_QUESTION';
25
+ exports.NOT_ENOUGH_FULLY_GRADED_QUESTION = NOT_ENOUGH_FULLY_GRADED_QUESTION;
22
26
  var requestTimeErrorCodes = new Map().set(INSUFFICIENT_NUMBER_OF_SESSIONS, (0, _errorMessages.getInsufficentSubmissionNumberError)()).set(ANALYSIS_GENERATION_IN_PROGRESS, (0, _errorMessages.getOngoingReportGenerationError)()).set(GENERAL_ANALYSIS_ERROR, (0, _errorMessages.getReportGenerationFailure)());
23
- var jobTimeErrorCodes = new Map();
27
+ var jobTimeErrorCodes = new Map().set(NOT_ENOUGH_FULLY_GRADED_SUBMISSION, (0, _errorMessages.getMinimumThreeGradedSubmissionError)()).set(NOT_ENOUGH_FULLY_GRADED_QUESTION, (0, _errorMessages.getNotEnoughDataAvailableError)());
24
28
  var errorCodesToMessages = new Map([].concat((0, _toConsumableArray2.default)(requestTimeErrorCodes), (0, _toConsumableArray2.default)(jobTimeErrorCodes)));
25
29
 
26
30
  var getErrorMessageForCode = function getErrorMessageForCode(code) {
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.getOngoingReportGenerationError = exports.getInsufficentSubmissionNumberError = exports.getReportGenerationFailure = exports.getLastReportGenerationFailed = exports.getFailedToFetchReports = void 0;
8
+ exports.getNotEnoughDataAvailableError = exports.getMinimumThreeGradedSubmissionError = exports.getOngoingReportGenerationError = exports.getInsufficentSubmissionNumberError = exports.getReportGenerationFailure = exports.getLastReportGenerationFailed = exports.getFailedToFetchReports = void 0;
9
9
 
10
10
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
11
11
 
@@ -37,4 +37,16 @@ var getOngoingReportGenerationError = function getOngoingReportGenerationError()
37
37
  return (0, _formatMessage.default)('A report for this quiz is currently being generated by another user. Please try again later.');
38
38
  };
39
39
 
40
- exports.getOngoingReportGenerationError = getOngoingReportGenerationError;
40
+ exports.getOngoingReportGenerationError = getOngoingReportGenerationError;
41
+
42
+ var getMinimumThreeGradedSubmissionError = function getMinimumThreeGradedSubmissionError() {
43
+ return (0, _formatMessage.default)('There is not enough data available to generate this report. A minimum of 3 fully graded submissions is required to generate. Please try again when more submissions are graded.');
44
+ };
45
+
46
+ exports.getMinimumThreeGradedSubmissionError = getMinimumThreeGradedSubmissionError;
47
+
48
+ var getNotEnoughDataAvailableError = function getNotEnoughDataAvailableError() {
49
+ return (0, _formatMessage.default)('There is not enough data available to generate this report. Please try again when more submissions are graded.');
50
+ };
51
+
52
+ exports.getNotEnoughDataAvailableError = getNotEnoughDataAvailableError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "18.3.1-rc.14+c759e0719",
3
+ "version": "18.3.1-rc.16+1b173ad32",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -42,11 +42,11 @@
42
42
  "dependencies": {
43
43
  "@instructure/grading-utils": "^1.0.0",
44
44
  "@instructure/outcomes-ui": "^2.1.9",
45
- "@instructure/quiz-common": "18.3.1-rc.14+c759e0719",
46
- "@instructure/quiz-i18n": "18.3.1-rc.14+c759e0719",
47
- "@instructure/quiz-interactions": "18.3.1-rc.14+c759e0719",
48
- "@instructure/quiz-number-input": "18.3.1-rc.14+c759e0719",
49
- "@instructure/quiz-rce": "18.3.1-rc.14+c759e0719",
45
+ "@instructure/quiz-common": "18.3.1-rc.16+1b173ad32",
46
+ "@instructure/quiz-i18n": "18.3.1-rc.16+1b173ad32",
47
+ "@instructure/quiz-interactions": "18.3.1-rc.16+1b173ad32",
48
+ "@instructure/quiz-number-input": "18.3.1-rc.16+1b173ad32",
49
+ "@instructure/quiz-rce": "18.3.1-rc.16+1b173ad32",
50
50
  "@instructure/ui-a11y-content": "^7.22.1",
51
51
  "@instructure/ui-alerts": "^7.22.1",
52
52
  "@instructure/ui-avatar": "^7.22.1",
@@ -107,7 +107,7 @@
107
107
  "eventemitter3": "^3.1.0",
108
108
  "humps": "^2.0.0",
109
109
  "immutable": "^3.8.1",
110
- "instructure-validations": "18.3.1-rc.14+c759e0719",
110
+ "instructure-validations": "18.3.1-rc.16+1b173ad32",
111
111
  "ipaddr.js": "^1.5.4",
112
112
  "isomorphic-fetch": "^2.2.0",
113
113
  "isuuid": "^0.1.0",
@@ -158,7 +158,7 @@
158
158
  "intl": "^1.2.4",
159
159
  "jquery": "^2.2.3",
160
160
  "most-subject": "^5.3.0",
161
- "quiz-presets": "18.3.1-rc.14+c759e0719",
161
+ "quiz-presets": "18.3.1-rc.16+1b173ad32",
162
162
  "react": "^16.8.6",
163
163
  "react-addons-test-utils": "^15.6.2",
164
164
  "react-dom": "^16.8.6",
@@ -174,5 +174,5 @@
174
174
  "publishConfig": {
175
175
  "access": "public"
176
176
  },
177
- "gitHead": "c759e07191dbcc7888c9a833accf4e40b6f7ee21"
177
+ "gitHead": "1b173ad323d4e182131f144eca9a55c55144ef6a"
178
178
  }