@instructure/quiz-core 20.28.1-snapshot.2 → 20.29.1-snapshot.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [20.29.0](https://gerrit.instructure.com/quizzes-ui/compare/v20.28.0...v20.29.0) (2024-11-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * **quizzes-ui:** Add report card and client-side logic for Student Analysis report ([0f6a0bb](https://gerrit.instructure.com/quizzes-ui/commits/0f6a0bb6083ba41b5c53567d462aecb297c5a804))
12
+
13
+
14
+
15
+
16
+
6
17
  # [20.28.0](https://gerrit.instructure.com/quizzes-ui/compare/v20.27.0...v20.28.0) (2024-11-25)
7
18
 
8
19
 
@@ -1,4 +1,4 @@
1
- import { SET_QUIZ_ANALYSIS, SET_ITEM_ANALYSES, SET_STUDENT_ANALYSES, SET_ANALYSIS_FETCH_IN_PROGRESS, SET_STUDENT_ANALYSIS_FETCH_IN_PROGRESS, SET_ANALYSIS_GENERATION_IN_PROGRESS, SET_STUDENT_ANALYSIS_REPORT_GENERATION_IN_PROGRESS, SET_ANALYSIS_ERROR, SET_STATUS_POLLING_IN_PROGRESS, SET_STUDENT_ANALYSIS_STATUS_POLLING_IN_PROGRESS } from '@instructure/quiz-common';
1
+ import { SET_QUIZ_ANALYSIS, SET_ITEM_ANALYSES, SET_STUDENT_ANALYSES, SET_ANALYSIS_FETCH_IN_PROGRESS, SET_STUDENT_ANALYSIS_FETCH_IN_PROGRESS, SET_ANALYSIS_GENERATION_IN_PROGRESS, SET_STUDENT_ANALYSIS_REPORT_GENERATION_IN_PROGRESS, SET_ANALYSIS_ERROR, SET_STUDENT_ANALYSIS_ERROR, SET_STATUS_POLLING_IN_PROGRESS, SET_STUDENT_ANALYSIS_STATUS_POLLING_IN_PROGRESS } from '@instructure/quiz-common';
2
2
  export function setQuizAnalysis(quizAnalysis) {
3
3
  return {
4
4
  type: SET_QUIZ_ANALYSIS,
@@ -58,4 +58,10 @@ export function setAnalysisError(error) {
58
58
  type: SET_ANALYSIS_ERROR,
59
59
  payload: error
60
60
  };
61
+ }
62
+ export function setStudentAnalysisError(error) {
63
+ return {
64
+ type: SET_STUDENT_ANALYSIS_ERROR,
65
+ payload: error
66
+ };
61
67
  }
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  var _fromJS;
3
3
  import { fromJS } from 'immutable';
4
- import { SET_QUIZ_ANALYSIS, SET_ITEM_ANALYSES, SET_STUDENT_ANALYSES, SET_ANALYSIS_FETCH_IN_PROGRESS, SET_STUDENT_ANALYSIS_FETCH_IN_PROGRESS, SET_ANALYSIS_GENERATION_IN_PROGRESS, SET_STUDENT_ANALYSIS_REPORT_GENERATION_IN_PROGRESS, SET_STATUS_POLLING_IN_PROGRESS, SET_STUDENT_ANALYSIS_STATUS_POLLING_IN_PROGRESS, SET_ANALYSIS_ERROR } from '@instructure/quiz-common';
4
+ import { SET_QUIZ_ANALYSIS, SET_ITEM_ANALYSES, SET_STUDENT_ANALYSES, SET_ANALYSIS_FETCH_IN_PROGRESS, SET_STUDENT_ANALYSIS_FETCH_IN_PROGRESS, SET_ANALYSIS_GENERATION_IN_PROGRESS, SET_STUDENT_ANALYSIS_REPORT_GENERATION_IN_PROGRESS, SET_STATUS_POLLING_IN_PROGRESS, SET_STUDENT_ANALYSIS_STATUS_POLLING_IN_PROGRESS, SET_ANALYSIS_ERROR, SET_STUDENT_ANALYSIS_ERROR } from '@instructure/quiz-common';
5
5
  export var quizAnalysisKey = 'quizAnalysis';
6
6
  export var itemAnalysesKey = 'itemAnalyses';
7
7
  export var studentAnalysesKey = 'studentAnalyses';
@@ -12,7 +12,8 @@ export var studentAnalysisGenerationInProgressKey = 'studentAnalysisGenerationIn
12
12
  export var statusPollingInProgressKey = 'statusPollingInProgress';
13
13
  export var studentAnalysisStatusPollingInProgressKey = 'studentAnalysisStatusPollingInProgress';
14
14
  export var errorKey = 'analysisError';
15
- export var defaultState = fromJS((_fromJS = {}, _defineProperty(_fromJS, quizAnalysisKey, void 0), _defineProperty(_fromJS, itemAnalysesKey, void 0), _defineProperty(_fromJS, studentAnalysesKey, void 0), _defineProperty(_fromJS, fetchInProgressKey, true), _defineProperty(_fromJS, studentAnalysisFetchInProgressKey, false), _defineProperty(_fromJS, generationInProgressKey, false), _defineProperty(_fromJS, studentAnalysisGenerationInProgressKey, false), _defineProperty(_fromJS, statusPollingInProgressKey, false), _defineProperty(_fromJS, studentAnalysisStatusPollingInProgressKey, false), _defineProperty(_fromJS, errorKey, void 0), _fromJS));
15
+ export var studentAnalysisErrorKey = 'studentAnalysisError';
16
+ export var defaultState = fromJS((_fromJS = {}, _defineProperty(_fromJS, quizAnalysisKey, void 0), _defineProperty(_fromJS, itemAnalysesKey, void 0), _defineProperty(_fromJS, studentAnalysesKey, void 0), _defineProperty(_fromJS, fetchInProgressKey, true), _defineProperty(_fromJS, studentAnalysisFetchInProgressKey, false), _defineProperty(_fromJS, generationInProgressKey, false), _defineProperty(_fromJS, studentAnalysisGenerationInProgressKey, false), _defineProperty(_fromJS, statusPollingInProgressKey, false), _defineProperty(_fromJS, studentAnalysisStatusPollingInProgressKey, false), _defineProperty(_fromJS, errorKey, void 0), _defineProperty(_fromJS, studentAnalysisErrorKey, void 0), _fromJS));
16
17
  export default (function () {
17
18
  var state = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultState;
18
19
  var action = arguments.length > 1 ? arguments[1] : void 0;
@@ -37,6 +38,8 @@ export default (function () {
37
38
  return state.set(studentAnalysisStatusPollingInProgressKey, action.payload);
38
39
  case SET_ANALYSIS_ERROR:
39
40
  return state.set(errorKey, action.payload);
41
+ case SET_STUDENT_ANALYSIS_ERROR:
42
+ return state.set(studentAnalysisErrorKey, action.payload);
40
43
  default:
41
44
  return state;
42
45
  }
@@ -31,4 +31,7 @@ export var getStudentAnalysisGenerationInProgress = function getStudentAnalysisG
31
31
  };
32
32
  export var getAnalysisError = function getAnalysisError(state) {
33
33
  return state.getIn([path, 'analysisError']);
34
+ };
35
+ export var getStudentAnalysisError = function getStudentAnalysisError(state) {
36
+ return state.getIn([path, 'studentAnalysisError']);
34
37
  };
@@ -15,7 +15,7 @@ export var getAnalysesStatus = /*#__PURE__*/function () {
15
15
  case 0:
16
16
  filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
17
17
  analysisType = _args.length > 2 && _args[2] !== void 0 ? _args[2] : ITEM_ANALYSES;
18
- url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(filter, "&analysisType=").concat(analysisType);
18
+ url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(filter, "&analysis_type=").concat(analysisType);
19
19
  _context.next = 5;
20
20
  return fetcher.get(url);
21
21
  case 5:
@@ -2,21 +2,21 @@ import { connect } from "../../../../common/react-redux.js";
2
2
  import { featureOn } from "../../../../common/util/featureCheck.js";
3
3
  import { withStudentAnalysisReportStatePresenter } from "./withStudentAnalysisReportStatePresenter.js";
4
4
  import { bindActionCreators, compose } from 'redux';
5
- import { getStudentAnalyses, getStudentAnalysisFetchInProgress, getStudentAnalysisGenerationInProgress, getAnalysisError, getStudentAnalysisStatusPollingInProgress } from "../../../../common/selectors/analyses.js";
6
- import { setStudentAnalyses, setStudentAnalysisFetchInProgress, setStudentAnalysesGenerationInProgress, setAnalysisError, setStudentAnalysisStatusPollingInProgress } from "../../../../common/actions/analyses.js";
5
+ import { getStudentAnalyses, getStudentAnalysisFetchInProgress, getStudentAnalysisGenerationInProgress, getStudentAnalysisError, getStudentAnalysisStatusPollingInProgress } from "../../../../common/selectors/analyses.js";
6
+ import { setStudentAnalyses, setStudentAnalysisFetchInProgress, setStudentAnalysesGenerationInProgress, setStudentAnalysisError, setStudentAnalysisStatusPollingInProgress } from "../../../../common/actions/analyses.js";
7
7
  import { getAnalysesStatus as fetchAnalysesStatus } from "../../../api/getAnalysesStatus.js";
8
8
  import { fetchStudentAnalyses } from "../../../api/fetchStudentAnalyses.js";
9
9
  import { addError } from "../../../../common/actions/alerts.js";
10
10
  import { getActiveQuizId } from "../../../../common/selectors/quizzes.js";
11
11
  import { getAnalysesExport } from "../../../api/getAnalysesExport.js";
12
12
  var DEFAULT_POLLING_INTERVAL = 3000;
13
- var mapStateToProps = function mapStateToProps(state, ownProps) {
13
+ function mapStateToProps(state, ownProps) {
14
14
  return {
15
15
  studentAnalyses: getStudentAnalyses(state),
16
16
  fetchInProgress: getStudentAnalysisFetchInProgress(state),
17
17
  generationInProgress: getStudentAnalysisGenerationInProgress(state),
18
18
  statusPollingInProgress: getStudentAnalysisStatusPollingInProgress(state),
19
- analysisError: getAnalysisError(state),
19
+ analysisError: getStudentAnalysisError(state),
20
20
  activeQuizId: ownProps.activeQuizId || getActiveQuizId(state),
21
21
  getAnalysesExport: getAnalysesExport,
22
22
  fetchStudentAnalyses: fetchStudentAnalyses,
@@ -24,16 +24,16 @@ var mapStateToProps = function mapStateToProps(state, ownProps) {
24
24
  pollingInterval: ownProps.pollingInterval || DEFAULT_POLLING_INTERVAL,
25
25
  exportEnabled: featureOn('student_analysis_csv')
26
26
  };
27
- };
28
- var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
27
+ }
28
+ export function mapDispatchToProps(dispatch, ownProps) {
29
29
  return {
30
30
  setStudentAnalyses: bindActionCreators(setStudentAnalyses, dispatch),
31
31
  setFetchInProgress: bindActionCreators(setStudentAnalysisFetchInProgress, dispatch),
32
32
  setGenerationInProgress: bindActionCreators(setStudentAnalysesGenerationInProgress, dispatch),
33
- setAnalysisError: bindActionCreators(setAnalysisError, dispatch),
33
+ setAnalysisError: bindActionCreators(setStudentAnalysisError, dispatch),
34
34
  addError: ownProps.addError || bindActionCreators(addError, dispatch),
35
35
  setStatusPollingInProgress: bindActionCreators(setStudentAnalysisStatusPollingInProgress, dispatch)
36
36
  };
37
- };
37
+ }
38
38
  var withStudentAnalysisReportState = compose(connect(mapStateToProps, mapDispatchToProps), withStudentAnalysisReportStatePresenter);
39
39
  export default withStudentAnalysisReportState;
@@ -6,12 +6,12 @@ import { DEFAULT_ALERT_TIME } from '@instructure/quiz-common';
6
6
  var DEFAULT_ERROR_MSG = getReportGenerationFailure();
7
7
  export var generateReports = /*#__PURE__*/function () {
8
8
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref) {
9
- var setGenerationInProgress, setStatusPollingInProgress, generateAnalysis, filter, addError, onError, _requestResult$respon, requestResult;
9
+ var setGenerationInProgress, setStatusPollingInProgress, generateAnalysis, analysisType, filter, addError, onError, _requestResult$respon, requestResult;
10
10
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
11
11
  while (1) {
12
12
  switch (_context2.prev = _context2.next) {
13
13
  case 0:
14
- setGenerationInProgress = _ref.setGenerationInProgress, setStatusPollingInProgress = _ref.setStatusPollingInProgress, generateAnalysis = _ref.generateAnalysis, filter = _ref.filter, addError = _ref.addError;
14
+ setGenerationInProgress = _ref.setGenerationInProgress, setStatusPollingInProgress = _ref.setStatusPollingInProgress, generateAnalysis = _ref.generateAnalysis, analysisType = _ref.analysisType, filter = _ref.filter, addError = _ref.addError;
15
15
  onError = /*#__PURE__*/function () {
16
16
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(error) {
17
17
  var errorMessage, alertTimeout, _responseBody$error, responseBody, errorCode;
@@ -55,7 +55,7 @@ export var generateReports = /*#__PURE__*/function () {
55
55
  _context2.prev = 2;
56
56
  setGenerationInProgress(true);
57
57
  _context2.next = 6;
58
- return generateAnalysis(filter, onError);
58
+ return generateAnalysis(filter, onError, analysisType);
59
59
  case 6:
60
60
  requestResult = _context2.sent;
61
61
  if (requestResult === null || requestResult === void 0 ? void 0 : (_requestResult$respon = requestResult.response) === null || _requestResult$respon === void 0 ? void 0 : _requestResult$respon.ok) {
@@ -13,6 +13,7 @@ exports.setStudentAnalysisStatusPollingInProgress = setStudentAnalysisStatusPoll
13
13
  exports.setGenerationInProgress = setGenerationInProgress;
14
14
  exports.setStudentAnalysesGenerationInProgress = setStudentAnalysesGenerationInProgress;
15
15
  exports.setAnalysisError = setAnalysisError;
16
+ exports.setStudentAnalysisError = setStudentAnalysisError;
16
17
  var _quizCommon = require("@instructure/quiz-common");
17
18
  function setQuizAnalysis(quizAnalysis) {
18
19
  return {
@@ -73,4 +74,10 @@ function setAnalysisError(error) {
73
74
  type: _quizCommon.SET_ANALYSIS_ERROR,
74
75
  payload: error
75
76
  };
77
+ }
78
+ function setStudentAnalysisError(error) {
79
+ return {
80
+ type: _quizCommon.SET_STUDENT_ANALYSIS_ERROR,
81
+ payload: error
82
+ };
76
83
  }
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.defaultState = exports.errorKey = exports.studentAnalysisStatusPollingInProgressKey = exports.statusPollingInProgressKey = exports.studentAnalysisGenerationInProgressKey = exports.generationInProgressKey = exports.studentAnalysisFetchInProgressKey = exports.fetchInProgressKey = exports.studentAnalysesKey = exports.itemAnalysesKey = exports.quizAnalysisKey = void 0;
7
+ exports.default = exports.defaultState = exports.studentAnalysisErrorKey = exports.errorKey = exports.studentAnalysisStatusPollingInProgressKey = exports.statusPollingInProgressKey = exports.studentAnalysisGenerationInProgressKey = exports.generationInProgressKey = exports.studentAnalysisFetchInProgressKey = exports.fetchInProgressKey = exports.studentAnalysesKey = exports.itemAnalysesKey = exports.quizAnalysisKey = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _immutable = require("immutable");
10
10
  var _quizCommon = require("@instructure/quiz-common");
@@ -29,7 +29,9 @@ var studentAnalysisStatusPollingInProgressKey = 'studentAnalysisStatusPollingInP
29
29
  exports.studentAnalysisStatusPollingInProgressKey = studentAnalysisStatusPollingInProgressKey;
30
30
  var errorKey = 'analysisError';
31
31
  exports.errorKey = errorKey;
32
- var defaultState = (0, _immutable.fromJS)((_fromJS = {}, (0, _defineProperty2.default)(_fromJS, quizAnalysisKey, void 0), (0, _defineProperty2.default)(_fromJS, itemAnalysesKey, void 0), (0, _defineProperty2.default)(_fromJS, studentAnalysesKey, void 0), (0, _defineProperty2.default)(_fromJS, fetchInProgressKey, true), (0, _defineProperty2.default)(_fromJS, studentAnalysisFetchInProgressKey, false), (0, _defineProperty2.default)(_fromJS, generationInProgressKey, false), (0, _defineProperty2.default)(_fromJS, studentAnalysisGenerationInProgressKey, false), (0, _defineProperty2.default)(_fromJS, statusPollingInProgressKey, false), (0, _defineProperty2.default)(_fromJS, studentAnalysisStatusPollingInProgressKey, false), (0, _defineProperty2.default)(_fromJS, errorKey, void 0), _fromJS));
32
+ var studentAnalysisErrorKey = 'studentAnalysisError';
33
+ exports.studentAnalysisErrorKey = studentAnalysisErrorKey;
34
+ var defaultState = (0, _immutable.fromJS)((_fromJS = {}, (0, _defineProperty2.default)(_fromJS, quizAnalysisKey, void 0), (0, _defineProperty2.default)(_fromJS, itemAnalysesKey, void 0), (0, _defineProperty2.default)(_fromJS, studentAnalysesKey, void 0), (0, _defineProperty2.default)(_fromJS, fetchInProgressKey, true), (0, _defineProperty2.default)(_fromJS, studentAnalysisFetchInProgressKey, false), (0, _defineProperty2.default)(_fromJS, generationInProgressKey, false), (0, _defineProperty2.default)(_fromJS, studentAnalysisGenerationInProgressKey, false), (0, _defineProperty2.default)(_fromJS, statusPollingInProgressKey, false), (0, _defineProperty2.default)(_fromJS, studentAnalysisStatusPollingInProgressKey, false), (0, _defineProperty2.default)(_fromJS, errorKey, void 0), (0, _defineProperty2.default)(_fromJS, studentAnalysisErrorKey, void 0), _fromJS));
33
35
  exports.defaultState = defaultState;
34
36
  var _default = function _default() {
35
37
  var state = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultState;
@@ -55,6 +57,8 @@ var _default = function _default() {
55
57
  return state.set(studentAnalysisStatusPollingInProgressKey, action.payload);
56
58
  case _quizCommon.SET_ANALYSIS_ERROR:
57
59
  return state.set(errorKey, action.payload);
60
+ case _quizCommon.SET_STUDENT_ANALYSIS_ERROR:
61
+ return state.set(studentAnalysisErrorKey, action.payload);
58
62
  default:
59
63
  return state;
60
64
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getAnalysisError = exports.getStudentAnalysisGenerationInProgress = exports.getGenerationInProgress = exports.getStudentAnalysisStatusPollingInProgress = exports.getStatusPollingInProgress = exports.getStudentAnalysisFetchInProgress = exports.getFetchInProgress = exports.getStudentAnalyses = exports.getItemAnalyses = exports.getQuizAnalysis = void 0;
6
+ exports.getStudentAnalysisError = exports.getAnalysisError = exports.getStudentAnalysisGenerationInProgress = exports.getGenerationInProgress = exports.getStudentAnalysisStatusPollingInProgress = exports.getStatusPollingInProgress = exports.getStudentAnalysisFetchInProgress = exports.getFetchInProgress = exports.getStudentAnalyses = exports.getItemAnalyses = exports.getQuizAnalysis = void 0;
7
7
  var path = 'analyses';
8
8
  var getQuizAnalysis = function getQuizAnalysis(state) {
9
9
  var _state$getIn;
@@ -47,4 +47,8 @@ exports.getStudentAnalysisGenerationInProgress = getStudentAnalysisGenerationInP
47
47
  var getAnalysisError = function getAnalysisError(state) {
48
48
  return state.getIn([path, 'analysisError']);
49
49
  };
50
- exports.getAnalysisError = getAnalysisError;
50
+ exports.getAnalysisError = getAnalysisError;
51
+ var getStudentAnalysisError = function getStudentAnalysisError(state) {
52
+ return state.getIn([path, 'studentAnalysisError']);
53
+ };
54
+ exports.getStudentAnalysisError = getStudentAnalysisError;
@@ -22,7 +22,7 @@ var getAnalysesStatus = /*#__PURE__*/function () {
22
22
  case 0:
23
23
  filter = _args.length > 1 && _args[1] !== void 0 ? _args[1] : 'last_attempt';
24
24
  analysisType = _args.length > 2 && _args[2] !== void 0 ? _args[2] : _quizCommon.ITEM_ANALYSES;
25
- url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(filter, "&analysisType=").concat(analysisType);
25
+ url = "/api/quizzes/".concat(quizId, "/analyses/status?filter=").concat(filter, "&analysis_type=").concat(analysisType);
26
26
  _context.next = 5;
27
27
  return fetcher.get(url);
28
28
  case 5:
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.mapDispatchToProps = mapDispatchToProps;
6
7
  exports.default = void 0;
7
8
  var _reactRedux = require("../../../../common/react-redux.js");
8
9
  var _featureCheck = require("../../../../common/util/featureCheck.js");
@@ -16,13 +17,13 @@ var _alerts = require("../../../../common/actions/alerts.js");
16
17
  var _quizzes = require("../../../../common/selectors/quizzes.js");
17
18
  var _getAnalysesExport = require("../../../api/getAnalysesExport.js");
18
19
  var DEFAULT_POLLING_INTERVAL = 3000;
19
- var mapStateToProps = function mapStateToProps(state, ownProps) {
20
+ function mapStateToProps(state, ownProps) {
20
21
  return {
21
22
  studentAnalyses: (0, _analyses.getStudentAnalyses)(state),
22
23
  fetchInProgress: (0, _analyses.getStudentAnalysisFetchInProgress)(state),
23
24
  generationInProgress: (0, _analyses.getStudentAnalysisGenerationInProgress)(state),
24
25
  statusPollingInProgress: (0, _analyses.getStudentAnalysisStatusPollingInProgress)(state),
25
- analysisError: (0, _analyses.getAnalysisError)(state),
26
+ analysisError: (0, _analyses.getStudentAnalysisError)(state),
26
27
  activeQuizId: ownProps.activeQuizId || (0, _quizzes.getActiveQuizId)(state),
27
28
  getAnalysesExport: _getAnalysesExport.getAnalysesExport,
28
29
  fetchStudentAnalyses: _fetchStudentAnalyses.fetchStudentAnalyses,
@@ -30,17 +31,17 @@ var mapStateToProps = function mapStateToProps(state, ownProps) {
30
31
  pollingInterval: ownProps.pollingInterval || DEFAULT_POLLING_INTERVAL,
31
32
  exportEnabled: (0, _featureCheck.featureOn)('student_analysis_csv')
32
33
  };
33
- };
34
- var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
34
+ }
35
+ function mapDispatchToProps(dispatch, ownProps) {
35
36
  return {
36
37
  setStudentAnalyses: (0, _redux.bindActionCreators)(_analyses2.setStudentAnalyses, dispatch),
37
38
  setFetchInProgress: (0, _redux.bindActionCreators)(_analyses2.setStudentAnalysisFetchInProgress, dispatch),
38
39
  setGenerationInProgress: (0, _redux.bindActionCreators)(_analyses2.setStudentAnalysesGenerationInProgress, dispatch),
39
- setAnalysisError: (0, _redux.bindActionCreators)(_analyses2.setAnalysisError, dispatch),
40
+ setAnalysisError: (0, _redux.bindActionCreators)(_analyses2.setStudentAnalysisError, dispatch),
40
41
  addError: ownProps.addError || (0, _redux.bindActionCreators)(_alerts.addError, dispatch),
41
42
  setStatusPollingInProgress: (0, _redux.bindActionCreators)(_analyses2.setStudentAnalysisStatusPollingInProgress, dispatch)
42
43
  };
43
- };
44
+ }
44
45
  var withStudentAnalysisReportState = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), _withStudentAnalysisReportStatePresenter.withStudentAnalysisReportStatePresenter);
45
46
  var _default = withStudentAnalysisReportState;
46
47
  exports.default = _default;
@@ -13,12 +13,12 @@ var _quizCommon = require("@instructure/quiz-common");
13
13
  var DEFAULT_ERROR_MSG = (0, _errorMessages.getReportGenerationFailure)();
14
14
  var generateReports = /*#__PURE__*/function () {
15
15
  var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(_ref) {
16
- var setGenerationInProgress, setStatusPollingInProgress, generateAnalysis, filter, addError, onError, _requestResult$respon, requestResult;
16
+ var setGenerationInProgress, setStatusPollingInProgress, generateAnalysis, analysisType, filter, addError, onError, _requestResult$respon, requestResult;
17
17
  return _regenerator.default.wrap(function _callee2$(_context2) {
18
18
  while (1) {
19
19
  switch (_context2.prev = _context2.next) {
20
20
  case 0:
21
- setGenerationInProgress = _ref.setGenerationInProgress, setStatusPollingInProgress = _ref.setStatusPollingInProgress, generateAnalysis = _ref.generateAnalysis, filter = _ref.filter, addError = _ref.addError;
21
+ setGenerationInProgress = _ref.setGenerationInProgress, setStatusPollingInProgress = _ref.setStatusPollingInProgress, generateAnalysis = _ref.generateAnalysis, analysisType = _ref.analysisType, filter = _ref.filter, addError = _ref.addError;
22
22
  onError = /*#__PURE__*/function () {
23
23
  var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(error) {
24
24
  var errorMessage, alertTimeout, _responseBody$error, responseBody, errorCode;
@@ -62,7 +62,7 @@ var generateReports = /*#__PURE__*/function () {
62
62
  _context2.prev = 2;
63
63
  setGenerationInProgress(true);
64
64
  _context2.next = 6;
65
- return generateAnalysis(filter, onError);
65
+ return generateAnalysis(filter, onError, analysisType);
66
66
  case 6:
67
67
  requestResult = _context2.sent;
68
68
  if (requestResult === null || requestResult === void 0 ? void 0 : (_requestResult$respon = requestResult.response) === null || _requestResult$respon === void 0 ? void 0 : _requestResult$respon.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.28.1-snapshot.2+b92f3f742",
3
+ "version": "20.29.1-snapshot.0+36806d814",
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.2.2",
47
- "@instructure/quiz-common": "20.28.1-snapshot.2+b92f3f742",
48
- "@instructure/quiz-i18n": "20.28.1-snapshot.2+b92f3f742",
49
- "@instructure/quiz-interactions": "20.28.1-snapshot.2+b92f3f742",
50
- "@instructure/quiz-number-input": "20.28.1-snapshot.2+b92f3f742",
51
- "@instructure/quiz-rce": "20.28.1-snapshot.2+b92f3f742",
47
+ "@instructure/quiz-common": "20.29.1-snapshot.0+36806d814",
48
+ "@instructure/quiz-i18n": "20.29.1-snapshot.0+36806d814",
49
+ "@instructure/quiz-interactions": "20.29.1-snapshot.0+36806d814",
50
+ "@instructure/quiz-number-input": "20.29.1-snapshot.0+36806d814",
51
+ "@instructure/quiz-rce": "20.29.1-snapshot.0+36806d814",
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.28.1-snapshot.2+b92f3f742",
115
+ "instructure-validations": "20.29.1-snapshot.0+36806d814",
116
116
  "ipaddr.js": "^1.5.4",
117
117
  "isomorphic-fetch": "^2.2.0",
118
118
  "isuuid": "^0.1.0",
@@ -143,7 +143,7 @@
143
143
  "uuid": "^3.2.1"
144
144
  },
145
145
  "devDependencies": {
146
- "@instructure/quiz-scripts": "20.28.0",
146
+ "@instructure/quiz-scripts": "20.29.0",
147
147
  "@instructure/ui-axe-check": "^8.51.0",
148
148
  "@instructure/ui-babel-preset": "^7.22.1",
149
149
  "@instructure/ui-test-utils": "^7.22.1",
@@ -161,7 +161,7 @@
161
161
  "jquery": "^2.2.3",
162
162
  "karma-junit-reporter": "^2.0.1",
163
163
  "most-subject": "^5.3.0",
164
- "quiz-presets": "20.28.1-snapshot.2+b92f3f742",
164
+ "quiz-presets": "20.29.1-snapshot.0+36806d814",
165
165
  "react": "^16.8.6",
166
166
  "react-addons-test-utils": "^15.6.2",
167
167
  "react-dom": "^16.8.6",
@@ -177,5 +177,5 @@
177
177
  "publishConfig": {
178
178
  "access": "public"
179
179
  },
180
- "gitHead": "b92f3f7426a349d648aad9cdda20a6e19e4bb6fe"
180
+ "gitHead": "36806d81431ee1d71e834e2f183263ceb3121254"
181
181
  }