@pie-element/complex-rubric 2.0.2-next.13 → 2.0.2-next.15
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/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +978 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +55 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +869 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +502 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +98 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +126 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +553 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +361 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +552 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +371 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +270 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +29 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +18 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +210 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +94 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +161 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +13 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +272 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +206 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +180 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +6 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +298 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +201 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +85 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +161 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +330 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +103 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +24 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +1248 -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 +1088 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +34 -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 +108 -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 +17 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +26 -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 +56 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +17 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +192 -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 +13 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +31 -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 +160 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +127 -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 +2 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +96 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +65 -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 +188 -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 +26 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +23003 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +46 -0
- package/configure/node_modules/@pie-element/rubric/src/index.js +34 -0
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +136 -0
- package/configure/node_modules/@pie-element/rubric/src/print.js +63 -0
- package/configure/package.json +2 -2
- package/controller/package.json +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.model = model;
|
|
7
|
+
|
|
8
|
+
function model(model, session, env) {
|
|
9
|
+
return new Promise(function (resolve) {
|
|
10
|
+
var modelResult = !model ? {} : model;
|
|
11
|
+
resolve(env && env.role && env.role === 'instructor' ? modelResult : {});
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["model","session","env","Promise","resolve","modelResult","role"],"mappings":";;;;;;;AAAO,SAASA,KAAT,CAAeA,KAAf,EAAsBC,OAAtB,EAA+BC,GAA/B,EAAoC;AACzC,SAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD,EAAa;AAC9B,QAAMC,WAAW,GAAG,CAACL,KAAD,GAAS,EAAT,GAAcA,KAAlC;AACAI,IAAAA,OAAO,CAACF,GAAG,IAAIA,GAAG,CAACI,IAAX,IAAmBJ,GAAG,CAACI,IAAJ,KAAa,YAAhC,GAA+CD,WAA/C,GAA6D,EAA9D,CAAP;AACD,GAHM,CAAP;AAID","sourcesContent":["export function model(model, session, env) {\n return new Promise((resolve) => {\n const modelResult = !model ? {} : model;\n resolve(env && env.role && env.role === 'instructor' ? modelResult : {});\n });\n}\n"],"file":"index.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie-element/rubric-controller",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "2.0.1",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "./node_modules/.bin/jest"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@pie-lib/pie-toolbox": "1.0.12-next.3",
|
|
11
|
+
"lodash": "^4.17.15"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { model } from '../index';
|
|
2
|
+
|
|
3
|
+
describe('rubric model', () => {
|
|
4
|
+
let state = {
|
|
5
|
+
points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
|
|
6
|
+
sampleAnswers: [null, 'just right', 'not left', null],
|
|
7
|
+
maxPoints: 4,
|
|
8
|
+
excludeZero: false,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
let session = {};
|
|
12
|
+
let env, result;
|
|
13
|
+
|
|
14
|
+
it('returns no model for gather', async () => {
|
|
15
|
+
env = { mode: 'gather' };
|
|
16
|
+
result = await model(state, session, env);
|
|
17
|
+
expect(result).toEqual({});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('returns no model for student role', async () => {
|
|
21
|
+
env = { mode: 'gather', role: 'student' };
|
|
22
|
+
result = await model(state, session, env);
|
|
23
|
+
expect(result).toEqual({});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('returns model for instructor role', async () => {
|
|
27
|
+
env = { mode: 'gather', role: 'instructor' };
|
|
28
|
+
result = await model(state, session, env);
|
|
29
|
+
expect(result).toEqual(state);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"settingsPanelDisabled": {
|
|
5
|
+
"description": "Indicates if the settings panel is not available",
|
|
6
|
+
"type": "boolean",
|
|
7
|
+
"title": "settingsPanelDisabled"
|
|
8
|
+
},
|
|
9
|
+
"showExcludeZero": {
|
|
10
|
+
"title": "ConfigureProp",
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"settings": {
|
|
14
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
15
|
+
"type": "boolean",
|
|
16
|
+
"title": "settings"
|
|
17
|
+
},
|
|
18
|
+
"label": {
|
|
19
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"title": "label"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"showMaxPoint": {
|
|
26
|
+
"title": "ConfigureProp",
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"settings": {
|
|
30
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"title": "settings"
|
|
33
|
+
},
|
|
34
|
+
"label": {
|
|
35
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"title": "label"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"width": {
|
|
42
|
+
"description": "How large can the rubric be",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"title": "width"
|
|
45
|
+
},
|
|
46
|
+
"mathMlOptions": {
|
|
47
|
+
"title": "ConfigureMathMLProp",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"mmlOutput": {
|
|
51
|
+
"description": "Indicates if model should have mathML output instead of latex",
|
|
52
|
+
"type": "number",
|
|
53
|
+
"title": "mmlOutput"
|
|
54
|
+
},
|
|
55
|
+
"mmlEditing": {
|
|
56
|
+
"description": "Indicates if mathML that's already in model should be editable",
|
|
57
|
+
"type": "number",
|
|
58
|
+
"title": "mmlEditing"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"showPrompt": {
|
|
63
|
+
"description": "Determines whether prompt field will be displayed or not",
|
|
64
|
+
"default": true,
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"title": "showPrompt"
|
|
67
|
+
},
|
|
68
|
+
"promptLabel": {
|
|
69
|
+
"description": "The label for the item stem/prompt field",
|
|
70
|
+
"default": "Item Stemm",
|
|
71
|
+
"type": "string",
|
|
72
|
+
"title": "promptLabel"
|
|
73
|
+
},
|
|
74
|
+
"contentDimensions": {
|
|
75
|
+
"description": "Indicates the dimensions configuration for the authoring container\nNote: Some items have a default minimum width because of their content, but if\nthe minWidth is lower than this, the overflow behavior will take care of that",
|
|
76
|
+
"default": ": {}",
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"maxHeight": {
|
|
80
|
+
"description": "Indicates the max height of the authoring container",
|
|
81
|
+
"default": "undefined",
|
|
82
|
+
"type": [
|
|
83
|
+
"string",
|
|
84
|
+
"number"
|
|
85
|
+
],
|
|
86
|
+
"title": "maxHeight"
|
|
87
|
+
},
|
|
88
|
+
"maxWidth": {
|
|
89
|
+
"description": "Indicates the max width of the authoring container",
|
|
90
|
+
"default": "undefined",
|
|
91
|
+
"type": [
|
|
92
|
+
"string",
|
|
93
|
+
"number"
|
|
94
|
+
],
|
|
95
|
+
"title": "maxWidth"
|
|
96
|
+
},
|
|
97
|
+
"minHeight": {
|
|
98
|
+
"description": "Indicates the min height of the authoring container",
|
|
99
|
+
"default": "undefined",
|
|
100
|
+
"type": [
|
|
101
|
+
"string",
|
|
102
|
+
"number"
|
|
103
|
+
],
|
|
104
|
+
"title": "minHeight"
|
|
105
|
+
},
|
|
106
|
+
"minWidth": {
|
|
107
|
+
"description": "Indicates the min width of the authoring container",
|
|
108
|
+
"default": "undefined",
|
|
109
|
+
"type": [
|
|
110
|
+
"string",
|
|
111
|
+
"number"
|
|
112
|
+
],
|
|
113
|
+
"title": "minWidth"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"title": "contentDimensions"
|
|
117
|
+
},
|
|
118
|
+
"settingsPartialScoring": {
|
|
119
|
+
"description": "Indicates whether the settings panel wil allow the author to modify settings for partial scoring",
|
|
120
|
+
"default": true,
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"title": "settingsPartialScoring"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"definitions": {
|
|
126
|
+
"ConfigureProp": {
|
|
127
|
+
"title": "ConfigureProp",
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"settings": {
|
|
131
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"title": "settings"
|
|
134
|
+
},
|
|
135
|
+
"label": {
|
|
136
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
137
|
+
"type": "string",
|
|
138
|
+
"title": "label"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"ConfigureMathMLProp": {
|
|
143
|
+
"title": "ConfigureMathMLProp",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"properties": {
|
|
146
|
+
"mmlOutput": {
|
|
147
|
+
"description": "Indicates if model should have mathML output instead of latex",
|
|
148
|
+
"type": "number",
|
|
149
|
+
"title": "mmlOutput"
|
|
150
|
+
},
|
|
151
|
+
"mmlEditing": {
|
|
152
|
+
"description": "Indicates if mathML that's already in model should be editable",
|
|
153
|
+
"type": "number",
|
|
154
|
+
"title": "mmlEditing"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
160
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
The schema defines the following properties:
|
|
2
|
+
|
|
3
|
+
# `settingsPanelDisabled` (boolean)
|
|
4
|
+
|
|
5
|
+
Indicates if the settings panel is not available
|
|
6
|
+
|
|
7
|
+
# `showExcludeZero` (object)
|
|
8
|
+
|
|
9
|
+
Properties of the `showExcludeZero` object:
|
|
10
|
+
|
|
11
|
+
## `settings` (boolean)
|
|
12
|
+
|
|
13
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
14
|
+
|
|
15
|
+
## `label` (string)
|
|
16
|
+
|
|
17
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
18
|
+
|
|
19
|
+
# `showMaxPoint` (object)
|
|
20
|
+
|
|
21
|
+
Properties of the `showMaxPoint` object:
|
|
22
|
+
|
|
23
|
+
## `settings` (boolean)
|
|
24
|
+
|
|
25
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
26
|
+
|
|
27
|
+
## `label` (string)
|
|
28
|
+
|
|
29
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
30
|
+
|
|
31
|
+
# `width` (string)
|
|
32
|
+
|
|
33
|
+
How large can the rubric be
|
|
34
|
+
|
|
35
|
+
# `mathMlOptions` (object)
|
|
36
|
+
|
|
37
|
+
Properties of the `mathMlOptions` object:
|
|
38
|
+
|
|
39
|
+
## `mmlOutput` (number)
|
|
40
|
+
|
|
41
|
+
Indicates if model should have mathML output instead of latex
|
|
42
|
+
|
|
43
|
+
## `mmlEditing` (number)
|
|
44
|
+
|
|
45
|
+
Indicates if mathML that's already in model should be editable
|
|
46
|
+
|
|
47
|
+
# `showPrompt` (boolean)
|
|
48
|
+
|
|
49
|
+
Determines whether prompt field will be displayed or not
|
|
50
|
+
|
|
51
|
+
Default: `true`
|
|
52
|
+
|
|
53
|
+
# `promptLabel` (string)
|
|
54
|
+
|
|
55
|
+
The label for the item stem/prompt field
|
|
56
|
+
|
|
57
|
+
Default: `"Item Stemm"`
|
|
58
|
+
|
|
59
|
+
# `contentDimensions` (object)
|
|
60
|
+
|
|
61
|
+
Indicates the dimensions configuration for the authoring container
|
|
62
|
+
Note: Some items have a default minimum width because of their content, but if
|
|
63
|
+
the minWidth is lower than this, the overflow behavior will take care of that
|
|
64
|
+
|
|
65
|
+
Properties of the `contentDimensions` object:
|
|
66
|
+
|
|
67
|
+
## `maxHeight` (string,number)
|
|
68
|
+
|
|
69
|
+
Indicates the max height of the authoring container
|
|
70
|
+
|
|
71
|
+
Default: `"undefined"`
|
|
72
|
+
|
|
73
|
+
## `maxWidth` (string,number)
|
|
74
|
+
|
|
75
|
+
Indicates the max width of the authoring container
|
|
76
|
+
|
|
77
|
+
Default: `"undefined"`
|
|
78
|
+
|
|
79
|
+
## `minHeight` (string,number)
|
|
80
|
+
|
|
81
|
+
Indicates the min height of the authoring container
|
|
82
|
+
|
|
83
|
+
Default: `"undefined"`
|
|
84
|
+
|
|
85
|
+
## `minWidth` (string,number)
|
|
86
|
+
|
|
87
|
+
Indicates the min width of the authoring container
|
|
88
|
+
|
|
89
|
+
Default: `"undefined"`
|
|
90
|
+
|
|
91
|
+
Default: `": {}"`
|
|
92
|
+
|
|
93
|
+
# `settingsPartialScoring` (boolean)
|
|
94
|
+
|
|
95
|
+
Indicates whether the settings panel wil allow the author to modify settings for partial scoring
|
|
96
|
+
|
|
97
|
+
Default: `true`
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
# Sub Schemas
|
|
102
|
+
|
|
103
|
+
The schema defines the following additional types:
|
|
104
|
+
|
|
105
|
+
## `ConfigureProp` (object)
|
|
106
|
+
|
|
107
|
+
Properties of the `ConfigureProp` object:
|
|
108
|
+
|
|
109
|
+
### `settings` (boolean)
|
|
110
|
+
|
|
111
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
112
|
+
|
|
113
|
+
### `label` (string)
|
|
114
|
+
|
|
115
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
116
|
+
|
|
117
|
+
## `ConfigureMathMLProp` (object)
|
|
118
|
+
|
|
119
|
+
Properties of the `ConfigureMathMLProp` object:
|
|
120
|
+
|
|
121
|
+
### `mmlOutput` (number)
|
|
122
|
+
|
|
123
|
+
Indicates if model should have mathML output instead of latex
|
|
124
|
+
|
|
125
|
+
### `mmlEditing` (number)
|
|
126
|
+
|
|
127
|
+
Indicates if mathML that's already in model should be editable
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Model for the RubricPie Interaction",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"points": {
|
|
7
|
+
"description": "Indicates the score points labels. Starting from 0 to max",
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"description": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"patternProperties": {
|
|
14
|
+
"^[0-9]+$": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"title": "points"
|
|
20
|
+
},
|
|
21
|
+
"sampleAnswers": {
|
|
22
|
+
"description": "Indicates the sample answers labels. Starting from 0 to max",
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"description": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"patternProperties": {
|
|
29
|
+
"^[0-9]+$": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"title": "sampleAnswers"
|
|
35
|
+
},
|
|
36
|
+
"maxPoints": {
|
|
37
|
+
"description": "Indicates the max limit for scoring points",
|
|
38
|
+
"type": "number",
|
|
39
|
+
"title": "maxPoints"
|
|
40
|
+
},
|
|
41
|
+
"excludeZeros": {
|
|
42
|
+
"description": "Indicates if point 0 should be shown",
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"title": "excludeZeros"
|
|
45
|
+
},
|
|
46
|
+
"id": {
|
|
47
|
+
"description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"title": "id"
|
|
50
|
+
},
|
|
51
|
+
"element": {
|
|
52
|
+
"description": "The html Element tag name",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"title": "element"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"element",
|
|
59
|
+
"id"
|
|
60
|
+
],
|
|
61
|
+
"definitions": {
|
|
62
|
+
"ConfigureProp": {
|
|
63
|
+
"title": "ConfigureProp",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"settings": {
|
|
67
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"title": "settings"
|
|
70
|
+
},
|
|
71
|
+
"label": {
|
|
72
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"title": "label"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"ConfigureMathMLProp": {
|
|
79
|
+
"title": "ConfigureMathMLProp",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"mmlOutput": {
|
|
83
|
+
"description": "Indicates if model should have mathML output instead of latex",
|
|
84
|
+
"type": "number",
|
|
85
|
+
"title": "mmlOutput"
|
|
86
|
+
},
|
|
87
|
+
"mmlEditing": {
|
|
88
|
+
"description": "Indicates if mathML that's already in model should be editable",
|
|
89
|
+
"type": "number",
|
|
90
|
+
"title": "mmlEditing"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
96
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Model for the RubricPie Interaction
|
|
2
|
+
|
|
3
|
+
The schema defines the following properties:
|
|
4
|
+
|
|
5
|
+
# `points` (array)
|
|
6
|
+
|
|
7
|
+
Indicates the score points labels. Starting from 0 to max
|
|
8
|
+
|
|
9
|
+
The object is an array with all elements of the type `object`.
|
|
10
|
+
|
|
11
|
+
The array object has the following properties:
|
|
12
|
+
|
|
13
|
+
# `sampleAnswers` (array)
|
|
14
|
+
|
|
15
|
+
Indicates the sample answers labels. Starting from 0 to max
|
|
16
|
+
|
|
17
|
+
The object is an array with all elements of the type `object`.
|
|
18
|
+
|
|
19
|
+
The array object has the following properties:
|
|
20
|
+
|
|
21
|
+
# `maxPoints` (number)
|
|
22
|
+
|
|
23
|
+
Indicates the max limit for scoring points
|
|
24
|
+
|
|
25
|
+
# `excludeZeros` (boolean)
|
|
26
|
+
|
|
27
|
+
Indicates if point 0 should be shown
|
|
28
|
+
|
|
29
|
+
# `id` (string, required)
|
|
30
|
+
|
|
31
|
+
Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
|
|
32
|
+
|
|
33
|
+
# `element` (string, required)
|
|
34
|
+
|
|
35
|
+
The html Element tag name
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# Sub Schemas
|
|
40
|
+
|
|
41
|
+
The schema defines the following additional types:
|
|
42
|
+
|
|
43
|
+
## `ConfigureProp` (object)
|
|
44
|
+
|
|
45
|
+
Properties of the `ConfigureProp` object:
|
|
46
|
+
|
|
47
|
+
### `settings` (boolean)
|
|
48
|
+
|
|
49
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
50
|
+
|
|
51
|
+
### `label` (string)
|
|
52
|
+
|
|
53
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
54
|
+
|
|
55
|
+
## `ConfigureMathMLProp` (object)
|
|
56
|
+
|
|
57
|
+
Properties of the `ConfigureMathMLProp` object:
|
|
58
|
+
|
|
59
|
+
### `mmlOutput` (number)
|
|
60
|
+
|
|
61
|
+
Indicates if model should have mathML output instead of latex
|
|
62
|
+
|
|
63
|
+
### `mmlEditing` (number)
|
|
64
|
+
|
|
65
|
+
Indicates if mathML that's already in model should be editable
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
|
|
16
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
+
|
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
+
|
|
20
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
+
|
|
22
|
+
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
23
|
+
|
|
24
|
+
var _main = _interopRequireDefault(require("./main"));
|
|
25
|
+
|
|
26
|
+
var _react = _interopRequireDefault(require("react"));
|
|
27
|
+
|
|
28
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
29
|
+
|
|
30
|
+
var _debug = _interopRequireDefault(require("debug"));
|
|
31
|
+
|
|
32
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
33
|
+
|
|
34
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
|
+
|
|
36
|
+
var RubricRender = /*#__PURE__*/function (_HTMLElement) {
|
|
37
|
+
(0, _inherits2["default"])(RubricRender, _HTMLElement);
|
|
38
|
+
|
|
39
|
+
var _super = _createSuper(RubricRender);
|
|
40
|
+
|
|
41
|
+
function RubricRender() {
|
|
42
|
+
var _this;
|
|
43
|
+
|
|
44
|
+
(0, _classCallCheck2["default"])(this, RubricRender);
|
|
45
|
+
_this = _super.call(this);
|
|
46
|
+
|
|
47
|
+
_debug["default"].log('constructor called');
|
|
48
|
+
|
|
49
|
+
_this.onModelChanged = _this.onModelChanged.bind((0, _assertThisInitialized2["default"])(_this));
|
|
50
|
+
return _this;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
(0, _createClass2["default"])(RubricRender, [{
|
|
54
|
+
key: "model",
|
|
55
|
+
set: function set(s) {
|
|
56
|
+
this._model = s;
|
|
57
|
+
|
|
58
|
+
this._render();
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
key: "onModelChanged",
|
|
62
|
+
value: function onModelChanged(m) {
|
|
63
|
+
this._model = m;
|
|
64
|
+
|
|
65
|
+
this._render();
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
key: "connectedCallback",
|
|
69
|
+
value: function connectedCallback() {
|
|
70
|
+
this._render();
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "_render",
|
|
74
|
+
value: function _render() {
|
|
75
|
+
if (this._model) {
|
|
76
|
+
var el = /*#__PURE__*/_react["default"].createElement(_main["default"], {
|
|
77
|
+
value: this._model
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
_reactDom["default"].render(el, this);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}]);
|
|
84
|
+
return RubricRender;
|
|
85
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
|
|
86
|
+
|
|
87
|
+
exports["default"] = RubricRender;
|
|
88
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["RubricRender","debug","log","onModelChanged","bind","s","_model","_render","m","el","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;IAEqBA,Y;;;;;AACnB,0BAAc;AAAA;;AAAA;AACZ;;AACAC,sBAAMC,GAAN,CAAU,oBAAV;;AACA,UAAKC,cAAL,GAAsB,MAAKA,cAAL,CAAoBC,IAApB,gDAAtB;AAHY;AAIb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;;AACA,WAAKE,OAAL;AACD;;;WAED,wBAAeC,CAAf,EAAkB;AAChB,WAAKF,MAAL,GAAcE,CAAd;;AACA,WAAKD,OAAL;AACD;;;WAED,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;WAED,mBAAU;AACR,UAAI,KAAKD,MAAT,EAAiB;AACf,YAAMG,EAAE,gBAAG,gCAAC,gBAAD;AAAQ,UAAA,KAAK,EAAE,KAAKH;AAApB,UAAX;;AAEAI,6BAASC,MAAT,CAAgBF,EAAhB,EAAoB,IAApB;AACD;AACF;;;kDA3BuCG,W","sourcesContent":["import Rubric from './main';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\n\nexport default class RubricRender extends HTMLElement {\n constructor() {\n super();\n debug.log('constructor called');\n this.onModelChanged = this.onModelChanged.bind(this);\n }\n\n set model(s) {\n this._model = s;\n this._render();\n }\n\n onModelChanged(m) {\n this._model = m;\n this._render();\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model) {\n const el = <Rubric value={this._model} />;\n\n ReactDOM.render(el, this);\n }\n }\n}\n"],"file":"index.js"}
|