@instructure/quiz-core 18.4.1-rc.5 → 18.4.1-rc.6
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/NewQuizAnalysis/presenter.js +1 -12
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +37 -10
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +1 -13
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +37 -10
- package/package.json +9 -9
package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -5,7 +5,6 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
import { Heading } from '@instructure/ui-heading';
|
|
9
8
|
import React, { Component } from 'react';
|
|
10
9
|
var styles = {
|
|
11
10
|
componentId: 'eHqQt',
|
|
@@ -80,21 +79,11 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
80
79
|
_this.renderContent = function () {
|
|
81
80
|
var quizAnalysis = _this.props.quizAnalysis;
|
|
82
81
|
var scores = quizAnalysis.scores,
|
|
83
|
-
attempts = quizAnalysis.attempts
|
|
84
|
-
metadata = quizAnalysis.metadata;
|
|
82
|
+
attempts = quizAnalysis.attempts;
|
|
85
83
|
var expanded = _this.state.expanded;
|
|
86
84
|
return /*#__PURE__*/React.createElement(Card, {
|
|
87
85
|
className: styles.cardWrapper
|
|
88
86
|
}, /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: styles.heading
|
|
90
|
-
}, /*#__PURE__*/React.createElement(Heading, {
|
|
91
|
-
level: "h2",
|
|
92
|
-
theme: {
|
|
93
|
-
h2FontWeight: 700
|
|
94
|
-
},
|
|
95
|
-
margin: "0 x-large 0 0",
|
|
96
|
-
color: "primary"
|
|
97
|
-
}, t('Quiz summary:'), " ", metadata === null || metadata === void 0 ? void 0 : metadata.quiz_title)), /*#__PURE__*/React.createElement("div", {
|
|
98
87
|
className: styles.metricGroup
|
|
99
88
|
}, /*#__PURE__*/React.createElement("div", {
|
|
100
89
|
className: styles.metricsWrapper
|
|
@@ -85,6 +85,27 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
|
|
|
85
85
|
}, getFailedToFetchReports())));
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
+
_this.renderHeader = function () {
|
|
89
|
+
var _quizAnalysis$metadat;
|
|
90
|
+
|
|
91
|
+
var quizAnalysis = _this.props.quizAnalysis;
|
|
92
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
width: "auto",
|
|
95
|
+
margin: "auto",
|
|
96
|
+
direction: "column"
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
98
|
+
overflowY: "hidden"
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
100
|
+
level: "h2",
|
|
101
|
+
theme: {
|
|
102
|
+
h2FontWeight: 700
|
|
103
|
+
},
|
|
104
|
+
margin: "0 x-large 0 0",
|
|
105
|
+
color: "primary"
|
|
106
|
+
}, quizAnalysis === null || quizAnalysis === void 0 ? void 0 : (_quizAnalysis$metadat = quizAnalysis.metadata) === null || _quizAnalysis$metadat === void 0 ? void 0 : _quizAnalysis$metadat.quiz_title)));
|
|
107
|
+
};
|
|
108
|
+
|
|
88
109
|
_this.renderTop = function () {
|
|
89
110
|
var _this$props = _this.props,
|
|
90
111
|
analysisError = _this$props.analysisError,
|
|
@@ -92,19 +113,28 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
|
|
|
92
113
|
quizAnalysis = _this$props.quizAnalysis;
|
|
93
114
|
var shouldShowError = analysisError && !generationInProgress;
|
|
94
115
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
justifyItems: "space-between",
|
|
117
|
+
alignItems: "center",
|
|
118
|
+
wrap: "wrap",
|
|
119
|
+
width: "auto",
|
|
97
120
|
margin: "auto",
|
|
98
|
-
direction: "
|
|
121
|
+
direction: "row"
|
|
122
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, null, _this.renderHeader()), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(Flex, {
|
|
123
|
+
alignItems: "center",
|
|
124
|
+
width: "auto",
|
|
125
|
+
margin: "auto",
|
|
126
|
+
direction: "row"
|
|
99
127
|
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
128
|
+
margin: "small"
|
|
129
|
+
}, /*#__PURE__*/React.createElement(AnalysisUpdateDate, {
|
|
130
|
+
date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
|
|
131
|
+
})), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
100
132
|
overflowY: "visible"
|
|
101
133
|
}, _this.renderGenerationButton()), /*#__PURE__*/React.createElement(Flex.Item, null, shouldShowError && /*#__PURE__*/React.createElement(Text, {
|
|
102
134
|
size: "x-small",
|
|
103
135
|
weight: "bold",
|
|
104
136
|
color: "danger"
|
|
105
|
-
}, analysisError))
|
|
106
|
-
date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
|
|
107
|
-
})));
|
|
137
|
+
}, analysisError)))));
|
|
108
138
|
};
|
|
109
139
|
|
|
110
140
|
_this.renderTopOnFailedFetch = function () {
|
|
@@ -148,10 +178,7 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
|
|
|
148
178
|
_this.renderGenerationButton = function () {
|
|
149
179
|
var generationInProgress = _this.props.generationInProgress;
|
|
150
180
|
var buttonVariant = generationInProgress ? _this.renderOngoingGenerationButton() : _this.renderStartGenerationButton();
|
|
151
|
-
return /*#__PURE__*/React.createElement(
|
|
152
|
-
align: "end",
|
|
153
|
-
padding: "xx-small"
|
|
154
|
-
}, buttonVariant);
|
|
181
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, buttonVariant);
|
|
155
182
|
};
|
|
156
183
|
|
|
157
184
|
_this.renderBody = function () {
|
package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js
CHANGED
|
@@ -17,8 +17,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
|
|
18
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
19
|
|
|
20
|
-
var _uiHeading = require("@instructure/ui-heading");
|
|
21
|
-
|
|
22
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
23
21
|
|
|
24
22
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
@@ -109,21 +107,11 @@ var NewQuizAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
109
107
|
_this.renderContent = function () {
|
|
110
108
|
var quizAnalysis = _this.props.quizAnalysis;
|
|
111
109
|
var scores = quizAnalysis.scores,
|
|
112
|
-
attempts = quizAnalysis.attempts
|
|
113
|
-
metadata = quizAnalysis.metadata;
|
|
110
|
+
attempts = quizAnalysis.attempts;
|
|
114
111
|
var expanded = _this.state.expanded;
|
|
115
112
|
return /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
116
113
|
className: styles.cardWrapper
|
|
117
114
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
-
className: styles.heading
|
|
119
|
-
}, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
|
|
120
|
-
level: "h2",
|
|
121
|
-
theme: {
|
|
122
|
-
h2FontWeight: 700
|
|
123
|
-
},
|
|
124
|
-
margin: "0 x-large 0 0",
|
|
125
|
-
color: "primary"
|
|
126
|
-
}, (0, _formatMessage.default)('Quiz summary:'), " ", metadata === null || metadata === void 0 ? void 0 : metadata.quiz_title)), /*#__PURE__*/_react.default.createElement("div", {
|
|
127
115
|
className: styles.metricGroup
|
|
128
116
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
129
117
|
className: styles.metricsWrapper
|
|
@@ -116,6 +116,27 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
|
|
|
116
116
|
}, (0, _errorMessages.getFailedToFetchReports)())));
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
+
_this.renderHeader = function () {
|
|
120
|
+
var _quizAnalysis$metadat;
|
|
121
|
+
|
|
122
|
+
var quizAnalysis = _this.props.quizAnalysis;
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
124
|
+
alignItems: "center",
|
|
125
|
+
width: "auto",
|
|
126
|
+
margin: "auto",
|
|
127
|
+
direction: "column"
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
129
|
+
overflowY: "hidden"
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
|
|
131
|
+
level: "h2",
|
|
132
|
+
theme: {
|
|
133
|
+
h2FontWeight: 700
|
|
134
|
+
},
|
|
135
|
+
margin: "0 x-large 0 0",
|
|
136
|
+
color: "primary"
|
|
137
|
+
}, quizAnalysis === null || quizAnalysis === void 0 ? void 0 : (_quizAnalysis$metadat = quizAnalysis.metadata) === null || _quizAnalysis$metadat === void 0 ? void 0 : _quizAnalysis$metadat.quiz_title)));
|
|
138
|
+
};
|
|
139
|
+
|
|
119
140
|
_this.renderTop = function () {
|
|
120
141
|
var _this$props = _this.props,
|
|
121
142
|
analysisError = _this$props.analysisError,
|
|
@@ -123,19 +144,28 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
|
|
|
123
144
|
quizAnalysis = _this$props.quizAnalysis;
|
|
124
145
|
var shouldShowError = analysisError && !generationInProgress;
|
|
125
146
|
return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
126
|
-
|
|
127
|
-
|
|
147
|
+
justifyItems: "space-between",
|
|
148
|
+
alignItems: "center",
|
|
149
|
+
wrap: "wrap",
|
|
150
|
+
width: "auto",
|
|
128
151
|
margin: "auto",
|
|
129
|
-
direction: "
|
|
152
|
+
direction: "row"
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, _this.renderHeader()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
|
|
154
|
+
alignItems: "center",
|
|
155
|
+
width: "auto",
|
|
156
|
+
margin: "auto",
|
|
157
|
+
direction: "row"
|
|
130
158
|
}, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
159
|
+
margin: "small"
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_index3.AnalysisUpdateDate, {
|
|
161
|
+
date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
|
|
162
|
+
})), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
|
|
131
163
|
overflowY: "visible"
|
|
132
164
|
}, _this.renderGenerationButton()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, shouldShowError && /*#__PURE__*/_react.default.createElement(_uiText.Text, {
|
|
133
165
|
size: "x-small",
|
|
134
166
|
weight: "bold",
|
|
135
167
|
color: "danger"
|
|
136
|
-
}, analysisError))
|
|
137
|
-
date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
|
|
138
|
-
})));
|
|
168
|
+
}, analysisError)))));
|
|
139
169
|
};
|
|
140
170
|
|
|
141
171
|
_this.renderTopOnFailedFetch = function () {
|
|
@@ -179,10 +209,7 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
|
|
|
179
209
|
_this.renderGenerationButton = function () {
|
|
180
210
|
var generationInProgress = _this.props.generationInProgress;
|
|
181
211
|
var buttonVariant = generationInProgress ? _this.renderOngoingGenerationButton() : _this.renderStartGenerationButton();
|
|
182
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
183
|
-
align: "end",
|
|
184
|
-
padding: "xx-small"
|
|
185
|
-
}, buttonVariant);
|
|
212
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, buttonVariant);
|
|
186
213
|
};
|
|
187
214
|
|
|
188
215
|
_this.renderBody = function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "18.4.1-rc.
|
|
3
|
+
"version": "18.4.1-rc.6+985c29e54",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@instructure/grading-utils": "^1.0.0",
|
|
45
45
|
"@instructure/outcomes-ui": "^2.1.9",
|
|
46
|
-
"@instructure/quiz-common": "18.4.1-rc.
|
|
47
|
-
"@instructure/quiz-i18n": "18.4.1-rc.
|
|
48
|
-
"@instructure/quiz-interactions": "18.4.1-rc.
|
|
49
|
-
"@instructure/quiz-number-input": "18.4.1-rc.
|
|
50
|
-
"@instructure/quiz-rce": "18.4.1-rc.
|
|
46
|
+
"@instructure/quiz-common": "18.4.1-rc.6+985c29e54",
|
|
47
|
+
"@instructure/quiz-i18n": "18.4.1-rc.6+985c29e54",
|
|
48
|
+
"@instructure/quiz-interactions": "18.4.1-rc.6+985c29e54",
|
|
49
|
+
"@instructure/quiz-number-input": "18.4.1-rc.6+985c29e54",
|
|
50
|
+
"@instructure/quiz-rce": "18.4.1-rc.6+985c29e54",
|
|
51
51
|
"@instructure/ui-a11y-content": "^7.22.1",
|
|
52
52
|
"@instructure/ui-alerts": "^7.22.1",
|
|
53
53
|
"@instructure/ui-avatar": "^7.22.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"eventemitter3": "^3.1.0",
|
|
109
109
|
"humps": "^2.0.0",
|
|
110
110
|
"immutable": "^3.8.1",
|
|
111
|
-
"instructure-validations": "18.4.1-rc.
|
|
111
|
+
"instructure-validations": "18.4.1-rc.6+985c29e54",
|
|
112
112
|
"ipaddr.js": "^1.5.4",
|
|
113
113
|
"isomorphic-fetch": "^2.2.0",
|
|
114
114
|
"isuuid": "^0.1.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"intl": "^1.2.4",
|
|
160
160
|
"jquery": "^2.2.3",
|
|
161
161
|
"most-subject": "^5.3.0",
|
|
162
|
-
"quiz-presets": "18.4.1-rc.
|
|
162
|
+
"quiz-presets": "18.4.1-rc.6+985c29e54",
|
|
163
163
|
"react": "^16.8.6",
|
|
164
164
|
"react-addons-test-utils": "^15.6.2",
|
|
165
165
|
"react-dom": "^16.8.6",
|
|
@@ -175,5 +175,5 @@
|
|
|
175
175
|
"publishConfig": {
|
|
176
176
|
"access": "public"
|
|
177
177
|
},
|
|
178
|
-
"gitHead": "
|
|
178
|
+
"gitHead": "985c29e543b0508cbd6c26cabd65c6ebd5d07ed9"
|
|
179
179
|
}
|