@instructure/quiz-core 18.3.1-rc.13 → 18.3.1-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +9 -9
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/errorMessages.js +6 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +9 -9
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +6 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorMessages.js +14 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +2 -1
- package/package.json +9 -9
|
@@ -16,17 +16,17 @@ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
|
16
16
|
import { themeable } from '@instructure/ui-themeable';
|
|
17
17
|
import Card from "../../../../../common/components/shared/Card/index.js";
|
|
18
18
|
var styles = {
|
|
19
|
-
componentId: '
|
|
19
|
+
componentId: 'escQz',
|
|
20
20
|
template: function template(theme) {
|
|
21
|
-
return "\n\n.
|
|
21
|
+
return "\n\n.escQz_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', ";row-gap:8px}\n\n.escQz_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.escQz_dJIh{min-height:").concat(theme.cardHeight || 'inherit', "}\n\n.escQz_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.escQz_blRb{max-width:160px;padding-right:10px}\n\n.escQz_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.escQz_dKIc{padding-bottom:15px}\n\n@media only screen and (max-width:25rem){.escQz_dJIh{height:auto}.escQz_PFlN{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}.escQz_bqdH{flex-wrap:wrap}}");
|
|
22
22
|
},
|
|
23
|
-
'metricsContainer': '
|
|
24
|
-
'reportCard': '
|
|
25
|
-
'emptyReportCard': '
|
|
26
|
-
'emptyCardBodyContainer': '
|
|
27
|
-
'dateContainer': '
|
|
28
|
-
'quizAnalysisSummary': '
|
|
29
|
-
'titleContainer': '
|
|
23
|
+
'metricsContainer': 'escQz_bqdH',
|
|
24
|
+
'reportCard': 'escQz_PFlN',
|
|
25
|
+
'emptyReportCard': 'escQz_dJIh',
|
|
26
|
+
'emptyCardBodyContainer': 'escQz_eWEX',
|
|
27
|
+
'dateContainer': 'escQz_blRb',
|
|
28
|
+
'quizAnalysisSummary': 'escQz_bxzy',
|
|
29
|
+
'titleContainer': 'escQz_dKIc'
|
|
30
30
|
};
|
|
31
31
|
import theme from "./theme.js";
|
|
32
32
|
import classnames from 'classnames';
|
|
@@ -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
|
};
|
|
@@ -31,8 +31,9 @@ export var fetchReportsStatus = /*#__PURE__*/function () {
|
|
|
31
31
|
addError(getFailedToFetchReports());
|
|
32
32
|
setStatusPollingInProgress(false);
|
|
33
33
|
setGenerationInProgress(false);
|
|
34
|
+
return _context.abrupt("return", true);
|
|
34
35
|
|
|
35
|
-
case
|
|
36
|
+
case 16:
|
|
36
37
|
case "end":
|
|
37
38
|
return _context.stop();
|
|
38
39
|
}
|
|
@@ -52,17 +52,17 @@ var _propTypes2 = require("../propTypes.js");
|
|
|
52
52
|
var _dec, _class, _class2, _temp;
|
|
53
53
|
|
|
54
54
|
var styles = {
|
|
55
|
-
componentId: '
|
|
55
|
+
componentId: 'escQz',
|
|
56
56
|
template: function template(theme) {
|
|
57
|
-
return "\n\n.
|
|
57
|
+
return "\n\n.escQz_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', ";row-gap:8px}\n\n.escQz_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.escQz_dJIh{min-height:").concat(theme.cardHeight || 'inherit', "}\n\n.escQz_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.escQz_blRb{max-width:160px;padding-right:10px}\n\n.escQz_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.escQz_dKIc{padding-bottom:15px}\n\n@media only screen and (max-width:25rem){.escQz_dJIh{height:auto}.escQz_PFlN{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}.escQz_bqdH{flex-wrap:wrap}}");
|
|
58
58
|
},
|
|
59
|
-
'metricsContainer': '
|
|
60
|
-
'reportCard': '
|
|
61
|
-
'emptyReportCard': '
|
|
62
|
-
'emptyCardBodyContainer': '
|
|
63
|
-
'dateContainer': '
|
|
64
|
-
'quizAnalysisSummary': '
|
|
65
|
-
'titleContainer': '
|
|
59
|
+
'metricsContainer': 'escQz_bqdH',
|
|
60
|
+
'reportCard': 'escQz_PFlN',
|
|
61
|
+
'emptyReportCard': 'escQz_dJIh',
|
|
62
|
+
'emptyCardBodyContainer': 'escQz_eWEX',
|
|
63
|
+
'dateContainer': 'escQz_blRb',
|
|
64
|
+
'quizAnalysisSummary': 'escQz_bxzy',
|
|
65
|
+
'titleContainer': 'escQz_dKIc'
|
|
66
66
|
};
|
|
67
67
|
var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
68
68
|
(0, _inherits2.default)(NewQuizAndItemAnalysisReportCardPresenter, _Component);
|
|
@@ -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;
|
|
@@ -43,8 +43,9 @@ var fetchReportsStatus = /*#__PURE__*/function () {
|
|
|
43
43
|
addError((0, _errorMessages.getFailedToFetchReports)());
|
|
44
44
|
setStatusPollingInProgress(false);
|
|
45
45
|
setGenerationInProgress(false);
|
|
46
|
+
return _context.abrupt("return", true);
|
|
46
47
|
|
|
47
|
-
case
|
|
48
|
+
case 16:
|
|
48
49
|
case "end":
|
|
49
50
|
return _context.stop();
|
|
50
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "18.3.1-rc.
|
|
3
|
+
"version": "18.3.1-rc.15+bb370fda7",
|
|
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.
|
|
46
|
-
"@instructure/quiz-i18n": "18.3.1-rc.
|
|
47
|
-
"@instructure/quiz-interactions": "18.3.1-rc.
|
|
48
|
-
"@instructure/quiz-number-input": "18.3.1-rc.
|
|
49
|
-
"@instructure/quiz-rce": "18.3.1-rc.
|
|
45
|
+
"@instructure/quiz-common": "18.3.1-rc.15+bb370fda7",
|
|
46
|
+
"@instructure/quiz-i18n": "18.3.1-rc.15+bb370fda7",
|
|
47
|
+
"@instructure/quiz-interactions": "18.3.1-rc.15+bb370fda7",
|
|
48
|
+
"@instructure/quiz-number-input": "18.3.1-rc.15+bb370fda7",
|
|
49
|
+
"@instructure/quiz-rce": "18.3.1-rc.15+bb370fda7",
|
|
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.
|
|
110
|
+
"instructure-validations": "18.3.1-rc.15+bb370fda7",
|
|
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.
|
|
161
|
+
"quiz-presets": "18.3.1-rc.15+bb370fda7",
|
|
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": "
|
|
177
|
+
"gitHead": "bb370fda7edd4b392699085d7965a60617763c45"
|
|
178
178
|
}
|