@pie-element/complex-rubric 0.0.2-next.4424 → 0.1.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.
- package/dist/author/defaults.d.ts +232 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +177 -0
- package/dist/author/index.d.ts +35 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +86 -0
- package/dist/author/main.d.ts +24 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +106 -0
- package/dist/controller/defaults.d.ts +40 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +42 -0
- package/dist/controller/index.d.ts +26 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +107 -0
- package/dist/controller/utils.d.ts +10 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +4 -0
- package/dist/delivery/index.d.ts +24 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +96 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +145 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/print/index.d.ts +25 -0
- package/dist/print/index.d.ts.map +1 -0
- package/dist/print/index.js +84 -0
- package/package.json +65 -16
- package/src/author/defaults.tsx +223 -0
- package/{configure/src/index.js → src/author/index.ts} +69 -28
- package/src/author/main.tsx +172 -0
- package/src/controller/defaults.ts +49 -0
- package/src/controller/index.ts +230 -0
- package/src/controller/utils.ts +13 -0
- package/src/{index.js → delivery/index.ts} +65 -9
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
- package/src/print/index.ts +150 -0
- package/LICENSE.md +0 -5
- package/README.md +0 -3
- package/configure/lib/defaults.js +0 -99
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -232
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -165
- package/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +0 -376
- package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +0 -55
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +0 -344
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +0 -455
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +0 -82
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +0 -112
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +0 -438
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +0 -324
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +0 -490
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +0 -334
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +0 -254
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +0 -29
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +0 -22
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +0 -66
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +0 -9
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +0 -122
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +0 -226
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +0 -169
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +0 -108
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +0 -6
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +0 -282
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +0 -189
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +0 -85
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +0 -99
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +0 -209
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +0 -103
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +0 -24
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +0 -731
- package/configure/node_modules/@pie-element/rubric/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/rubric/README.md +0 -3
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +0 -615
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +0 -93
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -16
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -38
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +0 -105
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -14
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -9
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -35
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -6
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -24
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +0 -19
- package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -3
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -62
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -35
- package/configure/node_modules/@pie-element/rubric/lib/index.js +0 -88
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -171
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/package.json +0 -25
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -22767
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -48
- package/configure/node_modules/@pie-element/rubric/src/index.js +0 -38
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -117
- package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
- package/configure/package.json +0 -22
- package/configure/src/__tests__/__snapshots__/main.test.jsx.snap +0 -106
- package/configure/src/__tests__/index.test.js +0 -41
- package/configure/src/__tests__/main.test.jsx +0 -104
- package/configure/src/defaults.js +0 -122
- package/configure/src/main.jsx +0 -117
- package/controller/lib/defaults.js +0 -99
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -147
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -12
- package/controller/src/__tests__/index.test.js +0 -58
- package/controller/src/defaults.js +0 -121
- package/controller/src/index.js +0 -81
- package/docs/config-schema.json +0 -427
- package/docs/config-schema.json.md +0 -315
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -119
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -6
- package/docs/pie-schema.json +0 -994
- package/docs/pie-schema.json.md +0 -660
- package/lib/index.js +0 -176
- package/lib/index.js.map +0 -1
- package/src/__tests__/index.test.js +0 -166
package/package.json
CHANGED
|
@@ -1,25 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/complex-rubric",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"main": "lib/index.js",
|
|
5
|
-
"module": "src/index.js",
|
|
3
|
+
"version": "0.1.0",
|
|
6
4
|
"description": "Complex Rubric Scoring Interaction",
|
|
7
|
-
"repository": "pie-framework/pie-elements",
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public"
|
|
10
|
-
},
|
|
11
5
|
"dependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@
|
|
14
|
-
"
|
|
6
|
+
"@emotion/react": "^11.14.0",
|
|
7
|
+
"@emotion/style": "^0.8.0",
|
|
8
|
+
"@mui/icons-material": "^7.3.4",
|
|
9
|
+
"@mui/material": "^7.3.4",
|
|
10
|
+
"@pie-element/multi-trait-rubric": "0.1.0",
|
|
11
|
+
"@pie-element/rubric": "0.1.0",
|
|
12
|
+
"@pie-lib/rubric": "0.1.0",
|
|
13
|
+
"classnames": "^2.2.5",
|
|
14
|
+
"debug": "^4.1.1",
|
|
15
|
+
"lodash-es": "^4.17.23",
|
|
16
|
+
"prop-types": "^15.7.2",
|
|
17
|
+
"@pie-element/shared-configure-events": "0.1.0",
|
|
18
|
+
"@pie-lib/config-ui": "0.1.0",
|
|
19
|
+
"@pie-lib/render-ui": "0.1.0",
|
|
20
|
+
"@pie-element/shared-player-events": "0.1.0"
|
|
15
21
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"scripts": {
|
|
20
|
-
"postpublish": "../../scripts/postpublish"
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^18.0.0",
|
|
24
|
+
"react-dom": "^18.0.0"
|
|
21
25
|
},
|
|
22
26
|
"exports": {
|
|
23
|
-
".":
|
|
27
|
+
".": {
|
|
28
|
+
"development": "./src/index.ts",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./delivery": {
|
|
33
|
+
"development": "./src/delivery/index.ts",
|
|
34
|
+
"types": "./dist/delivery/index.d.ts",
|
|
35
|
+
"default": "./dist/delivery/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./author": {
|
|
38
|
+
"development": "./src/author/index.ts",
|
|
39
|
+
"types": "./dist/author/index.d.ts",
|
|
40
|
+
"default": "./dist/author/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./controller": {
|
|
43
|
+
"development": "./src/controller/index.ts",
|
|
44
|
+
"types": "./dist/controller/index.d.ts",
|
|
45
|
+
"default": "./dist/controller/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./print": {
|
|
48
|
+
"development": "./src/print/index.ts",
|
|
49
|
+
"types": "./dist/print/index.d.ts",
|
|
50
|
+
"default": "./dist/print/index.js"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"type": "module",
|
|
54
|
+
"main": "./dist/index.js",
|
|
55
|
+
"types": "./dist/index.d.ts",
|
|
56
|
+
"files": [
|
|
57
|
+
"dist",
|
|
58
|
+
"src"
|
|
59
|
+
],
|
|
60
|
+
"sideEffects": false,
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"vite": "^8.0.1",
|
|
63
|
+
"typescript": "^5.9.3",
|
|
64
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
65
|
+
"@types/react": "^18.2.0",
|
|
66
|
+
"@types/react-dom": "^18.2.0"
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"build": "bun x vite build && bun x vite build --config vite.config.iife.ts && bun x tsc --emitDeclarationOnly",
|
|
70
|
+
"dev": "bun x vite",
|
|
71
|
+
"demo": "bun x vite --mode demo",
|
|
72
|
+
"test": "bun x vitest run"
|
|
24
73
|
}
|
|
25
74
|
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/complex-rubric/configure/src/defaults.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { RUBRIC_TYPES } from '@pie-lib/rubric';
|
|
12
|
+
|
|
13
|
+
const multiTraitDefaultModel = {
|
|
14
|
+
description: false,
|
|
15
|
+
excludeZero: false,
|
|
16
|
+
halfScoring: false,
|
|
17
|
+
pointLabels: true,
|
|
18
|
+
scales: [],
|
|
19
|
+
standards: false,
|
|
20
|
+
visibleToStudent: true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const rubricDefaultModel = {
|
|
24
|
+
points: ['', '', '', ''],
|
|
25
|
+
sampleAnswers: [null, null, null, null],
|
|
26
|
+
maxPoints: 3,
|
|
27
|
+
excludeZero: false,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const rubriclessDefaultModel = {
|
|
31
|
+
maxPoints: 100,
|
|
32
|
+
excludeZero: false,
|
|
33
|
+
rubriclessInstructionEnabled: true,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const multiTraitDefaultConfiguration = {
|
|
37
|
+
baseInputConfiguration: {
|
|
38
|
+
h3: { disabled: true },
|
|
39
|
+
audio: { disabled: false },
|
|
40
|
+
video: { disabled: false },
|
|
41
|
+
image: { disabled: false },
|
|
42
|
+
textAlign: { disabled: true },
|
|
43
|
+
showParagraphs: { disabled: false },
|
|
44
|
+
},
|
|
45
|
+
expandedInput: {
|
|
46
|
+
inputConfiguration: {
|
|
47
|
+
math: { disabled: true },
|
|
48
|
+
audio: { disabled: false },
|
|
49
|
+
video: { disabled: false },
|
|
50
|
+
image: { disabled: false },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
labelInput: {
|
|
54
|
+
inputConfiguration: {
|
|
55
|
+
math: { disabled: true },
|
|
56
|
+
audio: { disabled: true },
|
|
57
|
+
video: { disabled: true },
|
|
58
|
+
image: { disabled: true },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
settingsPanelDisabled: false,
|
|
62
|
+
excludeZeroDialogBoxContent: {
|
|
63
|
+
title: 'Exclude 0 (Zero) from Score Point Values.',
|
|
64
|
+
text: `<div>
|
|
65
|
+
You are about to exclude 0 from score point values.
|
|
66
|
+
<br/>
|
|
67
|
+
Some of the existing data has to be changed.
|
|
68
|
+
<br/>
|
|
69
|
+
Please choose if you want to:
|
|
70
|
+
<ul>
|
|
71
|
+
<li>
|
|
72
|
+
shift Labels and Descriptions to the left
|
|
73
|
+
</li>
|
|
74
|
+
<li>
|
|
75
|
+
remove 0 column with its Label and Description
|
|
76
|
+
</li>
|
|
77
|
+
</ul>
|
|
78
|
+
</div>`,
|
|
79
|
+
},
|
|
80
|
+
includeZeroDialogBoxContent: {
|
|
81
|
+
title: 'Include 0 (Zero) in Score Point Values.',
|
|
82
|
+
text: `<div>
|
|
83
|
+
You are about to include 0 in score point values.
|
|
84
|
+
<br/>
|
|
85
|
+
Some of the existing data has to be changed.
|
|
86
|
+
<br/>
|
|
87
|
+
Please choose if you want to:
|
|
88
|
+
<ul>
|
|
89
|
+
<li>
|
|
90
|
+
shift Labels and Descriptions to the right
|
|
91
|
+
</li>
|
|
92
|
+
<li>
|
|
93
|
+
add 0 column with empty Label and Descriptions
|
|
94
|
+
</li>
|
|
95
|
+
</ul>
|
|
96
|
+
</div>`,
|
|
97
|
+
},
|
|
98
|
+
deleteScaleDialogBoxContent: {
|
|
99
|
+
title: 'Delete Scale',
|
|
100
|
+
text: 'Are you sure you want to delete this scale?',
|
|
101
|
+
},
|
|
102
|
+
maxPointsDialogBoxContent: {
|
|
103
|
+
title: 'Decreasing Max Points.',
|
|
104
|
+
text: ` You are about to decrease max score point value.
|
|
105
|
+
<br/>
|
|
106
|
+
All the Labels and Descriptions for scores above Max Point will be deleted.`,
|
|
107
|
+
},
|
|
108
|
+
spellCheck: {
|
|
109
|
+
label: 'Spellcheck',
|
|
110
|
+
settings: false,
|
|
111
|
+
enabled: true,
|
|
112
|
+
},
|
|
113
|
+
showExcludeZero: {
|
|
114
|
+
settings: true,
|
|
115
|
+
label: 'Exclude Zero',
|
|
116
|
+
},
|
|
117
|
+
showScorePointLabels: {
|
|
118
|
+
settings: true,
|
|
119
|
+
label: 'Show Score Point Labels',
|
|
120
|
+
},
|
|
121
|
+
showDescription: {
|
|
122
|
+
settings: true,
|
|
123
|
+
label: 'Show Description',
|
|
124
|
+
},
|
|
125
|
+
showVisibleToStudent: {
|
|
126
|
+
settings: true,
|
|
127
|
+
label: 'Visible to Student',
|
|
128
|
+
},
|
|
129
|
+
showHalfScoring: {
|
|
130
|
+
settings: true,
|
|
131
|
+
label: 'Half Scoring',
|
|
132
|
+
},
|
|
133
|
+
// commenting this in order to use the dynamic width if the width was not set by the client (PD-3203)
|
|
134
|
+
// width: '900px',
|
|
135
|
+
// these should not be set to true (should not be used) for now
|
|
136
|
+
showStandards: {
|
|
137
|
+
settings: false,
|
|
138
|
+
label: 'Show Standards',
|
|
139
|
+
},
|
|
140
|
+
showLevelTagInput: {
|
|
141
|
+
settings: false,
|
|
142
|
+
label: 'Show Level Tag Input',
|
|
143
|
+
enabled: false,
|
|
144
|
+
},
|
|
145
|
+
dragAndDrop: {
|
|
146
|
+
settings: true,
|
|
147
|
+
label: 'Enable Drag and Drop',
|
|
148
|
+
enabled: false,
|
|
149
|
+
},
|
|
150
|
+
maxMaxPoints: 9,
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const rubricDefaultConfiguration = {
|
|
154
|
+
baseInputConfiguration: {
|
|
155
|
+
h3: { disabled: true },
|
|
156
|
+
audio: { disabled: false },
|
|
157
|
+
video: { disabled: false },
|
|
158
|
+
image: { disabled: false },
|
|
159
|
+
textAlign: { disabled: true },
|
|
160
|
+
showParagraphs: { disabled: false },
|
|
161
|
+
},
|
|
162
|
+
showExcludeZero: {
|
|
163
|
+
settings: true,
|
|
164
|
+
label: 'Ability to exclude zero',
|
|
165
|
+
},
|
|
166
|
+
showMaxPoint: {
|
|
167
|
+
settings: true,
|
|
168
|
+
label: 'Show max points dropdown',
|
|
169
|
+
},
|
|
170
|
+
settingsPanelDisabled: false,
|
|
171
|
+
maxMaxPoints: 9,
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const rubriclessDefaultConfiguration = {
|
|
175
|
+
baseInputConfiguration: {
|
|
176
|
+
h3: { disabled: true },
|
|
177
|
+
audio: { disabled: false },
|
|
178
|
+
video: { disabled: false },
|
|
179
|
+
image: { disabled: false },
|
|
180
|
+
textAlign: { disabled: true },
|
|
181
|
+
showParagraphs: { disabled: false },
|
|
182
|
+
},
|
|
183
|
+
showExcludeZero: {
|
|
184
|
+
settings: true,
|
|
185
|
+
label: 'Ability to exclude zero',
|
|
186
|
+
},
|
|
187
|
+
showMaxPoint: {
|
|
188
|
+
settings: true,
|
|
189
|
+
label: 'Show max points dropdown',
|
|
190
|
+
},
|
|
191
|
+
settingsPanelDisabled: false,
|
|
192
|
+
// shows us if it simple rubric or rubricless(simple rubric with less structure)
|
|
193
|
+
rubricless: true,
|
|
194
|
+
// scoring instruction for rubricless
|
|
195
|
+
rubriclessInstruction: {
|
|
196
|
+
settings: true,
|
|
197
|
+
label: 'Instruction',
|
|
198
|
+
inputConfiguration: {
|
|
199
|
+
audio: { disabled: false },
|
|
200
|
+
video: { disabled: false },
|
|
201
|
+
image: { disabled: false },
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
maxMaxPoints: 100,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export default {
|
|
208
|
+
model: {
|
|
209
|
+
rubricType: 'simpleRubric',
|
|
210
|
+
rubrics: {
|
|
211
|
+
[RUBRIC_TYPES.SIMPLE_RUBRIC]: rubricDefaultModel,
|
|
212
|
+
[RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: multiTraitDefaultModel,
|
|
213
|
+
[RUBRIC_TYPES.RUBRICLESS]: rubriclessDefaultModel,
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
configuration: {
|
|
217
|
+
// width: '770px',
|
|
218
|
+
rubricOptions: ['simpleRubric', 'multiTraitRubric', 'rubricless'],
|
|
219
|
+
[RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: multiTraitDefaultConfiguration,
|
|
220
|
+
[RUBRIC_TYPES.SIMPLE_RUBRIC]: rubricDefaultConfiguration,
|
|
221
|
+
[RUBRIC_TYPES.RUBRICLESS]: rubriclessDefaultConfiguration,
|
|
222
|
+
},
|
|
223
|
+
};
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/complex-rubric/configure/src/index.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { ModelUpdatedEvent } from '@pie-element/shared-configure-events';
|
|
2
12
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
-
import RubricConfigure from '@pie-element/rubric/
|
|
5
|
-
import MultiTraitRubricConfigure from '@pie-element/multi-trait-rubric/
|
|
13
|
+
import { createRoot } from 'react-dom/client';
|
|
14
|
+
import RubricConfigure from '@pie-element/rubric/author';
|
|
15
|
+
import MultiTraitRubricConfigure from '@pie-element/multi-trait-rubric/author';
|
|
6
16
|
import debug from 'debug';
|
|
7
|
-
import defaults from 'lodash
|
|
8
|
-
import Main from '
|
|
9
|
-
|
|
10
|
-
import sensibleDefaults from './defaults';
|
|
17
|
+
import { defaults } from 'lodash-es';
|
|
18
|
+
import Main from './main.js';
|
|
19
|
+
import sensibleDefaults from './defaults.js';
|
|
11
20
|
|
|
12
21
|
const MODEL_UPDATED = ModelUpdatedEvent.TYPE;
|
|
13
22
|
const RUBRIC_TAG_NAME = 'rubric-configure';
|
|
14
23
|
const MULTI_TRAIT_RUBRIC_TAG_NAME = 'multi-trait-rubric-configure';
|
|
15
24
|
|
|
16
25
|
class ComplexSimpleRubricConfigure extends RubricConfigure {}
|
|
17
|
-
|
|
26
|
+
|
|
27
|
+
class ComplexMTRConfigure extends MultiTraitRubricConfigure {
|
|
28
|
+
}
|
|
18
29
|
|
|
19
30
|
const defineComplexRubric = () => {
|
|
20
31
|
if (!customElements.get(RUBRIC_TAG_NAME)) {
|
|
@@ -29,42 +40,63 @@ defineComplexRubric();
|
|
|
29
40
|
|
|
30
41
|
const prepareCustomizationObject = (config, model) => {
|
|
31
42
|
const configuration = defaults(config, sensibleDefaults.configuration);
|
|
32
|
-
configuration.settingsPanelDisabled = true;
|
|
33
43
|
|
|
34
44
|
return {
|
|
35
45
|
configuration,
|
|
36
|
-
model
|
|
46
|
+
model,
|
|
37
47
|
};
|
|
38
48
|
};
|
|
39
49
|
|
|
40
50
|
export default class ComplexRubricConfigureElement extends HTMLElement {
|
|
41
|
-
static createDefaultModel = (
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
static createDefaultModel = (
|
|
52
|
+
{
|
|
53
|
+
rubrics: { simpleRubric = {}, rubricless = {}, multiTraitRubric = {} } = { simpleRubric: {}, rubricless: {}, multiTraitRubric: {} },
|
|
54
|
+
...model
|
|
55
|
+
} = {},
|
|
56
|
+
currentModel = {},
|
|
57
|
+
) =>
|
|
58
|
+
{
|
|
59
|
+
const pieDefaults = sensibleDefaults?.model || {}
|
|
60
|
+
return {
|
|
61
|
+
...pieDefaults,
|
|
62
|
+
...currentModel,
|
|
63
|
+
...model,
|
|
44
64
|
rubrics: {
|
|
45
65
|
simpleRubric: {
|
|
46
|
-
...(
|
|
47
|
-
...simpleRubric
|
|
66
|
+
...(sensibleDefaults?.model?.rubrics || {}).simpleRubric,
|
|
67
|
+
...(currentModel.rubrics || {}).simpleRubric,
|
|
68
|
+
...simpleRubric,
|
|
48
69
|
},
|
|
49
70
|
multiTraitRubric: {
|
|
50
|
-
...(
|
|
51
|
-
...multiTraitRubric
|
|
52
|
-
|
|
71
|
+
...(sensibleDefaults?.model?.rubrics || {}).multiTraitRubric,
|
|
72
|
+
...(currentModel.rubrics || {}).multiTraitRubric,
|
|
73
|
+
...multiTraitRubric,
|
|
74
|
+
},
|
|
75
|
+
rubricless: {
|
|
76
|
+
...(sensibleDefaults?.model?.rubrics || {}).rubricless,
|
|
77
|
+
...(currentModel.rubrics || {}).rubricless,
|
|
78
|
+
...rubricless,
|
|
79
|
+
},
|
|
53
80
|
},
|
|
54
|
-
}
|
|
81
|
+
}};
|
|
55
82
|
|
|
56
83
|
constructor() {
|
|
57
84
|
super();
|
|
85
|
+
this._root = null;
|
|
86
|
+
this.canUpdateModel = false;
|
|
87
|
+
|
|
58
88
|
debug.log('constructor called');
|
|
59
|
-
this._model = ComplexRubricConfigureElement.createDefaultModel();
|
|
60
89
|
|
|
90
|
+
this._model = ComplexRubricConfigureElement.createDefaultModel();
|
|
61
91
|
this._configuration = sensibleDefaults.configuration;
|
|
92
|
+
|
|
62
93
|
this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
63
94
|
}
|
|
64
95
|
|
|
65
96
|
set model(m) {
|
|
66
97
|
this._model = ComplexRubricConfigureElement.createDefaultModel(m, this._model);
|
|
67
98
|
|
|
99
|
+
this.canUpdateModel = true;
|
|
68
100
|
this._render();
|
|
69
101
|
}
|
|
70
102
|
|
|
@@ -74,10 +106,11 @@ export default class ComplexRubricConfigureElement extends HTMLElement {
|
|
|
74
106
|
this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));
|
|
75
107
|
}
|
|
76
108
|
|
|
77
|
-
onModelChanged = (m, reset) => {
|
|
109
|
+
onModelChanged: any = (m, reset) => {
|
|
78
110
|
this._model = ComplexRubricConfigureElement.createDefaultModel(m, this._model);
|
|
79
111
|
|
|
80
112
|
this.dispatchModelUpdated(reset);
|
|
113
|
+
|
|
81
114
|
this._render();
|
|
82
115
|
};
|
|
83
116
|
|
|
@@ -98,7 +131,7 @@ export default class ComplexRubricConfigureElement extends HTMLElement {
|
|
|
98
131
|
this._render();
|
|
99
132
|
}
|
|
100
133
|
|
|
101
|
-
onModelUpdated = e => {
|
|
134
|
+
onModelUpdated: any = (e) => {
|
|
102
135
|
if (e.target === this) {
|
|
103
136
|
return;
|
|
104
137
|
}
|
|
@@ -122,17 +155,25 @@ export default class ComplexRubricConfigureElement extends HTMLElement {
|
|
|
122
155
|
this._render();
|
|
123
156
|
}
|
|
124
157
|
|
|
125
|
-
disconnectedCallback() {
|
|
126
|
-
this.removeEventListener(MODEL_UPDATED, this.onModelUpdated);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
158
|
_render() {
|
|
130
159
|
let element = React.createElement(Main, {
|
|
131
160
|
model: this._model,
|
|
132
161
|
configuration: this._configuration,
|
|
133
162
|
onModelChanged: this.onModelChanged,
|
|
134
163
|
onConfigurationChanged: this.onConfigurationChanged,
|
|
164
|
+
canUpdateModel: this.canUpdateModel
|
|
135
165
|
});
|
|
136
|
-
|
|
166
|
+
|
|
167
|
+
if (!this._root) {
|
|
168
|
+
this._root = createRoot(this);
|
|
169
|
+
}
|
|
170
|
+
this._root.render(element);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
disconnectedCallback() {
|
|
174
|
+
this.removeEventListener(MODEL_UPDATED, this.onModelUpdated);
|
|
175
|
+
if (this._root) {
|
|
176
|
+
this._root.unmount();
|
|
177
|
+
}
|
|
137
178
|
}
|
|
138
179
|
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/complex-rubric/configure/src/main.jsx
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
13
|
+
import { RUBRIC_TYPES } from '@pie-lib/rubric';
|
|
14
|
+
import { layout } from '@pie-lib/config-ui';
|
|
15
|
+
import Radio from '@mui/material/Radio';
|
|
16
|
+
import RadioGroup from '@mui/material/RadioGroup';
|
|
17
|
+
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
18
|
+
import { styled } from '@mui/material/styles';
|
|
19
|
+
import { color } from '@pie-lib/render-ui';
|
|
20
|
+
|
|
21
|
+
const StyledFormControlLabel: any = styled(FormControlLabel)({
|
|
22
|
+
'&.MuiFormControlLabel-root': {
|
|
23
|
+
width: 'fit-content',
|
|
24
|
+
paddingRight: '24px',
|
|
25
|
+
boxSizing: 'border-box',
|
|
26
|
+
'&:hover': {
|
|
27
|
+
background: 'var(--pie-secondary-background, rgba(241,241,241,1))',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const StyledRadio: any = styled(Radio)({
|
|
33
|
+
'&.MuiRadio-root': {
|
|
34
|
+
color: `${color.tertiary()} !important`,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const rubricLabels = {
|
|
39
|
+
[RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: 'Multi Trait Rubric',
|
|
40
|
+
[RUBRIC_TYPES.SIMPLE_RUBRIC]: 'Simple Rubric',
|
|
41
|
+
[RUBRIC_TYPES.RUBRICLESS]: 'Rubricless',
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export class Main extends React.Component {
|
|
45
|
+
static propTypes = {
|
|
46
|
+
canUpdateModel: PropTypes.bool,
|
|
47
|
+
configuration: PropTypes.object,
|
|
48
|
+
model: PropTypes.object,
|
|
49
|
+
onModelChanged: PropTypes.func,
|
|
50
|
+
onConfigurationChanged: PropTypes.func,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
onModelChanged: any = (model) => {
|
|
54
|
+
const { onModelChanged } = this.props;
|
|
55
|
+
|
|
56
|
+
return onModelChanged(model);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
onChangeRubricType: any = (e) => {
|
|
60
|
+
const { model } = this.props;
|
|
61
|
+
|
|
62
|
+
const rubricType = e.target.value;
|
|
63
|
+
this.onModelChanged({ ...model, rubricType });
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
render() {
|
|
67
|
+
const { model, configuration, canUpdateModel } = this.props;
|
|
68
|
+
|
|
69
|
+
const { extraCSSRules, rubrics = {} } = model || {};
|
|
70
|
+
let { rubricType } = model;
|
|
71
|
+
const {
|
|
72
|
+
contentDimensions = {},
|
|
73
|
+
rubricOptions = [],
|
|
74
|
+
multiTraitRubric,
|
|
75
|
+
simpleRubric,
|
|
76
|
+
rubricless,
|
|
77
|
+
width,
|
|
78
|
+
} = configuration;
|
|
79
|
+
let rubricTag = '';
|
|
80
|
+
|
|
81
|
+
if (!rubricType) {
|
|
82
|
+
rubricType = RUBRIC_TYPES.SIMPLE_RUBRIC;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const isRubricTypeAvailable = rubricOptions.indexOf(rubricType) > -1;
|
|
86
|
+
|
|
87
|
+
if (canUpdateModel) {
|
|
88
|
+
switch (rubricType) {
|
|
89
|
+
case RUBRIC_TYPES.SIMPLE_RUBRIC:
|
|
90
|
+
default:
|
|
91
|
+
rubricTag = (
|
|
92
|
+
<rubric-configure
|
|
93
|
+
id="simpleRubric"
|
|
94
|
+
key="simple-rubric"
|
|
95
|
+
ref={(ref) => {
|
|
96
|
+
if (ref) {
|
|
97
|
+
this.simpleRubric = ref;
|
|
98
|
+
this.simpleRubric.model = { ...rubrics.simpleRubric, errors: model.errors || {} };
|
|
99
|
+
this.simpleRubric.configuration = { ...simpleRubric, width };
|
|
100
|
+
}
|
|
101
|
+
}}
|
|
102
|
+
/>
|
|
103
|
+
);
|
|
104
|
+
break;
|
|
105
|
+
|
|
106
|
+
case RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
|
|
107
|
+
rubricTag = (
|
|
108
|
+
<multi-trait-rubric-configure
|
|
109
|
+
id="multiTraitRubric"
|
|
110
|
+
key="multi-trait-rubric"
|
|
111
|
+
ref={(ref) => {
|
|
112
|
+
if (ref) {
|
|
113
|
+
this.multiTraitRubric = ref;
|
|
114
|
+
|
|
115
|
+
this.multiTraitRubric.model = { ...rubrics.multiTraitRubric, errors: model.errors || {} };
|
|
116
|
+
this.multiTraitRubric.configuration = { ...multiTraitRubric, width: width || multiTraitRubric.width };
|
|
117
|
+
}
|
|
118
|
+
}}
|
|
119
|
+
/>
|
|
120
|
+
);
|
|
121
|
+
break;
|
|
122
|
+
|
|
123
|
+
case RUBRIC_TYPES.RUBRICLESS:
|
|
124
|
+
rubricTag = (
|
|
125
|
+
<rubric-configure
|
|
126
|
+
id="rubricless"
|
|
127
|
+
key="rubricless"
|
|
128
|
+
ref={(ref) => {
|
|
129
|
+
if (ref) {
|
|
130
|
+
this.rubricless = ref;
|
|
131
|
+
|
|
132
|
+
this.rubricless.model = rubrics.rubricless;
|
|
133
|
+
this.rubricless.configuration = { ...rubricless, width };
|
|
134
|
+
}
|
|
135
|
+
}}
|
|
136
|
+
/>
|
|
137
|
+
);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<layout.ConfigLayout
|
|
144
|
+
extraCSSRules={extraCSSRules}
|
|
145
|
+
dimensions={contentDimensions}
|
|
146
|
+
hideSettings={true}
|
|
147
|
+
settings={null}
|
|
148
|
+
>
|
|
149
|
+
<RadioGroup
|
|
150
|
+
aria-label="rubric-type"
|
|
151
|
+
name="rubricType"
|
|
152
|
+
value={model.rubricType}
|
|
153
|
+
onChange={this.onChangeRubricType}
|
|
154
|
+
>
|
|
155
|
+
{rubricOptions.length > 1 &&
|
|
156
|
+
rubricOptions.map((availableRubric, i) => (
|
|
157
|
+
<StyledFormControlLabel
|
|
158
|
+
key={i}
|
|
159
|
+
value={availableRubric}
|
|
160
|
+
control={<StyledRadio checked={rubricType === availableRubric} />}
|
|
161
|
+
label={rubricLabels[availableRubric]}
|
|
162
|
+
/>
|
|
163
|
+
))}
|
|
164
|
+
</RadioGroup>
|
|
165
|
+
|
|
166
|
+
{isRubricTypeAvailable && rubricTag}
|
|
167
|
+
</layout.ConfigLayout>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export default Main;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/complex-rubric/controller/src/defaults.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// todo the import from pie-lib/rubric WILL break pslb
|
|
12
|
+
// so don't use it unless you also test "yarn build"
|
|
13
|
+
const RUBRIC_TYPES = {
|
|
14
|
+
SIMPLE_RUBRIC: 'simpleRubric',
|
|
15
|
+
MULTI_TRAIT_RUBRIC: 'multiTraitRubric',
|
|
16
|
+
'rubricless': 'rubricless',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const multiTraitDefaultModel = {
|
|
20
|
+
description: false,
|
|
21
|
+
excludeZero: false,
|
|
22
|
+
halfScoring: false,
|
|
23
|
+
pointLabels: true,
|
|
24
|
+
scales: [],
|
|
25
|
+
standards: false,
|
|
26
|
+
visibleToStudent: true,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const rubricDefaultModel = {
|
|
30
|
+
points: ['', '', '', ''],
|
|
31
|
+
sampleAnswers: [null, null, null, null],
|
|
32
|
+
maxPoints: 3,
|
|
33
|
+
excludeZero: false,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const rubriclessDefaultModel = {
|
|
37
|
+
maxPoints: 100,
|
|
38
|
+
excludeZero: false,
|
|
39
|
+
rubriclessInstructionEnabled: true,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
rubricType: 'simpleRubric',
|
|
44
|
+
rubrics: {
|
|
45
|
+
[RUBRIC_TYPES.SIMPLE_RUBRIC]: rubricDefaultModel,
|
|
46
|
+
[RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: multiTraitDefaultModel,
|
|
47
|
+
[RUBRIC_TYPES.RUBRICLESS]: rubriclessDefaultModel,
|
|
48
|
+
},
|
|
49
|
+
};
|