@instructure/quiz-core 17.54.1 → 17.54.2-rc.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.
@@ -37,7 +37,7 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
37
37
  useEffect(function () {
38
38
  var fetch = /*#__PURE__*/function () {
39
39
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
40
- var quizAnalysis;
40
+ var response;
41
41
  return _regeneratorRuntime.wrap(function _callee$(_context) {
42
42
  while (1) {
43
43
  switch (_context.prev = _context.next) {
@@ -46,8 +46,8 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
46
46
  return getQuizAnalysis(activeQuizId);
47
47
 
48
48
  case 2:
49
- quizAnalysis = _context.sent;
50
- setQuizAnalysis(quizAnalysis);
49
+ response = _context.sent;
50
+ setQuizAnalysis(response.last_successful_analysis);
51
51
 
52
52
  case 4:
53
53
  case "end":
@@ -67,7 +67,7 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
67
67
  useEffect(function () {
68
68
  var fetch = /*#__PURE__*/function () {
69
69
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
70
- var itemAnalyses;
70
+ var response;
71
71
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
72
72
  while (1) {
73
73
  switch (_context2.prev = _context2.next) {
@@ -76,8 +76,8 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
76
76
  return getItemAnalyses(activeQuizId);
77
77
 
78
78
  case 2:
79
- itemAnalyses = _context2.sent;
80
- setItemAnalyses(itemAnalyses);
79
+ response = _context2.sent;
80
+ setItemAnalyses(response.last_successful_analysis);
81
81
 
82
82
  case 4:
83
83
  case "end":
@@ -120,7 +120,7 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
120
120
  }, /*#__PURE__*/React.createElement(Metric, {
121
121
  key: "itemdifficulty",
122
122
  renderLabel: "ITEM DIFFICULTY",
123
- renderValue: itemAnalysis.scores.difficulty
123
+ renderValue: itemAnalysis.scores.difficulty_index
124
124
  }), /*#__PURE__*/React.createElement(Metric, {
125
125
  key: "responded",
126
126
  renderLabel: "RESPONDED",
@@ -55,7 +55,7 @@ var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
55
55
  (0, _react.useEffect)(function () {
56
56
  var fetch = /*#__PURE__*/function () {
57
57
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
58
- var quizAnalysis;
58
+ var response;
59
59
  return _regenerator.default.wrap(function _callee$(_context) {
60
60
  while (1) {
61
61
  switch (_context.prev = _context.next) {
@@ -64,8 +64,8 @@ var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
64
64
  return getQuizAnalysis(activeQuizId);
65
65
 
66
66
  case 2:
67
- quizAnalysis = _context.sent;
68
- setQuizAnalysis(quizAnalysis);
67
+ response = _context.sent;
68
+ setQuizAnalysis(response.last_successful_analysis);
69
69
 
70
70
  case 4:
71
71
  case "end":
@@ -85,7 +85,7 @@ var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
85
85
  (0, _react.useEffect)(function () {
86
86
  var fetch = /*#__PURE__*/function () {
87
87
  var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
88
- var itemAnalyses;
88
+ var response;
89
89
  return _regenerator.default.wrap(function _callee2$(_context2) {
90
90
  while (1) {
91
91
  switch (_context2.prev = _context2.next) {
@@ -94,8 +94,8 @@ var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
94
94
  return getItemAnalyses(activeQuizId);
95
95
 
96
96
  case 2:
97
- itemAnalyses = _context2.sent;
98
- setItemAnalyses(itemAnalyses);
97
+ response = _context2.sent;
98
+ setItemAnalyses(response.last_successful_analysis);
99
99
 
100
100
  case 4:
101
101
  case "end":
@@ -138,7 +138,7 @@ var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
138
138
  }, /*#__PURE__*/_react.default.createElement(_uiMetric.Metric, {
139
139
  key: "itemdifficulty",
140
140
  renderLabel: "ITEM DIFFICULTY",
141
- renderValue: itemAnalysis.scores.difficulty
141
+ renderValue: itemAnalysis.scores.difficulty_index
142
142
  }), /*#__PURE__*/_react.default.createElement(_uiMetric.Metric, {
143
143
  key: "responded",
144
144
  renderLabel: "RESPONDED",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "17.54.1",
3
+ "version": "17.54.2-rc.0+b07c30ace",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -41,11 +41,11 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "@instructure/outcomes-ui": "^2.1.7",
44
- "@instructure/quiz-common": "^17.54.1",
45
- "@instructure/quiz-i18n": "^17.54.1",
46
- "@instructure/quiz-interactions": "^17.54.1",
47
- "@instructure/quiz-number-input": "^17.54.1",
48
- "@instructure/quiz-rce": "^17.54.1",
44
+ "@instructure/quiz-common": "17.54.2-rc.0+b07c30ace",
45
+ "@instructure/quiz-i18n": "17.54.2-rc.0+b07c30ace",
46
+ "@instructure/quiz-interactions": "17.54.2-rc.0+b07c30ace",
47
+ "@instructure/quiz-number-input": "17.54.2-rc.0+b07c30ace",
48
+ "@instructure/quiz-rce": "17.54.2-rc.0+b07c30ace",
49
49
  "@instructure/ui-a11y-content": "^7.20.0",
50
50
  "@instructure/ui-alerts": "^7.20.0",
51
51
  "@instructure/ui-avatar": "^7.20.0",
@@ -106,7 +106,7 @@
106
106
  "eventemitter3": "^3.1.0",
107
107
  "humps": "^2.0.0",
108
108
  "immutable": "^3.8.1",
109
- "instructure-validations": "^17.54.1",
109
+ "instructure-validations": "17.54.2-rc.0+b07c30ace",
110
110
  "ipaddr.js": "^1.5.4",
111
111
  "isomorphic-fetch": "^2.2.0",
112
112
  "isuuid": "^0.1.0",
@@ -137,7 +137,7 @@
137
137
  "uuid": "^3.2.1"
138
138
  },
139
139
  "devDependencies": {
140
- "@instructure/quiz-scripts": "^17.54.1",
140
+ "@instructure/quiz-scripts": "17.54.1",
141
141
  "@instructure/ui-axe-check": "^7.20.0",
142
142
  "@instructure/ui-babel-preset": "^7.20.0",
143
143
  "@instructure/ui-karma-config": "^7.20.0",
@@ -156,7 +156,7 @@
156
156
  "intl": "^1.2.4",
157
157
  "jquery": "^2.2.3",
158
158
  "most-subject": "^5.3.0",
159
- "quiz-presets": "^17.54.1",
159
+ "quiz-presets": "17.54.2-rc.0+b07c30ace",
160
160
  "react": "^16.8.6",
161
161
  "react-addons-test-utils": "^15.6.2",
162
162
  "react-dom": "^16.8.6",
@@ -172,5 +172,5 @@
172
172
  "publishConfig": {
173
173
  "access": "public"
174
174
  },
175
- "gitHead": "1f4c62039454947c3ee0423e72cacd24fa9700ed"
175
+ "gitHead": "b07c30aced5b736b1d626cba3a2968784be12017"
176
176
  }