@pie-element/complex-rubric 1.1.1-next.0 → 1.1.1-next.13
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/configure/lib/defaults.js +14 -1
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +0 -1
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +3 -1
- package/configure/lib/main.js.map +1 -1
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +768 -0
- package/configure/node_modules/@pie-element/rubric/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/rubric/README.md +3 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +197 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +652 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +29 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +130 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +96 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/package.json +18 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +21 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +64 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +49 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +17 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +105 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +14 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/controller/package.json +9 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +35 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +6 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +24 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +19 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +3 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +62 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +35 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js +88 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js +171 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js +114 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/package.json +25 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +22767 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +48 -0
- package/configure/node_modules/@pie-element/rubric/src/index.js +38 -0
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +117 -0
- package/configure/node_modules/@pie-element/rubric/src/print.js +63 -0
- package/configure/package.json +1 -1
- package/configure/src/defaults.js +15 -1
- package/configure/src/index.js +0 -1
- package/configure/src/main.jsx +2 -1
- package/controller/lib/defaults.js +13 -1
- package/controller/lib/defaults.js.map +1 -1
- package/controller/src/defaults.js +14 -1
- package/package.json +4 -4
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { shallow, mount } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Rubric from '../main';
|
|
4
|
+
import Link from '@material-ui/core/Link';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
describe('rubric viewer', () => {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const wrapper = extras => {
|
|
11
|
+
const props = {value: {
|
|
12
|
+
points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
|
|
13
|
+
sampleAnswers: [null, 'just right', 'not left', null],
|
|
14
|
+
excludeZero: false,
|
|
15
|
+
...extras
|
|
16
|
+
}};
|
|
17
|
+
|
|
18
|
+
return mount(<Rubric {...props} />);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
describe('snapshot', () => {
|
|
22
|
+
it('renders', () => {
|
|
23
|
+
const w = wrapper();
|
|
24
|
+
expect(w).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe('expanded snapshot', () => {
|
|
29
|
+
it('renders', () => {
|
|
30
|
+
const w = wrapper();
|
|
31
|
+
w.find(Link).simulate('click');
|
|
32
|
+
expect(w).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('exclude zeros', () => {
|
|
37
|
+
it('renders correctly with exluded zeroes', () => {
|
|
38
|
+
let w = wrapper({ excludeZero: true });
|
|
39
|
+
w.find(Link).simulate('click');
|
|
40
|
+
expect(w.find('li').length).toEqual(5);
|
|
41
|
+
|
|
42
|
+
w = wrapper({ excludeZero: false });
|
|
43
|
+
w.find(Link).simulate('click');
|
|
44
|
+
expect(w.find('li').length).toEqual(6);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Rubric from './main';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import ReactDOM from 'react-dom';
|
|
4
|
+
import debug from 'debug';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export default class RubricRender extends HTMLElement {
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
debug.log('constructor called');
|
|
12
|
+
this.onModelChanged = this.onModelChanged.bind(this);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
set model(s) {
|
|
16
|
+
this._model = s;
|
|
17
|
+
this._render();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
onModelChanged(m) {
|
|
21
|
+
this._model = m;
|
|
22
|
+
this._render();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
this._render();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_render() {
|
|
30
|
+
if (this._model) {
|
|
31
|
+
const el = (
|
|
32
|
+
<Rubric value={this._model} />
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
ReactDOM.render(el, this);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
3
|
+
import ListItem from '@material-ui/core/ListItem';
|
|
4
|
+
import List from '@material-ui/core/List';
|
|
5
|
+
import ListItemText from '@material-ui/core/ListItemText';
|
|
6
|
+
import Link from '@material-ui/core/Link';
|
|
7
|
+
import Collapse from '@material-ui/core/Collapse';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
|
|
10
|
+
export const RubricType = PropTypes.shape({
|
|
11
|
+
excludeZero: PropTypes.bool,
|
|
12
|
+
points: PropTypes.arrayOf(PropTypes.string),
|
|
13
|
+
sampleAnswers: PropTypes.arrayOf(PropTypes.string),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
class Rubric extends React.Component {
|
|
17
|
+
dudUrl = 'javascript:;';
|
|
18
|
+
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
21
|
+
this.state = {
|
|
22
|
+
rubricOpen: false,
|
|
23
|
+
linkPrefix: 'Show',
|
|
24
|
+
};
|
|
25
|
+
this.toggleRubric = this.toggleRubric.bind(this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static propTypes = {
|
|
29
|
+
classes: PropTypes.object.isRequired,
|
|
30
|
+
animationsDisabled: PropTypes.bool,
|
|
31
|
+
value: RubricType,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
toggleRubric() {
|
|
35
|
+
this.setState({ rubricOpen: !this.state.rubricOpen });
|
|
36
|
+
this.setState({ linkPrefix: this.state.rubricOpen ? 'Show' : 'Hide' });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
shouldRenderPoint = (index, value) => {
|
|
40
|
+
if (!value.excludeZero) {
|
|
41
|
+
return true;
|
|
42
|
+
} else {
|
|
43
|
+
return index !== 0;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
render() {
|
|
48
|
+
const { value, classes, animationsDisabled } = this.props;
|
|
49
|
+
|
|
50
|
+
if (value && value.points) {
|
|
51
|
+
const { points, sampleAnswers } = value;
|
|
52
|
+
|
|
53
|
+
const rubricList = <List component="nav">
|
|
54
|
+
{points.slice(0).reverse().map(
|
|
55
|
+
(desc, index) => {
|
|
56
|
+
index = points.length - index - 1;
|
|
57
|
+
return this.shouldRenderPoint(index, value) && (
|
|
58
|
+
<React.Fragment key={index}>
|
|
59
|
+
<ListItem key={`P${index}`}>
|
|
60
|
+
<ListItemText
|
|
61
|
+
className={classes.rubricCol}
|
|
62
|
+
primary={index === 1 ? `${index} PT` : `${index} PTS`}
|
|
63
|
+
/>
|
|
64
|
+
<ListItemText
|
|
65
|
+
primary={
|
|
66
|
+
<div dangerouslySetInnerHTML={{ __html: desc }} />
|
|
67
|
+
}
|
|
68
|
+
/>
|
|
69
|
+
</ListItem>
|
|
70
|
+
{sampleAnswers && sampleAnswers[index] && (
|
|
71
|
+
<ListItem key={`S${index}`}>
|
|
72
|
+
<ListItemText
|
|
73
|
+
className={classes.rubricCol}
|
|
74
|
+
style={{marginLeft: '20px'}}
|
|
75
|
+
primary={'Sample Answer'}
|
|
76
|
+
/>
|
|
77
|
+
<ListItemText
|
|
78
|
+
primary={
|
|
79
|
+
<div dangerouslySetInnerHTML={{ __html: sampleAnswers[index] }} />
|
|
80
|
+
}
|
|
81
|
+
/>
|
|
82
|
+
</ListItem>
|
|
83
|
+
)}
|
|
84
|
+
</React.Fragment>
|
|
85
|
+
)
|
|
86
|
+
})}
|
|
87
|
+
</List>;
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<div className={classes.root}>
|
|
91
|
+
{!animationsDisabled ?
|
|
92
|
+
<React.Fragment>
|
|
93
|
+
<Link href={this.dudUrl} onClick={this.toggleRubric}>
|
|
94
|
+
{this.state.linkPrefix} Rubric
|
|
95
|
+
</Link>
|
|
96
|
+
<Collapse in={this.state.rubricOpen} timeout="auto">
|
|
97
|
+
{rubricList}
|
|
98
|
+
</Collapse>
|
|
99
|
+
</React.Fragment>
|
|
100
|
+
: rubricList
|
|
101
|
+
}
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
} else {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const styles = () => ({
|
|
111
|
+
rubricCol: {
|
|
112
|
+
flex: '0 1 auto',
|
|
113
|
+
minWidth: 'fit-content'
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export default withStyles(styles)(Rubric);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import debounce from 'lodash/debounce';
|
|
4
|
+
import Main from './main';
|
|
5
|
+
import { renderMath } from '@pie-lib/math-rendering';
|
|
6
|
+
import debug from 'debug';
|
|
7
|
+
|
|
8
|
+
const log = debug('pie-element:rubric:print');
|
|
9
|
+
|
|
10
|
+
const preparePrintModel = (model, opts) => {
|
|
11
|
+
const instr = opts.role === 'instructor';
|
|
12
|
+
|
|
13
|
+
if (!instr) {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
model.value = { ...model };
|
|
18
|
+
model.mode = 'evaluate';
|
|
19
|
+
model.animationsDisabled = true;
|
|
20
|
+
|
|
21
|
+
return model;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default class RubricPrint extends HTMLElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
this._options = null;
|
|
28
|
+
this._model = null;
|
|
29
|
+
this._session = [];
|
|
30
|
+
this._rerender = debounce(
|
|
31
|
+
() => {
|
|
32
|
+
if (this._model && this._session) {
|
|
33
|
+
const printModel = preparePrintModel(this._model, this._options);
|
|
34
|
+
|
|
35
|
+
const element =
|
|
36
|
+
this._options &&
|
|
37
|
+
React.createElement(Main, {
|
|
38
|
+
...printModel,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
ReactDOM.render(element, this, () => {
|
|
42
|
+
log('render complete - render math');
|
|
43
|
+
renderMath(this);
|
|
44
|
+
});
|
|
45
|
+
} else {
|
|
46
|
+
log('skip');
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
50,
|
|
50
|
+
{ leading: false, trailing: true }
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
set options(o) {
|
|
54
|
+
this._options = o;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
set model(s) {
|
|
58
|
+
this._model = s;
|
|
59
|
+
this._rerender();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
connectedCallback() {}
|
|
63
|
+
}
|
package/configure/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
11
|
"@pie-element/multi-trait-rubric": "^2.1.0",
|
|
12
|
-
"@pie-element/rubric": "^2.1.
|
|
12
|
+
"@pie-element/rubric": "^2.1.1",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
14
|
"@pie-lib/config-ui": "^11.0.20",
|
|
15
15
|
"@pie-lib/editable-html": "^9.2.2",
|
|
@@ -16,6 +16,7 @@ const rubricDefaultModel = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const multiTraitDefaultConfiguration = {
|
|
19
|
+
settingsPanelDisabled: false,
|
|
19
20
|
excludeZeroDialogBoxContent: {
|
|
20
21
|
title: 'Exclude 0 (Zero) from Score Point Values.',
|
|
21
22
|
text: `<div>
|
|
@@ -109,13 +110,26 @@ const multiTraitDefaultConfiguration = {
|
|
|
109
110
|
}
|
|
110
111
|
};
|
|
111
112
|
|
|
113
|
+
const rubricDefaultConfiguration = {
|
|
114
|
+
showExcludeZero: {
|
|
115
|
+
settings: true,
|
|
116
|
+
label: 'Ability to exclude zero',
|
|
117
|
+
},
|
|
118
|
+
showMaxPoint: {
|
|
119
|
+
settings: true,
|
|
120
|
+
label: 'Show max points dropdown'
|
|
121
|
+
},
|
|
122
|
+
settingsPanelDisabled: false
|
|
123
|
+
};
|
|
124
|
+
|
|
112
125
|
export default {
|
|
113
126
|
model: {
|
|
114
127
|
rubricType: 'simpleRubric',
|
|
115
128
|
rubrics: { simpleRubric: rubricDefaultModel, multiTraitRubric: multiTraitDefaultModel }
|
|
116
129
|
},
|
|
117
130
|
configuration: {
|
|
118
|
-
multiTraitRubric: multiTraitDefaultConfiguration
|
|
131
|
+
multiTraitRubric: multiTraitDefaultConfiguration,
|
|
132
|
+
simpleRubric : rubricDefaultConfiguration
|
|
119
133
|
}
|
|
120
134
|
};
|
|
121
135
|
|
package/configure/src/index.js
CHANGED
package/configure/src/main.jsx
CHANGED
|
@@ -46,7 +46,7 @@ export class Main extends React.Component {
|
|
|
46
46
|
configuration
|
|
47
47
|
} = this.props;
|
|
48
48
|
const { rubricType, rubrics = {} } = model;
|
|
49
|
-
const { multiTraitRubric } = configuration;
|
|
49
|
+
const { multiTraitRubric, simpleRubric } = configuration;
|
|
50
50
|
let rubricTag = '';
|
|
51
51
|
|
|
52
52
|
switch (rubricType) {
|
|
@@ -59,6 +59,7 @@ export class Main extends React.Component {
|
|
|
59
59
|
if (ref) {
|
|
60
60
|
this.simpleRubric = ref;
|
|
61
61
|
this.simpleRubric.model = rubrics.simpleRubric;
|
|
62
|
+
this.simpleRubric.configuration = simpleRubric;
|
|
62
63
|
}
|
|
63
64
|
}}
|
|
64
65
|
/>;
|
|
@@ -83,6 +83,17 @@ var multiTraitDefaultConfiguration = {
|
|
|
83
83
|
enabled: false
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
+
var rubricDefaultConfiguration = {
|
|
87
|
+
showExcludeZero: {
|
|
88
|
+
settings: true,
|
|
89
|
+
label: 'Ability to exclude zero'
|
|
90
|
+
},
|
|
91
|
+
showMaxPoint: {
|
|
92
|
+
settings: true,
|
|
93
|
+
label: 'Show max points dropdown'
|
|
94
|
+
},
|
|
95
|
+
settingsPanelDisabled: false
|
|
96
|
+
};
|
|
86
97
|
var _default = {
|
|
87
98
|
model: {
|
|
88
99
|
rubricType: 'simpleRubric',
|
|
@@ -92,7 +103,8 @@ var _default = {
|
|
|
92
103
|
}
|
|
93
104
|
},
|
|
94
105
|
configuration: {
|
|
95
|
-
multiTraitRubric: multiTraitDefaultConfiguration
|
|
106
|
+
multiTraitRubric: multiTraitDefaultConfiguration,
|
|
107
|
+
simpleRubric: rubricDefaultConfiguration
|
|
96
108
|
}
|
|
97
109
|
};
|
|
98
110
|
exports["default"] = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["multiTraitDefaultModel","visibleToStudent","halfScoring","pointLabels","description","standards","scales","excludeZero","rubricDefaultModel","points","sampleAnswers","maxPoints","multiTraitDefaultConfiguration","settingsPanelDisabled","excludeZeroDialogBoxContent","title","text","includeZeroDialogBoxContent","deleteTraitDialogBoxContent","deleteScaleDialogBoxContent","maxPointsDialogBoxContent","spellCheck","label","settings","enabled","showExcludeZero","showScorePointLabels","showDescription","showVisibleToStudent","showHalfScoring","width","showStandards","showLevelTagInput","dragAndDrop","model","rubricType","rubrics","simpleRub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,QAAQ,EAAE,KAFA;AAGVC,IAAAA,OAAO,EAAE;AAHC,GApDyB;AAyDrCC,EAAAA,eAAe,EAAE;AACfF,IAAAA,QAAQ,EAAE,IADK;AAEfD,IAAAA,KAAK,EAAE;AAFQ,GAzDoB;AA6DrCI,EAAAA,oBAAoB,EAAE;AACpBH,IAAAA,QAAQ,EAAE,IADU;AAEpBD,IAAAA,KAAK,EAAE;AAFa,GA7De;AAiErCK,EAAAA,eAAe,EAAE;AACfJ,IAAAA,QAAQ,EAAE,IADK;AAEfD,IAAAA,KAAK,EAAE;AAFQ,GAjEoB;AAqErCM,EAAAA,oBAAoB,EAAE;AACpBL,IAAAA,QAAQ,EAAE,IADU;AAEpBD,IAAAA,KAAK,EAAE;AAFa,GArEe;AAyErCO,EAAAA,eAAe,EAAE;AACfN,IAAAA,QAAQ,EAAE,IADK;AAEfD,IAAAA,KAAK,EAAE;AAFQ,GAzEoB;AA6ErCQ,EAAAA,KAAK,EAAE,OA7E8B;AA8ErC;AACAC,EAAAA,aAAa,EAAE;AACbR,IAAAA,QAAQ,EAAE,KADG;AAEbD,IAAAA,KAAK,EAAE;AAFM,GA/EsB;AAmFrCU,EAAAA,iBAAiB,EAAE;AACjBT,IAAAA,QAAQ,EAAE,KADO;AAEjBD,IAAAA,KAAK,EAAE,sBAFU;AAGjBE,IAAAA,OAAO,EAAE;AAHQ,GAnFkB;AAwFrCS,EAAAA,WAAW,EAAE;AACXV,IAAAA,QAAQ,EAAE,IADC;AAEXD,IAAAA,KAAK,EAAE,sBAFI;AAGXE,IAAAA,OAAO,EAAE;AAHE;AAxFwB,CAAvC;
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["multiTraitDefaultModel","visibleToStudent","halfScoring","pointLabels","description","standards","scales","excludeZero","rubricDefaultModel","points","sampleAnswers","maxPoints","multiTraitDefaultConfiguration","settingsPanelDisabled","excludeZeroDialogBoxContent","title","text","includeZeroDialogBoxContent","deleteTraitDialogBoxContent","deleteScaleDialogBoxContent","maxPointsDialogBoxContent","spellCheck","label","settings","enabled","showExcludeZero","showScorePointLabels","showDescription","showVisibleToStudent","showHalfScoring","width","showStandards","showLevelTagInput","dragAndDrop","rubricDefaultConfiguration","showMaxPoint","model","rubricType","rubrics","simpleRubric","multiTraitRubric","configuration"],"mappings":";;;;;;AAAA,IAAMA,sBAAsB,GAAG;AAC7BC,EAAAA,gBAAgB,EAAE,IADW;AAE7BC,EAAAA,WAAW,EAAE,KAFgB;AAG7BC,EAAAA,WAAW,EAAE,IAHgB;AAI7BC,EAAAA,WAAW,EAAE,KAJgB;AAK7BC,EAAAA,SAAS,EAAE,KALkB;AAM7BC,EAAAA,MAAM,EAAE,EANqB;AAO7BC,EAAAA,WAAW,EAAE;AAPgB,CAA/B;AAUA,IAAMC,kBAAkB,GAAG;AACzBC,EAAAA,MAAM,EAAE,CAAC,EAAD,EAAK,EAAL,EAAS,EAAT,EAAa,EAAb,CADiB;AAEzBC,EAAAA,aAAa,EAAE,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,CAFU;AAGzBC,EAAAA,SAAS,EAAE,CAHc;AAIzBJ,EAAAA,WAAW,EAAE;AAJY,CAA3B;AAOA,IAAMK,8BAA8B,GAAG;AACrCC,EAAAA,qBAAqB,EAAE,KADc;AAErCC,EAAAA,2BAA2B,EAAE;AAC3BC,IAAAA,KAAK,EAAE,2CADoB;AAE3BC,IAAAA,IAAI;AAFuB,GAFQ;AAoBrCC,EAAAA,2BAA2B,EAAE;AAC3BF,IAAAA,KAAK,EAAE,yCADoB;AAE3BC,IAAAA,IAAI;AAFuB,GApBQ;AAsCrCE,EAAAA,2BAA2B,EAAE;AAC3BH,IAAAA,KAAK,EAAE,cADoB;AAE3BC,IAAAA,IAAI,EAAE;AAFqB,GAtCQ;AA0CrCG,EAAAA,2BAA2B,EAAE;AAC3BJ,IAAAA,KAAK,EAAE,cADoB;AAE3BC,IAAAA,IAAI,EAAE;AAFqB,GA1CQ;AA8CrCI,E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AAQ,EAAE,IADK;AAEfD,IAAAA,KAAK,EAAE;AAFQ,GADgB;AAKjCa,EAAAA,YAAY,EAAE;AACZZ,IAAAA,QAAQ,EAAE,IADE;AAEZD,IAAAA,KAAK,EAAE;AAFK,GALmB;AASjCT,EAAAA,qBAAqB,EAAE;AATU,CAAnC;eAYe;AACbuB,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE,cADP;AAELC,IAAAA,OAAO,EAAE;AAAEC,MAAAA,YAAY,EAAE/B,kBAAhB;AAAoCgC,MAAAA,gBAAgB,EAAExC;AAAtD;AAFJ,GADM;AAKbyC,EAAAA,aAAa,EAAE;AACbD,IAAAA,gBAAgB,EAAE5B,8BADL;AAEb2B,IAAAA,YAAY,EAAGL;AAFF;AALF,C","sourcesContent":["const multiTraitDefaultModel = {\n visibleToStudent: true,\n halfScoring: false,\n pointLabels: true,\n description: false,\n standards: false,\n scales: [],\n excludeZero: false,\n};\n\nconst rubricDefaultModel = {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 4,\n excludeZero: false\n};\n\nconst multiTraitDefaultConfiguration = {\n settingsPanelDisabled: false,\n excludeZeroDialogBoxContent: {\n title: 'Exclude 0 (Zero) from Score Point Values.',\n text: `<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>`\n },\n includeZeroDialogBoxContent: {\n title: 'Include 0 (Zero) in Score Point Values.',\n text: `<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>`\n },\n deleteTraitDialogBoxContent: {\n title: 'Delete Trait',\n text: 'Are you sure you want to delete this trait?'\n },\n deleteScaleDialogBoxContent: {\n title: 'Delete Scale',\n text: 'Are you sure you want to delete this scale?'\n },\n maxPointsDialogBoxContent: {\n title: 'Decreasing Max Points.',\n text: ` You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted.`\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true\n },\n showExcludeZero: {\n settings: true,\n label: 'Exclude Zero',\n },\n showScorePointLabels: {\n settings: true,\n label: 'Show Score Point Labels',\n },\n showDescription: {\n settings: true,\n label: 'Show Description',\n },\n showVisibleToStudent: {\n settings: true,\n label: 'Visible to Student',\n },\n showHalfScoring: {\n settings: true,\n label: 'Half Scoring',\n },\n width: '900px',\n // these should not be set to true (should not be used) for now\n showStandards: {\n settings: false,\n label: 'Show Standards',\n },\n showLevelTagInput: {\n settings: false,\n label: 'Show Level Tag Input',\n enabled: false\n },\n dragAndDrop: {\n settings: true,\n label: 'Enable Drag and Drop',\n enabled: false,\n }\n};\n\nconst rubricDefaultConfiguration = {\n showExcludeZero: {\n settings: true,\n label: 'Ability to exclude zero',\n },\n showMaxPoint: {\n settings: true,\n label: 'Show max points dropdown'\n },\n settingsPanelDisabled: false\n};\n\nexport default {\n model: {\n rubricType: 'simpleRubric',\n rubrics: { simpleRubric: rubricDefaultModel, multiTraitRubric: multiTraitDefaultModel }\n },\n configuration: {\n multiTraitRubric: multiTraitDefaultConfiguration,\n simpleRubric : rubricDefaultConfiguration\n }\n};\n"],"file":"defaults.js"}
|
|
@@ -110,12 +110,25 @@ const multiTraitDefaultConfiguration = {
|
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
+
const rubricDefaultConfiguration = {
|
|
114
|
+
showExcludeZero: {
|
|
115
|
+
settings: true,
|
|
116
|
+
label: 'Ability to exclude zero',
|
|
117
|
+
},
|
|
118
|
+
showMaxPoint: {
|
|
119
|
+
settings: true,
|
|
120
|
+
label: 'Show max points dropdown'
|
|
121
|
+
},
|
|
122
|
+
settingsPanelDisabled: false
|
|
123
|
+
};
|
|
124
|
+
|
|
113
125
|
export default {
|
|
114
126
|
model: {
|
|
115
127
|
rubricType: 'simpleRubric',
|
|
116
128
|
rubrics: { simpleRubric: rubricDefaultModel, multiTraitRubric: multiTraitDefaultModel }
|
|
117
129
|
},
|
|
118
130
|
configuration: {
|
|
119
|
-
multiTraitRubric: multiTraitDefaultConfiguration
|
|
131
|
+
multiTraitRubric: multiTraitDefaultConfiguration,
|
|
132
|
+
simpleRubric : rubricDefaultConfiguration
|
|
120
133
|
}
|
|
121
134
|
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/complex-rubric",
|
|
3
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
-
"version": "1.1.1-next.
|
|
4
|
+
"version": "1.1.1-next.13+bb8f17112",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@material-ui/core": "^3.9.2",
|
|
10
|
-
"@pie-element/multi-trait-rubric": "^2.1.1-next.
|
|
11
|
-
"@pie-element/rubric": "^2.1.1
|
|
10
|
+
"@pie-element/multi-trait-rubric": "^2.1.1-next.13+bb8f17112",
|
|
11
|
+
"@pie-element/rubric": "^2.1.1",
|
|
12
12
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
13
13
|
"@pie-lib/rubric": "^0.6.0",
|
|
14
14
|
"classnames": "^2.2.5",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lodash": "^4.17.11",
|
|
17
17
|
"prop-types": "^15.7.2"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "bb8f17112b63f4a896abdbfd58a60a946110314a",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|