@instructure/quiz-core 20.34.1-snapshot.7 → 20.34.1-snapshot.8
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 +9 -4
- package/es/reporting/api/getAnalysesExport.js +11 -4
- package/es/reporting/api/getAnalysesStatus.js +11 -4
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +5 -2
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +2 -1
- package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +19 -6
- package/lib/reporting/api/fetchStudentAnalyses.js +9 -4
- package/lib/reporting/api/getAnalysesExport.js +11 -4
- package/lib/reporting/api/getAnalysesStatus.js +11 -4
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +5 -2
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js +2 -1
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +19 -6
- package/package.json +9 -9
|
@@ -1,10 +1,13 @@
|
|
|
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";
|
|
4
5
|
var fetcher = new Fetcher();
|
|
5
6
|
export var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
6
7
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(quizId) {
|
|
7
8
|
var filter,
|
|
9
|
+
isMultiAttemptEnabled,
|
|
10
|
+
selectedFilter,
|
|
8
11
|
url,
|
|
9
12
|
_args = arguments;
|
|
10
13
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -12,12 +15,14 @@ export var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
|
12
15
|
switch (_context.prev = _context.next) {
|
|
13
16
|
case 0:
|
|
14
17
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
isMultiAttemptEnabled = featureOn('student_analysis_multiple_attempts');
|
|
19
|
+
selectedFilter = isMultiAttemptEnabled ? 'all_attempts' : filter;
|
|
20
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/student_analyses?filter=").concat(selectedFilter);
|
|
21
|
+
_context.next = 6;
|
|
17
22
|
return fetcher.get(url);
|
|
18
|
-
case
|
|
23
|
+
case 6:
|
|
19
24
|
return _context.abrupt("return", _context.sent);
|
|
20
|
-
case
|
|
25
|
+
case 7:
|
|
21
26
|
case "end":
|
|
22
27
|
return _context.stop();
|
|
23
28
|
}
|
|
@@ -3,6 +3,7 @@ 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";
|
|
6
7
|
var getFetcher = function getFetcher(format) {
|
|
7
8
|
var mimeType = formatsToMimeTypes.get(format);
|
|
8
9
|
if (!mimeType) {
|
|
@@ -24,6 +25,9 @@ export var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
24
25
|
var filter,
|
|
25
26
|
analysisType,
|
|
26
27
|
fetcher,
|
|
28
|
+
isMultiAttemptEnabled,
|
|
29
|
+
isStudent_analysis,
|
|
30
|
+
selectedFilter,
|
|
27
31
|
url,
|
|
28
32
|
_args = arguments;
|
|
29
33
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -33,12 +37,15 @@ export var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
33
37
|
filter = _args.length > 2 && _args[2] !== void 0 ? _args[2] : 'last_attempt';
|
|
34
38
|
analysisType = _args.length > 3 && _args[3] !== void 0 ? _args[3] : ITEM_ANALYSES;
|
|
35
39
|
fetcher = getFetcher(format);
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
isMultiAttemptEnabled = featureOn('student_analysis_multiple_attempts');
|
|
41
|
+
isStudent_analysis = analysisType === 'student_analysis';
|
|
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;
|
|
38
45
|
return fetcher.get(url);
|
|
39
|
-
case
|
|
46
|
+
case 9:
|
|
40
47
|
return _context.abrupt("return", _context.sent);
|
|
41
|
-
case
|
|
48
|
+
case 10:
|
|
42
49
|
case "end":
|
|
43
50
|
return _context.stop();
|
|
44
51
|
}
|
|
@@ -2,11 +2,15 @@ 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";
|
|
5
6
|
var fetcher = new Fetcher();
|
|
6
7
|
export var getAnalysesStatus = /*#__PURE__*/function () {
|
|
7
8
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(quizId) {
|
|
8
9
|
var filter,
|
|
9
10
|
analysisType,
|
|
11
|
+
isMultiAttemptEnabled,
|
|
12
|
+
isStudent_analysis,
|
|
13
|
+
selectedFilter,
|
|
10
14
|
url,
|
|
11
15
|
_args = arguments;
|
|
12
16
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -15,12 +19,15 @@ export var getAnalysesStatus = /*#__PURE__*/function () {
|
|
|
15
19
|
case 0:
|
|
16
20
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
17
21
|
analysisType = _args.length > 2 && _args[2] !== void 0 ? _args[2] : ITEM_ANALYSES;
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
isMultiAttemptEnabled = featureOn('student_analysis_multiple_attempts');
|
|
23
|
+
isStudent_analysis = analysisType === 'student_analysis';
|
|
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;
|
|
20
27
|
return fetcher.get(url);
|
|
21
|
-
case
|
|
28
|
+
case 8:
|
|
22
29
|
return _context.abrupt("return", _context.sent);
|
|
23
|
-
case
|
|
30
|
+
case 9:
|
|
24
31
|
case "end":
|
|
25
32
|
return _context.stop();
|
|
26
33
|
}
|
|
@@ -42,11 +42,14 @@ 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
|
+
};
|
|
45
48
|
_this.handleExport = function () {
|
|
46
|
-
_this.props.exportReport('csv',
|
|
49
|
+
_this.props.exportReport('csv', _this.getAttemptType(), STUDENT_ANALYSES);
|
|
47
50
|
};
|
|
48
51
|
_this.handleGeneration = function () {
|
|
49
|
-
_this.props.generateReport(
|
|
52
|
+
_this.props.generateReport(_this.getAttemptType(), STUDENT_ANALYSES);
|
|
50
53
|
};
|
|
51
54
|
_this.renderExportButton = function () {
|
|
52
55
|
var _this$props = _this.props,
|
|
@@ -22,7 +22,8 @@ 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')
|
|
25
|
+
exportEnabled: featureOn('student_analysis_csv'),
|
|
26
|
+
allAttemptsEnabled: featureOn('student_analysis_multiple_attempts')
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
export function mapDispatchToProps(dispatch, ownProps) {
|
package/es/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js
CHANGED
|
@@ -12,6 +12,7 @@ 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";
|
|
15
16
|
export var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReportStatePresenter(OriginalComponent) {
|
|
16
17
|
var StudentAnalysisReportStatePresenter = function StudentAnalysisReportStatePresenter(_ref) {
|
|
17
18
|
var studentAnalyses = _ref.studentAnalyses,
|
|
@@ -69,6 +70,9 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
69
70
|
_generateReport = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
70
71
|
var filter,
|
|
71
72
|
analysisType,
|
|
73
|
+
isMultiAttemptEnabled,
|
|
74
|
+
isStudentAnalysis,
|
|
75
|
+
selectedFilter,
|
|
72
76
|
generationConfig,
|
|
73
77
|
_args3 = arguments;
|
|
74
78
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -77,17 +81,20 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
77
81
|
case 0:
|
|
78
82
|
filter = _args3.length > 0 && _args3[0] !== void 0 ? _args3[0] : 'last_attempt';
|
|
79
83
|
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;
|
|
80
87
|
generationConfig = {
|
|
81
|
-
filter:
|
|
88
|
+
filter: selectedFilter,
|
|
82
89
|
analysisType: analysisType,
|
|
83
90
|
setGenerationInProgress: setGenerationInProgress,
|
|
84
91
|
setStatusPollingInProgress: setStatusPollingInProgress,
|
|
85
92
|
generateAnalysis: generateAnalysis,
|
|
86
93
|
addError: addError
|
|
87
94
|
};
|
|
88
|
-
_context3.next =
|
|
95
|
+
_context3.next = 8;
|
|
89
96
|
return triggerReportGeneration(generationConfig);
|
|
90
|
-
case
|
|
97
|
+
case 8:
|
|
91
98
|
case "end":
|
|
92
99
|
return _context3.stop();
|
|
93
100
|
}
|
|
@@ -103,6 +110,9 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
103
110
|
_exportReport = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(format) {
|
|
104
111
|
var filter,
|
|
105
112
|
analysisType,
|
|
113
|
+
isMultiAttemptEnabled,
|
|
114
|
+
isStudentAnalysis,
|
|
115
|
+
selectedFilter,
|
|
106
116
|
exportConfig,
|
|
107
117
|
_args4 = arguments;
|
|
108
118
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -111,18 +121,21 @@ export var withStudentAnalysisReportStatePresenter = function withStudentAnalysi
|
|
|
111
121
|
case 0:
|
|
112
122
|
filter = _args4.length > 1 && _args4[1] !== void 0 ? _args4[1] : 'last_attempt';
|
|
113
123
|
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;
|
|
114
127
|
exportConfig = {
|
|
115
128
|
getAnalysesExport: getAnalysesExport,
|
|
116
129
|
format: format,
|
|
117
|
-
filter:
|
|
130
|
+
filter: selectedFilter,
|
|
118
131
|
activeQuizId: activeQuizId,
|
|
119
132
|
addError: addError,
|
|
120
133
|
saveFile: saveFile,
|
|
121
134
|
analysisType: analysisType
|
|
122
135
|
};
|
|
123
|
-
_context4.next =
|
|
136
|
+
_context4.next = 8;
|
|
124
137
|
return triggerReportExport(exportConfig);
|
|
125
|
-
case
|
|
138
|
+
case 8:
|
|
126
139
|
case "end":
|
|
127
140
|
return _context4.stop();
|
|
128
141
|
}
|
|
@@ -8,10 +8,13 @@ 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");
|
|
11
12
|
var fetcher = new _Fetcher.default();
|
|
12
13
|
var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
13
14
|
var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(quizId) {
|
|
14
15
|
var filter,
|
|
16
|
+
isMultiAttemptEnabled,
|
|
17
|
+
selectedFilter,
|
|
15
18
|
url,
|
|
16
19
|
_args = arguments;
|
|
17
20
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -19,12 +22,14 @@ var fetchStudentAnalyses = /*#__PURE__*/function () {
|
|
|
19
22
|
switch (_context.prev = _context.next) {
|
|
20
23
|
case 0:
|
|
21
24
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
isMultiAttemptEnabled = (0, _featureCheck.featureOn)('student_analysis_multiple_attempts');
|
|
26
|
+
selectedFilter = isMultiAttemptEnabled ? 'all_attempts' : filter;
|
|
27
|
+
url = "/api/quizzes/".concat(quizId, "/analyses/student_analyses?filter=").concat(selectedFilter);
|
|
28
|
+
_context.next = 6;
|
|
24
29
|
return fetcher.get(url);
|
|
25
|
-
case
|
|
30
|
+
case 6:
|
|
26
31
|
return _context.abrupt("return", _context.sent);
|
|
27
|
-
case
|
|
32
|
+
case 7:
|
|
28
33
|
case "end":
|
|
29
34
|
return _context.stop();
|
|
30
35
|
}
|
|
@@ -10,6 +10,7 @@ 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");
|
|
13
14
|
var getFetcher = function getFetcher(format) {
|
|
14
15
|
var mimeType = formatsToMimeTypes.get(format);
|
|
15
16
|
if (!mimeType) {
|
|
@@ -31,6 +32,9 @@ var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
31
32
|
var filter,
|
|
32
33
|
analysisType,
|
|
33
34
|
fetcher,
|
|
35
|
+
isMultiAttemptEnabled,
|
|
36
|
+
isStudent_analysis,
|
|
37
|
+
selectedFilter,
|
|
34
38
|
url,
|
|
35
39
|
_args = arguments;
|
|
36
40
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -40,12 +44,15 @@ var getAnalysesExport = /*#__PURE__*/function () {
|
|
|
40
44
|
filter = _args.length > 2 && _args[2] !== void 0 ? _args[2] : 'last_attempt';
|
|
41
45
|
analysisType = _args.length > 3 && _args[3] !== void 0 ? _args[3] : _quizCommon.ITEM_ANALYSES;
|
|
42
46
|
fetcher = getFetcher(format);
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
isMultiAttemptEnabled = (0, _featureCheck.featureOn)('student_analysis_multiple_attempts');
|
|
48
|
+
isStudent_analysis = analysisType === 'student_analysis';
|
|
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;
|
|
45
52
|
return fetcher.get(url);
|
|
46
|
-
case
|
|
53
|
+
case 9:
|
|
47
54
|
return _context.abrupt("return", _context.sent);
|
|
48
|
-
case
|
|
55
|
+
case 10:
|
|
49
56
|
case "end":
|
|
50
57
|
return _context.stop();
|
|
51
58
|
}
|
|
@@ -9,11 +9,15 @@ 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");
|
|
12
13
|
var fetcher = new _Fetcher.default();
|
|
13
14
|
var getAnalysesStatus = /*#__PURE__*/function () {
|
|
14
15
|
var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(quizId) {
|
|
15
16
|
var filter,
|
|
16
17
|
analysisType,
|
|
18
|
+
isMultiAttemptEnabled,
|
|
19
|
+
isStudent_analysis,
|
|
20
|
+
selectedFilter,
|
|
17
21
|
url,
|
|
18
22
|
_args = arguments;
|
|
19
23
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -22,12 +26,15 @@ var getAnalysesStatus = /*#__PURE__*/function () {
|
|
|
22
26
|
case 0:
|
|
23
27
|
filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
|
|
24
28
|
analysisType = _args.length > 2 && _args[2] !== void 0 ? _args[2] : _quizCommon.ITEM_ANALYSES;
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
isMultiAttemptEnabled = (0, _featureCheck.featureOn)('student_analysis_multiple_attempts');
|
|
30
|
+
isStudent_analysis = analysisType === 'student_analysis';
|
|
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;
|
|
27
34
|
return fetcher.get(url);
|
|
28
|
-
case
|
|
35
|
+
case 8:
|
|
29
36
|
return _context.abrupt("return", _context.sent);
|
|
30
|
-
case
|
|
37
|
+
case 9:
|
|
31
38
|
case "end":
|
|
32
39
|
return _context.stop();
|
|
33
40
|
}
|
|
@@ -50,11 +50,14 @@ 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
|
+
};
|
|
53
56
|
_this.handleExport = function () {
|
|
54
|
-
_this.props.exportReport('csv',
|
|
57
|
+
_this.props.exportReport('csv', _this.getAttemptType(), _quizCommon.STUDENT_ANALYSES);
|
|
55
58
|
};
|
|
56
59
|
_this.handleGeneration = function () {
|
|
57
|
-
_this.props.generateReport(
|
|
60
|
+
_this.props.generateReport(_this.getAttemptType(), _quizCommon.STUDENT_ANALYSES);
|
|
58
61
|
};
|
|
59
62
|
_this.renderExportButton = function () {
|
|
60
63
|
var _this$props = _this.props,
|
package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportState.js
CHANGED
|
@@ -29,7 +29,8 @@ 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')
|
|
32
|
+
exportEnabled: (0, _featureCheck.featureOn)('student_analysis_csv'),
|
|
33
|
+
allAttemptsEnabled: (0, _featureCheck.featureOn)('student_analysis_multiple_attempts')
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
function mapDispatchToProps(dispatch, ownProps) {
|
|
@@ -20,6 +20,7 @@ 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");
|
|
23
24
|
var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReportStatePresenter(OriginalComponent) {
|
|
24
25
|
var StudentAnalysisReportStatePresenter = function StudentAnalysisReportStatePresenter(_ref) {
|
|
25
26
|
var studentAnalyses = _ref.studentAnalyses,
|
|
@@ -77,6 +78,9 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
77
78
|
_generateReport = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
78
79
|
var filter,
|
|
79
80
|
analysisType,
|
|
81
|
+
isMultiAttemptEnabled,
|
|
82
|
+
isStudentAnalysis,
|
|
83
|
+
selectedFilter,
|
|
80
84
|
generationConfig,
|
|
81
85
|
_args3 = arguments;
|
|
82
86
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
@@ -85,17 +89,20 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
85
89
|
case 0:
|
|
86
90
|
filter = _args3.length > 0 && _args3[0] !== void 0 ? _args3[0] : 'last_attempt';
|
|
87
91
|
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;
|
|
88
95
|
generationConfig = {
|
|
89
|
-
filter:
|
|
96
|
+
filter: selectedFilter,
|
|
90
97
|
analysisType: analysisType,
|
|
91
98
|
setGenerationInProgress: setGenerationInProgress,
|
|
92
99
|
setStatusPollingInProgress: setStatusPollingInProgress,
|
|
93
100
|
generateAnalysis: generateAnalysis,
|
|
94
101
|
addError: addError
|
|
95
102
|
};
|
|
96
|
-
_context3.next =
|
|
103
|
+
_context3.next = 8;
|
|
97
104
|
return (0, _generateReports.generateReports)(generationConfig);
|
|
98
|
-
case
|
|
105
|
+
case 8:
|
|
99
106
|
case "end":
|
|
100
107
|
return _context3.stop();
|
|
101
108
|
}
|
|
@@ -111,6 +118,9 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
111
118
|
_exportReport = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(format) {
|
|
112
119
|
var filter,
|
|
113
120
|
analysisType,
|
|
121
|
+
isMultiAttemptEnabled,
|
|
122
|
+
isStudentAnalysis,
|
|
123
|
+
selectedFilter,
|
|
114
124
|
exportConfig,
|
|
115
125
|
_args4 = arguments;
|
|
116
126
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
@@ -119,18 +129,21 @@ var withStudentAnalysisReportStatePresenter = function withStudentAnalysisReport
|
|
|
119
129
|
case 0:
|
|
120
130
|
filter = _args4.length > 1 && _args4[1] !== void 0 ? _args4[1] : 'last_attempt';
|
|
121
131
|
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;
|
|
122
135
|
exportConfig = {
|
|
123
136
|
getAnalysesExport: getAnalysesExport,
|
|
124
137
|
format: format,
|
|
125
|
-
filter:
|
|
138
|
+
filter: selectedFilter,
|
|
126
139
|
activeQuizId: activeQuizId,
|
|
127
140
|
addError: addError,
|
|
128
141
|
saveFile: _utils.saveFile,
|
|
129
142
|
analysisType: analysisType
|
|
130
143
|
};
|
|
131
|
-
_context4.next =
|
|
144
|
+
_context4.next = 8;
|
|
132
145
|
return (0, _exportReports.exportReports)(exportConfig);
|
|
133
|
-
case
|
|
146
|
+
case 8:
|
|
134
147
|
case "end":
|
|
135
148
|
return _context4.stop();
|
|
136
149
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.34.1-snapshot.
|
|
3
|
+
"version": "20.34.1-snapshot.8+728bb9952",
|
|
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-snapshot.
|
|
50
|
-
"@instructure/quiz-i18n": "^20.34.1-snapshot.
|
|
51
|
-
"@instructure/quiz-interactions": "^20.34.1-snapshot.
|
|
52
|
-
"@instructure/quiz-number-input": "^20.34.1-snapshot.
|
|
53
|
-
"@instructure/quiz-rce": "^20.34.1-snapshot.
|
|
49
|
+
"@instructure/quiz-common": "^20.34.1-snapshot.8+728bb9952",
|
|
50
|
+
"@instructure/quiz-i18n": "^20.34.1-snapshot.8+728bb9952",
|
|
51
|
+
"@instructure/quiz-interactions": "^20.34.1-snapshot.8+728bb9952",
|
|
52
|
+
"@instructure/quiz-number-input": "^20.34.1-snapshot.8+728bb9952",
|
|
53
|
+
"@instructure/quiz-rce": "^20.34.1-snapshot.8+728bb9952",
|
|
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-snapshot.
|
|
117
|
+
"instructure-validations": "^20.34.1-snapshot.8+728bb9952",
|
|
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-snapshot.
|
|
166
|
+
"quiz-presets": "^20.34.1-snapshot.8+728bb9952",
|
|
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": "728bb995209337d2c73dc40ee48a21e8872348e7"
|
|
183
183
|
}
|