@instructure/quiz-core 20.34.1-snapshot.8 → 20.34.1-test.7
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/api/fetchStudentAnalyses.js +4 -9
- package/es/reporting/api/getAnalysesExport.js +4 -11
- package/es/reporting/api/getAnalysesStatus.js +4 -11
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +2 -5
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +1 -2
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +6 -19
- package/lib/reporting/api/fetchStudentAnalyses.js +4 -9
- package/lib/reporting/api/getAnalysesExport.js +4 -11
- package/lib/reporting/api/getAnalysesStatus.js +4 -11
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +2 -5
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +1 -2
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +6 -19
- package/package.json +9 -9
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import Fetcher from "../../common/util/Fetcher.js";
|
|
4
|
-
import { featureOn } from "../../common/util/featureCheck.js";
|
|
5
4
|
var fetcher = new Fetcher();
|
|
6
5
|
export var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
7
6
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(quizId) {
|
|
8
7
|
var filter,
|
|
9
|
-
isMultiAttemptEnabled,
|
|
10
|
-
selectedFilter,
|
|
11
8
|
url,
|
|
12
9
|
_args = arguments;
|
|
13
10
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -15,14 +12,12 @@ export var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
|
15
12
|
switch (_context.prev = _context.next) {
|
|
16
13
|
case 0:
|
|
17
14
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
url = "/api/quizzes/".concat(quizId, "/analyses/student_analyses?filter=").concat(selectedFilter);
|
|
21
|
-
_context.next = 6;
|
|
15
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/student_analyses?filter=").concat(filter);
|
|
16
|
+
_context.next = 4;
|
|
22
17
|
return fetcher.get(url);
|
|
23
|
-
case
|
|
18
|
+
case 4:
|
|
24
19
|
return _context.abrupt("return", _context.sent);
|
|
25
|
-
case
|
|
20
|
+
case 5:
|
|
26
21
|
case "end":
|
|
27
22
|
return _context.stop();
|
|
28
23
|
}
|
|
@@ -3,7 +3,6 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
|
3
3
|
import Fetcher from "../../common/util/Fetcher.js";
|
|
4
4
|
import { csvFormat } from "../components/resources/NewQuizAndItemAnalysis/exportFormats.js";
|
|
5
5
|
import { ITEM_ANALYSES } from '@instructure/quiz-common';
|
|
6
|
-
import { featureOn } from "../../common/util/featureCheck.js";
|
|
7
6
|
var getFetcher = function getFetcher(format) {
|
|
8
7
|
var mimeType = formatsToMimeTypes.get(format);
|
|
9
8
|
if (!mimeType) {
|
|
@@ -25,9 +24,6 @@ export var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
25
24
|
var filter,
|
|
26
25
|
analysisType,
|
|
27
26
|
fetcher,
|
|
28
|
-
isMultiAttemptEnabled,
|
|
29
|
-
isStudent_analysis,
|
|
30
|
-
selectedFilter,
|
|
31
27
|
url,
|
|
32
28
|
_args = arguments;
|
|
33
29
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -37,15 +33,12 @@ export var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
37
33
|
filter = _args.length > 2 && _args[2] !== void 0 ? _args[2] : 'last_attempt';
|
|
38
34
|
analysisType = _args.length > 3 && _args[3] !== void 0 ? _args[3] : ITEM_ANALYSES;
|
|
39
35
|
fetcher = getFetcher(format);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
selectedFilter = isMultiAttemptEnabled && isStudent_analysis ? 'all_attempts' : filter;
|
|
43
|
-
url = "/api/quizzes/".concat(quizId, "/analyses/export?filter=").concat(selectedFilter, "&analysis_type=").concat(analysisType);
|
|
44
|
-
_context.next = 9;
|
|
36
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/export?filter=").concat(filter, "&analysis_type=").concat(analysisType);
|
|
37
|
+
_context.next = 6;
|
|
45
38
|
return fetcher.get(url);
|
|
46
|
-
case
|
|
39
|
+
case 6:
|
|
47
40
|
return _context.abrupt("return", _context.sent);
|
|
48
|
-
case
|
|
41
|
+
case 7:
|
|
49
42
|
case "end":
|
|
50
43
|
return _context.stop();
|
|
51
44
|
}
|
|
@@ -2,15 +2,11 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import Fetcher from "../../common/util/Fetcher.js";
|
|
4
4
|
import { ITEM_ANALYSES } from '@instructure/quiz-common';
|
|
5
|
-
import { featureOn } from "../../common/util/featureCheck.js";
|
|
6
5
|
var fetcher = new Fetcher();
|
|
7
6
|
export var getAnalysesStatus = /*#__PURE__*/function () {
|
|
8
7
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(quizId) {
|
|
9
8
|
var filter,
|
|
10
9
|
analysisType,
|
|
11
|
-
isMultiAttemptEnabled,
|
|
12
|
-
isStudent_analysis,
|
|
13
|
-
selectedFilter,
|
|
14
10
|
url,
|
|
15
11
|
_args = arguments;
|
|
16
12
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -19,15 +15,12 @@ export var getAnalysesStatus = /*#__PURE__*/function () {
|
|
|
19
15
|
case 0:
|
|
20
16
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
21
17
|
analysisType = _args.length > 2 && _args[2] !== void 0 ? _args[2] : ITEM_ANALYSES;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
selectedFilter = isMultiAttemptEnabled && isStudent_analysis ? 'all_attempts' : filter;
|
|
25
|
-
url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(selectedFilter, "&analysis_type=").concat(analysisType);
|
|
26
|
-
_context.next = 8;
|
|
18
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(filter, "&analysis_type=").concat(analysisType);
|
|
19
|
+
_context.next = 5;
|
|
27
20
|
return fetcher.get(url);
|
|
28
|
-
case
|
|
21
|
+
case 5:
|
|
29
22
|
return _context.abrupt("return", _context.sent);
|
|
30
|
-
case
|
|
23
|
+
case 6:
|
|
31
24
|
case "end":
|
|
32
25
|
return _context.stop();
|
|
33
26
|
}
|
|
@@ -42,14 +42,11 @@ export var StudentAnalysisReportCardPresenter = (_dec = withStyle(generateStyle,
|
|
|
42
42
|
"data-automation": "sdk-new-sa-report-card-spinner"
|
|
43
43
|
}))));
|
|
44
44
|
};
|
|
45
|
-
_this.getAttemptType = function () {
|
|
46
|
-
return _this.props.allAttemptsEnabled ? 'all_attempts' : 'last_attempt';
|
|
47
|
-
};
|
|
48
45
|
_this.handleExport = function () {
|
|
49
|
-
_this.props.exportReport('csv',
|
|
46
|
+
_this.props.exportReport('csv', 'last_attempt', STUDENT_ANALYSES);
|
|
50
47
|
};
|
|
51
48
|
_this.handleGeneration = function () {
|
|
52
|
-
_this.props.generateReport(
|
|
49
|
+
_this.props.generateReport('last_attempt', STUDENT_ANALYSES);
|
|
53
50
|
};
|
|
54
51
|
_this.renderExportButton = function () {
|
|
55
52
|
var _this$props = _this.props,
|
|
@@ -22,8 +22,7 @@ function mapStateToProps(state, ownProps) {
|
|
|
22
22
|
fetchStudentAnalyses: fetchStudentAnalyses,
|
|
23
23
|
fetchAnalysesStatus: fetchAnalysesStatus,
|
|
24
24
|
pollingInterval: ownProps.pollingInterval || DEFAULT_POLLING_INTERVAL,
|
|
25
|
-
exportEnabled: featureOn('student_analysis_csv')
|
|
26
|
-
allAttemptsEnabled: featureOn('student_analysis_multiple_attempts')
|
|
25
|
+
exportEnabled: featureOn('student_analysis_csv')
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
28
|
export function mapDispatchToProps(dispatch, ownProps) {
|
package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js
CHANGED
|
@@ -12,7 +12,6 @@ import { fetchReport } from "./fetchReport.js";
|
|
|
12
12
|
import { fetchReportStatus } from "./fetchReportStatus.js";
|
|
13
13
|
import { STUDENT_ANALYSES } from '@instructure/quiz-common';
|
|
14
14
|
import { studentAnalysesPropType } from "../common/propTypes.js";
|
|
15
|
-
import { featureOn } from "../../../../common/util/featureCheck.js";
|
|
16
15
|
export var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReportStatePresenter(OriginalComponent) {
|
|
17
16
|
var StudentAnalysisReportStatePresenter = function StudentAnalysisReportStatePresenter(_ref) {
|
|
18
17
|
var studentAnalyses = _ref.studentAnalyses,
|
|
@@ -70,9 +69,6 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
70
69
|
_generateReport = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
71
70
|
var filter,
|
|
72
71
|
analysisType,
|
|
73
|
-
isMultiAttemptEnabled,
|
|
74
|
-
isStudentAnalysis,
|
|
75
|
-
selectedFilter,
|
|
76
72
|
generationConfig,
|
|
77
73
|
_args3 = arguments;
|
|
78
74
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -81,20 +77,17 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
81
77
|
case 0:
|
|
82
78
|
filter = _args3.length > 0 && _args3[0] !== void 0 ? _args3[0] : 'last_attempt';
|
|
83
79
|
analysisType = _args3.length > 1 ? _args3[1] : void 0;
|
|
84
|
-
isMultiAttemptEnabled = featureOn('student_analysis_multiple_attempts');
|
|
85
|
-
isStudentAnalysis = analysisType === STUDENT_ANALYSES;
|
|
86
|
-
selectedFilter = isMultiAttemptEnabled && isStudentAnalysis ? 'all_attempts' : filter;
|
|
87
80
|
generationConfig = {
|
|
88
|
-
filter:
|
|
81
|
+
filter: filter,
|
|
89
82
|
analysisType: analysisType,
|
|
90
83
|
setGenerationInProgress: setGenerationInProgress,
|
|
91
84
|
setStatusPollingInProgress: setStatusPollingInProgress,
|
|
92
85
|
generateAnalysis: generateAnalysis,
|
|
93
86
|
addError: addError
|
|
94
87
|
};
|
|
95
|
-
_context3.next =
|
|
88
|
+
_context3.next = 5;
|
|
96
89
|
return triggerReportGeneration(generationConfig);
|
|
97
|
-
case
|
|
90
|
+
case 5:
|
|
98
91
|
case "end":
|
|
99
92
|
return _context3.stop();
|
|
100
93
|
}
|
|
@@ -110,9 +103,6 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
110
103
|
_exportReport = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(format) {
|
|
111
104
|
var filter,
|
|
112
105
|
analysisType,
|
|
113
|
-
isMultiAttemptEnabled,
|
|
114
|
-
isStudentAnalysis,
|
|
115
|
-
selectedFilter,
|
|
116
106
|
exportConfig,
|
|
117
107
|
_args4 = arguments;
|
|
118
108
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -121,21 +111,18 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
121
111
|
case 0:
|
|
122
112
|
filter = _args4.length > 1 && _args4[1] !== void 0 ? _args4[1] : 'last_attempt';
|
|
123
113
|
analysisType = _args4.length > 2 && _args4[2] !== void 0 ? _args4[2] : STUDENT_ANALYSES;
|
|
124
|
-
isMultiAttemptEnabled = featureOn('student_analysis_multiple_attempts');
|
|
125
|
-
isStudentAnalysis = analysisType === STUDENT_ANALYSES;
|
|
126
|
-
selectedFilter = isMultiAttemptEnabled && isStudentAnalysis ? 'all_attempts' : filter;
|
|
127
114
|
exportConfig = {
|
|
128
115
|
getAnalysesExport: getAnalysesExport,
|
|
129
116
|
format: format,
|
|
130
|
-
filter:
|
|
117
|
+
filter: filter,
|
|
131
118
|
activeQuizId: activeQuizId,
|
|
132
119
|
addError: addError,
|
|
133
120
|
saveFile: saveFile,
|
|
134
121
|
analysisType: analysisType
|
|
135
122
|
};
|
|
136
|
-
_context4.next =
|
|
123
|
+
_context4.next = 5;
|
|
137
124
|
return triggerReportExport(exportConfig);
|
|
138
|
-
case
|
|
125
|
+
case 5:
|
|
139
126
|
case "end":
|
|
140
127
|
return _context4.stop();
|
|
141
128
|
}
|
|
@@ -8,13 +8,10 @@ exports.fetchStudentAnalyses = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _Fetcher = _interopRequireDefault(require("../../common/util/Fetcher.js"));
|
|
11
|
-
var _featureCheck = require("../../common/util/featureCheck.js");
|
|
12
11
|
var fetcher = new _Fetcher.default();
|
|
13
12
|
var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
14
13
|
var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(quizId) {
|
|
15
14
|
var filter,
|
|
16
|
-
isMultiAttemptEnabled,
|
|
17
|
-
selectedFilter,
|
|
18
15
|
url,
|
|
19
16
|
_args = arguments;
|
|
20
17
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -22,14 +19,12 @@ var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
|
22
19
|
switch (_context.prev = _context.next) {
|
|
23
20
|
case 0:
|
|
24
21
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
url = "/api/quizzes/".concat(quizId, "/analyses/student_analyses?filter=").concat(selectedFilter);
|
|
28
|
-
_context.next = 6;
|
|
22
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/student_analyses?filter=").concat(filter);
|
|
23
|
+
_context.next = 4;
|
|
29
24
|
return fetcher.get(url);
|
|
30
|
-
case
|
|
25
|
+
case 4:
|
|
31
26
|
return _context.abrupt("return", _context.sent);
|
|
32
|
-
case
|
|
27
|
+
case 5:
|
|
33
28
|
case "end":
|
|
34
29
|
return _context.stop();
|
|
35
30
|
}
|
|
@@ -10,7 +10,6 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var _Fetcher = _interopRequireDefault(require("../../common/util/Fetcher.js"));
|
|
11
11
|
var _exportFormats = require("../components/resources/NewQuizAndItemAnalysis/exportFormats.js");
|
|
12
12
|
var _quizCommon = require("@instructure/quiz-common");
|
|
13
|
-
var _featureCheck = require("../../common/util/featureCheck.js");
|
|
14
13
|
var getFetcher = function getFetcher(format) {
|
|
15
14
|
var mimeType = formatsToMimeTypes.get(format);
|
|
16
15
|
if (!mimeType) {
|
|
@@ -32,9 +31,6 @@ var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
32
31
|
var filter,
|
|
33
32
|
analysisType,
|
|
34
33
|
fetcher,
|
|
35
|
-
isMultiAttemptEnabled,
|
|
36
|
-
isStudent_analysis,
|
|
37
|
-
selectedFilter,
|
|
38
34
|
url,
|
|
39
35
|
_args = arguments;
|
|
40
36
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -44,15 +40,12 @@ var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
44
40
|
filter = _args.length > 2 && _args[2] !== void 0 ? _args[2] : 'last_attempt';
|
|
45
41
|
analysisType = _args.length > 3 && _args[3] !== void 0 ? _args[3] : _quizCommon.ITEM_ANALYSES;
|
|
46
42
|
fetcher = getFetcher(format);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
selectedFilter = isMultiAttemptEnabled && isStudent_analysis ? 'all_attempts' : filter;
|
|
50
|
-
url = "/api/quizzes/".concat(quizId, "/analyses/export?filter=").concat(selectedFilter, "&analysis_type=").concat(analysisType);
|
|
51
|
-
_context.next = 9;
|
|
43
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/export?filter=").concat(filter, "&analysis_type=").concat(analysisType);
|
|
44
|
+
_context.next = 6;
|
|
52
45
|
return fetcher.get(url);
|
|
53
|
-
case
|
|
46
|
+
case 6:
|
|
54
47
|
return _context.abrupt("return", _context.sent);
|
|
55
|
-
case
|
|
48
|
+
case 7:
|
|
56
49
|
case "end":
|
|
57
50
|
return _context.stop();
|
|
58
51
|
}
|
|
@@ -9,15 +9,11 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _Fetcher = _interopRequireDefault(require("../../common/util/Fetcher.js"));
|
|
11
11
|
var _quizCommon = require("@instructure/quiz-common");
|
|
12
|
-
var _featureCheck = require("../../common/util/featureCheck.js");
|
|
13
12
|
var fetcher = new _Fetcher.default();
|
|
14
13
|
var getAnalysesStatus = /*#__PURE__*/function () {
|
|
15
14
|
var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(quizId) {
|
|
16
15
|
var filter,
|
|
17
16
|
analysisType,
|
|
18
|
-
isMultiAttemptEnabled,
|
|
19
|
-
isStudent_analysis,
|
|
20
|
-
selectedFilter,
|
|
21
17
|
url,
|
|
22
18
|
_args = arguments;
|
|
23
19
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -26,15 +22,12 @@ var getAnalysesStatus = /*#__PURE__*/function () {
|
|
|
26
22
|
case 0:
|
|
27
23
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
28
24
|
analysisType = _args.length > 2 && _args[2] !== void 0 ? _args[2] : _quizCommon.ITEM_ANALYSES;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
selectedFilter = isMultiAttemptEnabled && isStudent_analysis ? 'all_attempts' : filter;
|
|
32
|
-
url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(selectedFilter, "&analysis_type=").concat(analysisType);
|
|
33
|
-
_context.next = 8;
|
|
25
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(filter, "&analysis_type=").concat(analysisType);
|
|
26
|
+
_context.next = 5;
|
|
34
27
|
return fetcher.get(url);
|
|
35
|
-
case
|
|
28
|
+
case 5:
|
|
36
29
|
return _context.abrupt("return", _context.sent);
|
|
37
|
-
case
|
|
30
|
+
case 6:
|
|
38
31
|
case "end":
|
|
39
32
|
return _context.stop();
|
|
40
33
|
}
|
|
@@ -50,14 +50,11 @@ var StudentAnalysisReportCardPresenter = (_dec = (0, _emotion.withStyle)(_styles
|
|
|
50
50
|
"data-automation": "sdk-new-sa-report-card-spinner"
|
|
51
51
|
}))));
|
|
52
52
|
};
|
|
53
|
-
_this.getAttemptType = function () {
|
|
54
|
-
return _this.props.allAttemptsEnabled ? 'all_attempts' : 'last_attempt';
|
|
55
|
-
};
|
|
56
53
|
_this.handleExport = function () {
|
|
57
|
-
_this.props.exportReport('csv',
|
|
54
|
+
_this.props.exportReport('csv', 'last_attempt', _quizCommon.STUDENT_ANALYSES);
|
|
58
55
|
};
|
|
59
56
|
_this.handleGeneration = function () {
|
|
60
|
-
_this.props.generateReport(
|
|
57
|
+
_this.props.generateReport('last_attempt', _quizCommon.STUDENT_ANALYSES);
|
|
61
58
|
};
|
|
62
59
|
_this.renderExportButton = function () {
|
|
63
60
|
var _this$props = _this.props,
|
package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js
CHANGED
|
@@ -29,8 +29,7 @@ function mapStateToProps(state, ownProps) {
|
|
|
29
29
|
fetchStudentAnalyses: _fetchStudentAnalyses.fetchStudentAnalyses,
|
|
30
30
|
fetchAnalysesStatus: _getAnalysesStatus.getAnalysesStatus,
|
|
31
31
|
pollingInterval: ownProps.pollingInterval || DEFAULT_POLLING_INTERVAL,
|
|
32
|
-
exportEnabled: (0, _featureCheck.featureOn)('student_analysis_csv')
|
|
33
|
-
allAttemptsEnabled: (0, _featureCheck.featureOn)('student_analysis_multiple_attempts')
|
|
32
|
+
exportEnabled: (0, _featureCheck.featureOn)('student_analysis_csv')
|
|
34
33
|
};
|
|
35
34
|
}
|
|
36
35
|
function mapDispatchToProps(dispatch, ownProps) {
|
|
@@ -20,7 +20,6 @@ var _fetchReport = require("./fetchReport.js");
|
|
|
20
20
|
var _fetchReportStatus = require("./fetchReportStatus.js");
|
|
21
21
|
var _quizCommon = require("@instructure/quiz-common");
|
|
22
22
|
var _propTypes2 = require("../common/propTypes.js");
|
|
23
|
-
var _featureCheck = require("../../../../common/util/featureCheck.js");
|
|
24
23
|
var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReportStatePresenter(OriginalComponent) {
|
|
25
24
|
var StudentAnalysisReportStatePresenter = function StudentAnalysisReportStatePresenter(_ref) {
|
|
26
25
|
var studentAnalyses = _ref.studentAnalyses,
|
|
@@ -78,9 +77,6 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
78
77
|
_generateReport = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
79
78
|
var filter,
|
|
80
79
|
analysisType,
|
|
81
|
-
isMultiAttemptEnabled,
|
|
82
|
-
isStudentAnalysis,
|
|
83
|
-
selectedFilter,
|
|
84
80
|
generationConfig,
|
|
85
81
|
_args3 = arguments;
|
|
86
82
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
@@ -89,20 +85,17 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
89
85
|
case 0:
|
|
90
86
|
filter = _args3.length > 0 && _args3[0] !== void 0 ? _args3[0] : 'last_attempt';
|
|
91
87
|
analysisType = _args3.length > 1 ? _args3[1] : void 0;
|
|
92
|
-
isMultiAttemptEnabled = (0, _featureCheck.featureOn)('student_analysis_multiple_attempts');
|
|
93
|
-
isStudentAnalysis = analysisType === _quizCommon.STUDENT_ANALYSES;
|
|
94
|
-
selectedFilter = isMultiAttemptEnabled && isStudentAnalysis ? 'all_attempts' : filter;
|
|
95
88
|
generationConfig = {
|
|
96
|
-
filter:
|
|
89
|
+
filter: filter,
|
|
97
90
|
analysisType: analysisType,
|
|
98
91
|
setGenerationInProgress: setGenerationInProgress,
|
|
99
92
|
setStatusPollingInProgress: setStatusPollingInProgress,
|
|
100
93
|
generateAnalysis: generateAnalysis,
|
|
101
94
|
addError: addError
|
|
102
95
|
};
|
|
103
|
-
_context3.next =
|
|
96
|
+
_context3.next = 5;
|
|
104
97
|
return (0, _generateReports.generateReports)(generationConfig);
|
|
105
|
-
case
|
|
98
|
+
case 5:
|
|
106
99
|
case "end":
|
|
107
100
|
return _context3.stop();
|
|
108
101
|
}
|
|
@@ -118,9 +111,6 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
118
111
|
_exportReport = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(format) {
|
|
119
112
|
var filter,
|
|
120
113
|
analysisType,
|
|
121
|
-
isMultiAttemptEnabled,
|
|
122
|
-
isStudentAnalysis,
|
|
123
|
-
selectedFilter,
|
|
124
114
|
exportConfig,
|
|
125
115
|
_args4 = arguments;
|
|
126
116
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
@@ -129,21 +119,18 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
129
119
|
case 0:
|
|
130
120
|
filter = _args4.length > 1 && _args4[1] !== void 0 ? _args4[1] : 'last_attempt';
|
|
131
121
|
analysisType = _args4.length > 2 && _args4[2] !== void 0 ? _args4[2] : _quizCommon.STUDENT_ANALYSES;
|
|
132
|
-
isMultiAttemptEnabled = (0, _featureCheck.featureOn)('student_analysis_multiple_attempts');
|
|
133
|
-
isStudentAnalysis = analysisType === _quizCommon.STUDENT_ANALYSES;
|
|
134
|
-
selectedFilter = isMultiAttemptEnabled && isStudentAnalysis ? 'all_attempts' : filter;
|
|
135
122
|
exportConfig = {
|
|
136
123
|
getAnalysesExport: getAnalysesExport,
|
|
137
124
|
format: format,
|
|
138
|
-
filter:
|
|
125
|
+
filter: filter,
|
|
139
126
|
activeQuizId: activeQuizId,
|
|
140
127
|
addError: addError,
|
|
141
128
|
saveFile: _utils.saveFile,
|
|
142
129
|
analysisType: analysisType
|
|
143
130
|
};
|
|
144
|
-
_context4.next =
|
|
131
|
+
_context4.next = 5;
|
|
145
132
|
return (0, _exportReports.exportReports)(exportConfig);
|
|
146
|
-
case
|
|
133
|
+
case 5:
|
|
147
134
|
case "end":
|
|
148
135
|
return _context4.stop();
|
|
149
136
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.34.1-
|
|
3
|
+
"version": "20.34.1-test.7+a7a39b4dd",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@instructure/emotion": "^8.56.3",
|
|
47
47
|
"@instructure/grading-utils": "^1.0.0",
|
|
48
48
|
"@instructure/outcomes-ui": "^3.2.2",
|
|
49
|
-
"@instructure/quiz-common": "^20.34.1-
|
|
50
|
-
"@instructure/quiz-i18n": "^20.34.1-
|
|
51
|
-
"@instructure/quiz-interactions": "^20.34.1-
|
|
52
|
-
"@instructure/quiz-number-input": "^20.34.1-
|
|
53
|
-
"@instructure/quiz-rce": "^20.34.1-
|
|
49
|
+
"@instructure/quiz-common": "^20.34.1-test.7+a7a39b4dd",
|
|
50
|
+
"@instructure/quiz-i18n": "^20.34.1-test.7+a7a39b4dd",
|
|
51
|
+
"@instructure/quiz-interactions": "^20.34.1-test.7+a7a39b4dd",
|
|
52
|
+
"@instructure/quiz-number-input": "^20.34.1-test.7+a7a39b4dd",
|
|
53
|
+
"@instructure/quiz-rce": "^20.34.1-test.7+a7a39b4dd",
|
|
54
54
|
"@instructure/ui-a11y-content": "^8.56.3",
|
|
55
55
|
"@instructure/ui-alerts": "^8.56.3",
|
|
56
56
|
"@instructure/ui-avatar": "^8.56.3",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"file-saver": "~2.0.5",
|
|
115
115
|
"humps": "^2.0.0",
|
|
116
116
|
"immutable": "^3.8.1",
|
|
117
|
-
"instructure-validations": "^20.34.1-
|
|
117
|
+
"instructure-validations": "^20.34.1-test.7+a7a39b4dd",
|
|
118
118
|
"ipaddr.js": "^1.5.4",
|
|
119
119
|
"isomorphic-fetch": "^2.2.0",
|
|
120
120
|
"isuuid": "^0.1.0",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"jquery": "^2.2.3",
|
|
164
164
|
"karma-junit-reporter": "^2.0.1",
|
|
165
165
|
"most-subject": "^5.3.0",
|
|
166
|
-
"quiz-presets": "^20.34.1-
|
|
166
|
+
"quiz-presets": "^20.34.1-test.7+a7a39b4dd",
|
|
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": "
|
|
182
|
+
"gitHead": "a7a39b4dd84af792cc96768e74f5d63e6aad7e56"
|
|
183
183
|
}
|