@instructure/quiz-core 17.58.2-rc.5 → 17.58.2-rc.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/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/index.js +2 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +64 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/theme.js +3 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/index.js +2 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +75 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/theme.js +6 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +2 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/popoverContent.js +18 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +245 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +9 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +55 -57
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/index.js +68 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +13 -18
- package/es/reporting/components/resources/ReportCard/index.js +1 -1
- package/lib/index.js +107 -98
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/index.js +11 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +83 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/theme.js +10 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/index.js +11 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +95 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/theme.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +11 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/popoverContent.js +27 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +274 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +16 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +59 -62
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/index.js +91 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +15 -20
- package/lib/reporting/components/resources/ReportCard/index.js +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
|
|
6
|
+
var _dec, _class, _class2, _temp;
|
|
7
|
+
|
|
8
|
+
import React, { Component } from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import t from '@instructure/quiz-i18n/es/format-message';
|
|
11
|
+
import { Text } from '@instructure/ui-text';
|
|
12
|
+
import { Link } from '@instructure/ui-link';
|
|
13
|
+
import { Flex } from '@instructure/ui-flex';
|
|
14
|
+
import { themeable } from '@instructure/ui-themeable';
|
|
15
|
+
import Card from "../../../../../common/components/shared/Card/index.js";
|
|
16
|
+
var styles = {
|
|
17
|
+
componentId: 'eRzKS',
|
|
18
|
+
template: function template(theme) {
|
|
19
|
+
return "\n\n.eRzKS_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.eRzKS_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}");
|
|
20
|
+
},
|
|
21
|
+
'card': 'eRzKS_fbIL',
|
|
22
|
+
'details': 'eRzKS_ebWM'
|
|
23
|
+
};
|
|
24
|
+
import theme from "../../ReportCard/theme.js";
|
|
25
|
+
export var NewQuizAndItemAnalysisReportCard = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
26
|
+
_inherits(NewQuizAndItemAnalysisReportCard, _Component);
|
|
27
|
+
|
|
28
|
+
var _super = _createSuper(NewQuizAndItemAnalysisReportCard);
|
|
29
|
+
|
|
30
|
+
function NewQuizAndItemAnalysisReportCard() {
|
|
31
|
+
_classCallCheck(this, NewQuizAndItemAnalysisReportCard);
|
|
32
|
+
|
|
33
|
+
return _super.apply(this, arguments);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_createClass(NewQuizAndItemAnalysisReportCard, [{
|
|
37
|
+
key: "render",
|
|
38
|
+
value: function render() {
|
|
39
|
+
var _this$props = this.props,
|
|
40
|
+
name = _this$props.name,
|
|
41
|
+
href = _this$props.href;
|
|
42
|
+
return /*#__PURE__*/React.createElement(Card, {
|
|
43
|
+
className: styles.card
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
45
|
+
direction: "column"
|
|
46
|
+
}, /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(Text, {
|
|
47
|
+
size: "medium",
|
|
48
|
+
weight: "bold"
|
|
49
|
+
}, name)), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
50
|
+
align: "end"
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
52
|
+
href: href
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
54
|
+
size: "small"
|
|
55
|
+
}, t('View Report'))))));
|
|
56
|
+
}
|
|
57
|
+
}]);
|
|
58
|
+
|
|
59
|
+
NewQuizAndItemAnalysisReportCard.displayName = "NewQuizAndItemAnalysisReportCard";
|
|
60
|
+
return NewQuizAndItemAnalysisReportCard;
|
|
61
|
+
}(Component), _class2.propTypes = {
|
|
62
|
+
name: PropTypes.node,
|
|
63
|
+
href: PropTypes.string
|
|
64
|
+
}, _class2.defaultProps = {
|
|
65
|
+
name: void 0,
|
|
66
|
+
href: void 0
|
|
67
|
+
}, _temp)) || _class);
|
|
68
|
+
export default NewQuizAndItemAnalysisReportCard;
|
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { Heading } from '@instructure/ui-heading';
|
|
7
|
-
import
|
|
7
|
+
import NewItemAnalysis from "./NewItemAnalysis/index.js";
|
|
8
8
|
import Spinner from "../../../../common/components/shared/spinner/Spinner.js";
|
|
9
9
|
import NewQuizAnalysis from "./NewQuizAnalysis/index.js";
|
|
10
10
|
|
|
@@ -43,7 +43,10 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
|
|
|
43
43
|
|
|
44
44
|
case 2:
|
|
45
45
|
response = _context.sent;
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
if (response) {
|
|
48
|
+
setQuizAnalysis(response.last_successful_analysis);
|
|
49
|
+
}
|
|
47
50
|
|
|
48
51
|
case 4:
|
|
49
52
|
case "end":
|
|
@@ -73,7 +76,10 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
|
|
|
73
76
|
|
|
74
77
|
case 2:
|
|
75
78
|
response = _context2.sent;
|
|
76
|
-
|
|
79
|
+
|
|
80
|
+
if (response) {
|
|
81
|
+
setItemAnalyses(response.last_successful_analysis);
|
|
82
|
+
}
|
|
77
83
|
|
|
78
84
|
case 4:
|
|
79
85
|
case "end":
|
|
@@ -100,21 +106,10 @@ export var NewQuizAndItemAnalysis = function NewQuizAndItemAnalysis(_ref) {
|
|
|
100
106
|
return /*#__PURE__*/React.createElement("div", {
|
|
101
107
|
className: "fs-mask"
|
|
102
108
|
}, _ref4, _ref5, itemAnalyses === null || itemAnalyses === void 0 ? void 0 : itemAnalyses.map(function (itemAnalysis) {
|
|
103
|
-
return /*#__PURE__*/React.createElement(
|
|
104
|
-
key: itemAnalysis.metadata.item_id
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
renderLabel: "ITEM DIFFICULTY",
|
|
108
|
-
renderValue: itemAnalysis.scores.difficulty_index
|
|
109
|
-
}), /*#__PURE__*/React.createElement(Metric, {
|
|
110
|
-
key: "responded",
|
|
111
|
-
renderLabel: "RESPONDED",
|
|
112
|
-
renderValue: itemAnalysis.attempts.students_responded
|
|
113
|
-
}), /*#__PURE__*/React.createElement(Metric, {
|
|
114
|
-
key: "skipped",
|
|
115
|
-
renderLabel: "SKIPPED/NO RESPONSE",
|
|
116
|
-
renderValue: itemAnalysis.attempts.students_without_response
|
|
117
|
-
}));
|
|
109
|
+
return /*#__PURE__*/React.createElement(NewItemAnalysis, {
|
|
110
|
+
key: itemAnalysis.metadata.item_id,
|
|
111
|
+
itemAnalysis: itemAnalysis
|
|
112
|
+
});
|
|
118
113
|
}));
|
|
119
114
|
/* eslint-enable react/jsx-no-literals */
|
|
120
115
|
}; // TODO: distinguish between loading and empty item analyses (eg. when there is no items in a quiz)
|
|
@@ -12,7 +12,7 @@ import { Link } from '@instructure/ui-link';
|
|
|
12
12
|
import { themeable } from '@instructure/ui-themeable';
|
|
13
13
|
import Card from "../../../../common/components/shared/Card/index.js";
|
|
14
14
|
var styles = {
|
|
15
|
-
componentId: '
|
|
15
|
+
componentId: 'cNnNG',
|
|
16
16
|
template: function template(theme) {
|
|
17
17
|
return "\n\n.eRzKS_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.eRzKS_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}");
|
|
18
18
|
},
|