@pie-element/complex-rubric 0.0.2-next.4424

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.
Files changed (121) hide show
  1. package/LICENSE.md +5 -0
  2. package/README.md +3 -0
  3. package/configure/lib/defaults.js +99 -0
  4. package/configure/lib/defaults.js.map +1 -0
  5. package/configure/lib/index.js +232 -0
  6. package/configure/lib/index.js.map +1 -0
  7. package/configure/lib/main.js +165 -0
  8. package/configure/lib/main.js.map +1 -0
  9. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
  10. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +376 -0
  11. package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +5 -0
  12. package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +55 -0
  13. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +1 -0
  14. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +344 -0
  15. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +455 -0
  16. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +1 -0
  17. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +82 -0
  18. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +1 -0
  19. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +112 -0
  20. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +1 -0
  21. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +438 -0
  22. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +1 -0
  23. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +324 -0
  24. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +1 -0
  25. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +490 -0
  26. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +1 -0
  27. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +334 -0
  28. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +1 -0
  29. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +254 -0
  30. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +1 -0
  31. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +29 -0
  32. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +1 -0
  33. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +22 -0
  34. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +1 -0
  35. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +66 -0
  36. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +9 -0
  37. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +1 -0
  38. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +122 -0
  39. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +1 -0
  40. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +15 -0
  41. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +226 -0
  42. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +169 -0
  43. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +8 -0
  44. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +108 -0
  45. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +1 -0
  46. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +6 -0
  47. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +282 -0
  48. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +189 -0
  49. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +85 -0
  50. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +1 -0
  51. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +99 -0
  52. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +1 -0
  53. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +209 -0
  54. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +1 -0
  55. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +103 -0
  56. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +1 -0
  57. package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +24 -0
  58. package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
  59. package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +731 -0
  60. package/configure/node_modules/@pie-element/rubric/LICENSE.md +5 -0
  61. package/configure/node_modules/@pie-element/rubric/README.md +3 -0
  62. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +197 -0
  63. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +615 -0
  64. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +93 -0
  65. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +1 -0
  66. package/configure/node_modules/@pie-element/rubric/configure/package.json +16 -0
  67. package/configure/node_modules/@pie-element/rubric/configure/src/index.js +38 -0
  68. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +17 -0
  69. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +105 -0
  70. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +14 -0
  71. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +1 -0
  72. package/configure/node_modules/@pie-element/rubric/controller/package.json +9 -0
  73. package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +35 -0
  74. package/configure/node_modules/@pie-element/rubric/controller/src/index.js +6 -0
  75. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +24 -0
  76. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +19 -0
  77. package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +8 -0
  78. package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +8 -0
  79. package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +3 -0
  80. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +62 -0
  81. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +35 -0
  82. package/configure/node_modules/@pie-element/rubric/lib/index.js +88 -0
  83. package/configure/node_modules/@pie-element/rubric/lib/index.js.map +1 -0
  84. package/configure/node_modules/@pie-element/rubric/lib/main.js +171 -0
  85. package/configure/node_modules/@pie-element/rubric/lib/main.js.map +1 -0
  86. package/configure/node_modules/@pie-element/rubric/lib/print.js +114 -0
  87. package/configure/node_modules/@pie-element/rubric/lib/print.js.map +1 -0
  88. package/configure/node_modules/@pie-element/rubric/package.json +25 -0
  89. package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +22767 -0
  90. package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +48 -0
  91. package/configure/node_modules/@pie-element/rubric/src/index.js +38 -0
  92. package/configure/node_modules/@pie-element/rubric/src/main.jsx +117 -0
  93. package/configure/node_modules/@pie-element/rubric/src/print.js +63 -0
  94. package/configure/package.json +22 -0
  95. package/configure/src/__tests__/__snapshots__/main.test.jsx.snap +106 -0
  96. package/configure/src/__tests__/index.test.js +41 -0
  97. package/configure/src/__tests__/main.test.jsx +104 -0
  98. package/configure/src/defaults.js +122 -0
  99. package/configure/src/index.js +138 -0
  100. package/configure/src/main.jsx +117 -0
  101. package/controller/lib/defaults.js +99 -0
  102. package/controller/lib/defaults.js.map +1 -0
  103. package/controller/lib/index.js +147 -0
  104. package/controller/lib/index.js.map +1 -0
  105. package/controller/package.json +12 -0
  106. package/controller/src/__tests__/index.test.js +58 -0
  107. package/controller/src/defaults.js +121 -0
  108. package/controller/src/index.js +81 -0
  109. package/docs/config-schema.json +427 -0
  110. package/docs/config-schema.json.md +315 -0
  111. package/docs/demo/config.js +8 -0
  112. package/docs/demo/generate.js +119 -0
  113. package/docs/demo/index.html +1 -0
  114. package/docs/demo/session.js +6 -0
  115. package/docs/pie-schema.json +994 -0
  116. package/docs/pie-schema.json.md +660 -0
  117. package/lib/index.js +176 -0
  118. package/lib/index.js.map +1 -0
  119. package/package.json +25 -0
  120. package/src/__tests__/index.test.js +166 -0
  121. package/src/index.js +106 -0
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.labelPlugins = exports.filteredDefaultPlugins = void 0;
7
+
8
+ var _editableHtml = require("@pie-lib/editable-html");
9
+
10
+ var filteredDefaultPlugins = (_editableHtml.DEFAULT_PLUGINS || []).filter(function (p) {
11
+ return p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list';
12
+ });
13
+ exports.filteredDefaultPlugins = filteredDefaultPlugins;
14
+ var labelPlugins = {
15
+ image: {
16
+ disabled: true
17
+ },
18
+ math: {
19
+ disabled: true
20
+ },
21
+ audio: {
22
+ disabled: true
23
+ },
24
+ video: {
25
+ disabled: true
26
+ }
27
+ };
28
+ exports.labelPlugins = labelPlugins;
29
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils.js"],"names":["filteredDefaultPlugins","DEFAULT_PLUGINS","filter","p","labelPlugins","image","disabled","math","audio","video"],"mappings":";;;;;;;AAAA;;AAEO,IAAMA,sBAAsB,GAAG,CAACC,iCAAmB,EAApB,EAAwBC,MAAxB,CAA+B,UAAAC,CAAC;AAAA,SAAIA,CAAC,KAAK,OAAN,IAAiBA,CAAC,KAAK,eAAvB,IAA0CA,CAAC,KAAK,eAApD;AAAA,CAAhC,CAA/B;;AAEA,IAAMC,YAAY,GAAG;AAC1BC,EAAAA,KAAK,EAAE;AAAEC,IAAAA,QAAQ,EAAE;AAAZ,GADmB;AAE1BC,EAAAA,IAAI,EAAE;AAAED,IAAAA,QAAQ,EAAE;AAAZ,GAFoB;AAG1BE,EAAAA,KAAK,EAAE;AAAEF,IAAAA,QAAQ,EAAE;AAAZ,GAHmB;AAI1BG,EAAAA,KAAK,EAAE;AAAEH,IAAAA,QAAQ,EAAE;AAAZ;AAJmB,CAArB","sourcesContent":["import {DEFAULT_PLUGINS} from '@pie-lib/editable-html';\n\nexport const filteredDefaultPlugins = (DEFAULT_PLUGINS || []).filter(p => p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list');\n\nexport const labelPlugins = {\n image: { disabled: true },\n math: { disabled: true },\n audio: { disabled: true },\n video: { disabled: true }\n};\n"],"file":"utils.js"}
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@pie-element/multi-trait-rubric-configure",
3
+ "version": "2.0.10",
4
+ "private": true,
5
+ "main": "lib/index.js",
6
+ "module": "src/index.js",
7
+ "dependencies": {
8
+ "@material-ui/core": "^3.9.2",
9
+ "@material-ui/icons": "^3.0.1",
10
+ "@pie-framework/pie-configure-events": "^1.2.0",
11
+ "@pie-lib/config-ui": "^11.0.16",
12
+ "@pie-lib/editable-html": "^9.1.6",
13
+ "@pie-lib/render-ui": "^4.13.5",
14
+ "@pie-lib/rubric": "^0.5.1",
15
+ "@pie-lib/scoring-config": "^3.5.180",
16
+ "debug": "^3.1.0",
17
+ "lodash": "^4.17.15",
18
+ "prop-types": "^15.6.2",
19
+ "react": "^16.8.1",
20
+ "react-dom": "^16.8.1"
21
+ }
22
+ }
@@ -0,0 +1,66 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [1.2.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.6...@pie-element/multi-trait-rubric-controller@1.2.8) (2021-11-11)
7
+
8
+ **Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.2.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.6...@pie-element/multi-trait-rubric-controller@1.2.7) (2021-11-11)
15
+
16
+ **Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
17
+
18
+
19
+
20
+
21
+
22
+ ## [1.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.4...@pie-element/multi-trait-rubric-controller@1.2.6) (2021-08-05)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
28
+
29
+
30
+
31
+
32
+
33
+ ## [1.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.3...@pie-element/multi-trait-rubric-controller@1.2.4) (2021-06-29)
34
+
35
+ **Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
36
+
37
+
38
+
39
+
40
+
41
+ ## [1.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.2.0...@pie-element/multi-trait-rubric-controller@1.2.3) (2021-03-03)
42
+
43
+ **Note:** Version bump only for package @pie-element/multi-trait-rubric-controller
44
+
45
+
46
+
47
+
48
+
49
+ # [1.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-controller@1.1.0...@pie-element/multi-trait-rubric-controller@1.2.0) (2021-03-03)
50
+
51
+
52
+ ### Features
53
+
54
+ * Updated design. Moved exclude zero at item level. Added ability to toggle from Settings Panel: level tag input, description, standards, visibility to student, half scoring, score labels, drag and drop. Added Actionable List. BREAKING CHANGE: moved exclude zero at item level (from scale level) ([c8bb906](https://github.com/pie-framework/pie-elements/commit/c8bb9064712aae057b74dceba5928a19054b27eb))
55
+
56
+
57
+
58
+
59
+
60
+ # 1.1.0 (2021-02-02)
61
+
62
+
63
+ ### Features
64
+
65
+ * Added showStandards configuration setting. Added halfScoring and visibleToStudent. ([db993ca](https://github.com/pie-framework/pie-elements/commit/db993ca))
66
+ * multi-trait-rubric (No authoring yet) ([dc01b01](https://github.com/pie-framework/pie-elements/commit/dc01b01))
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = {};
8
+ exports["default"] = _default;
9
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/defaults.js"],"names":[],"mappings":";;;;;;eAAe,E","sourcesContent":["export default {};\n"],"file":"defaults.js"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createCorrectResponseSession = void 0;
9
+ exports.createDefaultModel = createDefaultModel;
10
+ exports.getScore = void 0;
11
+ exports.model = model;
12
+ exports.normalize = void 0;
13
+ exports.outcome = outcome;
14
+
15
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
16
+
17
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
18
+
19
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
20
+
21
+ var _defaults = _interopRequireDefault(require("./defaults"));
22
+
23
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
+
25
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
26
+
27
+ function createDefaultModel() {
28
+ var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
29
+ return new Promise(function (resolve) {
30
+ return resolve(_objectSpread(_objectSpread({}, _defaults["default"]), model));
31
+ });
32
+ }
33
+
34
+ var normalize = function normalize(question) {
35
+ return _objectSpread(_objectSpread({}, _defaults["default"]), question);
36
+ };
37
+ /**
38
+ *
39
+ * @param {*} question
40
+ * @param {*} session
41
+ * @param {*} env
42
+ */
43
+
44
+
45
+ exports.normalize = normalize;
46
+
47
+ function model(_x, _x2, _x3) {
48
+ return _model.apply(this, arguments);
49
+ }
50
+
51
+ function _model() {
52
+ _model = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(question, session, env) {
53
+ var normalizedQuestion, _ref, scales, excludeZero, parsedScales;
54
+
55
+ return _regenerator["default"].wrap(function _callee$(_context) {
56
+ while (1) {
57
+ switch (_context.prev = _context.next) {
58
+ case 0:
59
+ normalizedQuestion = normalize(question);
60
+
61
+ if (!env.role || env.role === 'student') {
62
+ normalizedQuestion.visible = normalizedQuestion.visibleToStudent;
63
+ } else {
64
+ normalizedQuestion.visible = true;
65
+ } // todo update pie-ui instead of parsing this here:
66
+
67
+
68
+ _ref = normalizedQuestion || {}, scales = _ref.scales, excludeZero = _ref.excludeZero;
69
+ parsedScales = (scales || []).map(function (scale) {
70
+ return _objectSpread(_objectSpread({}, scale), {}, {
71
+ excludeZero: excludeZero
72
+ });
73
+ });
74
+ return _context.abrupt("return", _objectSpread(_objectSpread({}, normalizedQuestion), {}, {
75
+ scales: parsedScales
76
+ }));
77
+
78
+ case 5:
79
+ case "end":
80
+ return _context.stop();
81
+ }
82
+ }
83
+ }, _callee);
84
+ }));
85
+ return _model.apply(this, arguments);
86
+ }
87
+
88
+ var getScore = function getScore() {
89
+ return 0;
90
+ };
91
+ /**
92
+ * @param {Object} model - the main model
93
+ * @param {*} session
94
+ * @param {Object} env
95
+ */
96
+
97
+
98
+ exports.getScore = getScore;
99
+
100
+ function outcome(model, session, env) {
101
+ return new Promise(function (resolve) {
102
+ return resolve({
103
+ score: 0,
104
+ empty: true
105
+ });
106
+ });
107
+ }
108
+
109
+ var createCorrectResponseSession = function createCorrectResponseSession(question, env) {
110
+ return new Promise(function (resolve) {
111
+ if (env.mode !== 'evaluate' && env.role === 'instructor') {
112
+ resolve({
113
+ id: '1'
114
+ });
115
+ } else {
116
+ resolve(null);
117
+ }
118
+ });
119
+ };
120
+
121
+ exports.createCorrectResponseSession = createCorrectResponseSession;
122
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.js"],"names":["createDefaultModel","model","Promise","resolve","defaults","normalize","question","session","env","normalizedQuestion","role","visible","visibleToStudent","scales","excludeZero","parsedScales","map","scale","getScore","outcome","score","empty","createCorrectResponseSession","mode","id"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAEO,SAASA,kBAAT,GAAwC;AAAA,MAAZC,KAAY,uEAAJ,EAAI;AAC7C,SAAO,IAAIC,OAAJ,CAAY,UAAAC,OAAO;AAAA,WAAIA,OAAO,iCAAMC,oBAAN,GAAmBH,KAAnB,EAAX;AAAA,GAAnB,CAAP;AACD;;AAEM,IAAMI,SAAS,GAAG,SAAZA,SAAY,CAAAC,QAAQ;AAAA,yCAAUF,oBAAV,GAAuBE,QAAvB;AAAA,CAA1B;AAEP;AACA;AACA;AACA;AACA;AACA;;;;;SACsBL,K;;;;;yFAAf,iBAAqBK,QAArB,EAA+BC,OAA/B,EAAwCC,GAAxC;AAAA;;AAAA;AAAA;AAAA;AAAA;AACCC,YAAAA,kBADD,GACsBJ,SAAS,CAACC,QAAD,CAD/B;;AAGL,gBAAI,CAACE,GAAG,CAACE,IAAL,IAAaF,GAAG,CAACE,IAAJ,KAAa,SAA9B,EAAyC;AACvCD,cAAAA,kBAAkB,CAACE,OAAnB,GAA6BF,kBAAkB,CAACG,gBAAhD;AACD,aAFD,MAEO;AACLH,cAAAA,kBAAkB,CAACE,OAAnB,GAA6B,IAA7B;AACD,aAPI,CASL;;;AATK,mBAU2BF,kBAAkB,IAAI,EAVjD,EAUGI,MAVH,QAUGA,MAVH,EAUWC,WAVX,QAUWA,WAVX;AAWCC,YAAAA,YAXD,GAWgB,CAACF,MAAM,IAAI,EAAX,EAAeG,GAAf,CAAmB,UAAAC,KAAK;AAAA,qDAAUA,KAAV;AAAiBH,gBAAAA,WAAW,EAAXA;AAAjB;AAAA,aAAxB,CAXhB;AAAA,6EAcAL,kBAdA;AAeHI,cAAAA,MAAM,EAAEE;AAfL;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAoBA,IAAMG,QAAQ,GAAG,SAAXA,QAAW;AAAA,SAAM,CAAN;AAAA,CAAjB;AAEP;AACA;AACA;AACA;AACA;;;;;AACO,SAASC,OAAT,CAAiBlB,KAAjB,EAAwBM,OAAxB,EAAiCC,GAAjC,EAAsC;AAC3C,SAAO,IAAIN,OAAJ,CAAY,UAAAC,OAAO;AAAA,WAAIA,OAAO,CAAC;AAAEiB,MAAAA,KAAK,EAAE,CAAT;AAAYC,MAAAA,KAAK,EAAE;AAAnB,KAAD,CAAX;AAAA,GAAnB,CAAP;AACD;;AAEM,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CAAChB,QAAD,EAAWE,GAAX,EAAmB;AAC7D,SAAO,IAAIN,OAAJ,CAAY,UAAAC,OAAO,EAAI;AAC5B,QAAIK,GAAG,CAACe,IAAJ,KAAa,UAAb,IAA2Bf,GAAG,CAACE,IAAJ,KAAa,YAA5C,EAA0D;AACxDP,MAAAA,OAAO,CAAC;AAAEqB,QAAAA,EAAE,EAAE;AAAN,OAAD,CAAP;AACD,KAFD,MAEO;AACLrB,MAAAA,OAAO,CAAC,IAAD,CAAP;AACD;AACF,GANM,CAAP;AAOD,CARM","sourcesContent":["import defaults from './defaults';\n\nexport function createDefaultModel(model = {}) {\n return new Promise(resolve => resolve({ ...defaults, ...model }));\n}\n\nexport const normalize = question => ({ ...defaults, ...question });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n */\nexport async function model(question, session, env) {\n const normalizedQuestion = normalize(question);\n\n if (!env.role || env.role === 'student') {\n normalizedQuestion.visible = normalizedQuestion.visibleToStudent;\n } else {\n normalizedQuestion.visible = true;\n }\n\n // todo update pie-ui instead of parsing this here:\n const { scales, excludeZero } = normalizedQuestion || {};\n const parsedScales = (scales || []).map(scale => ({ ...scale, excludeZero }));\n\n return {\n ...normalizedQuestion,\n scales: parsedScales\n };\n}\n\n\nexport const getScore = () => 0;\n\n/**\n * @param {Object} model - the main model\n * @param {*} session\n * @param {Object} env\n */\nexport function outcome(model, session, env) {\n return new Promise(resolve => resolve({ score: 0, empty: true }));\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise(resolve => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n resolve({ id: '1' });\n } else {\n resolve(null);\n }\n });\n};\n"],"file":"index.js"}
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@pie-element/multi-trait-rubric-controller",
3
+ "private": true,
4
+ "version": "1.2.11",
5
+ "description": "",
6
+ "main": "lib/index.js",
7
+ "module": "src/index.js",
8
+ "author": "",
9
+ "license": "ISC",
10
+ "dependencies": {
11
+ "@pie-lib/controller-utils": "^0.2.26",
12
+ "debug": "^3.1.0",
13
+ "lodash": "^4.17.15"
14
+ }
15
+ }
@@ -0,0 +1,226 @@
1
+ {
2
+ "description": "Config Object for @pie-elements/multi-trait-rubric",
3
+ "additionalProperties": false,
4
+ "type": "object",
5
+ "properties": {
6
+ "excludeZeroDialogBoxContent": {
7
+ "title": "DialogContent",
8
+ "type": "object",
9
+ "properties": {
10
+ "title": {
11
+ "description": "Dialog box title",
12
+ "type": "string",
13
+ "title": "title"
14
+ },
15
+ "text": {
16
+ "description": "Dialog box text",
17
+ "type": "string",
18
+ "title": "text"
19
+ }
20
+ }
21
+ },
22
+ "includeZeroDialogBoxContent": {
23
+ "title": "DialogContent",
24
+ "type": "object",
25
+ "properties": {
26
+ "title": {
27
+ "description": "Dialog box title",
28
+ "type": "string",
29
+ "title": "title"
30
+ },
31
+ "text": {
32
+ "description": "Dialog box text",
33
+ "type": "string",
34
+ "title": "text"
35
+ }
36
+ }
37
+ },
38
+ "deleteTraitDialogBoxContent": {
39
+ "title": "DialogContent",
40
+ "type": "object",
41
+ "properties": {
42
+ "title": {
43
+ "description": "Dialog box title",
44
+ "type": "string",
45
+ "title": "title"
46
+ },
47
+ "text": {
48
+ "description": "Dialog box text",
49
+ "type": "string",
50
+ "title": "text"
51
+ }
52
+ }
53
+ },
54
+ "deleteScaleDialogBoxContent": {
55
+ "title": "DialogContent",
56
+ "type": "object",
57
+ "properties": {
58
+ "title": {
59
+ "description": "Dialog box title",
60
+ "type": "string",
61
+ "title": "title"
62
+ },
63
+ "text": {
64
+ "description": "Dialog box text",
65
+ "type": "string",
66
+ "title": "text"
67
+ }
68
+ }
69
+ },
70
+ "maxPointsDialogBoxContent": {
71
+ "title": "DialogContent",
72
+ "type": "object",
73
+ "properties": {
74
+ "title": {
75
+ "description": "Dialog box title",
76
+ "type": "string",
77
+ "title": "title"
78
+ },
79
+ "text": {
80
+ "description": "Dialog box text",
81
+ "type": "string",
82
+ "title": "text"
83
+ }
84
+ }
85
+ },
86
+ "showExcludeZero": {
87
+ "title": "ConfigureProp",
88
+ "type": "object",
89
+ "properties": {
90
+ "settings": {
91
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
92
+ "type": "boolean",
93
+ "title": "settings"
94
+ },
95
+ "label": {
96
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
97
+ "type": "string",
98
+ "title": "label"
99
+ }
100
+ }
101
+ },
102
+ "showScorePointLabels": {
103
+ "title": "ConfigureProp",
104
+ "type": "object",
105
+ "properties": {
106
+ "settings": {
107
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
108
+ "type": "boolean",
109
+ "title": "settings"
110
+ },
111
+ "label": {
112
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
113
+ "type": "string",
114
+ "title": "label"
115
+ }
116
+ }
117
+ },
118
+ "showDescription": {
119
+ "title": "ConfigureProp",
120
+ "type": "object",
121
+ "properties": {
122
+ "settings": {
123
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
124
+ "type": "boolean",
125
+ "title": "settings"
126
+ },
127
+ "label": {
128
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
129
+ "type": "string",
130
+ "title": "label"
131
+ }
132
+ }
133
+ },
134
+ "showVisibleToStudent": {
135
+ "title": "ConfigureProp",
136
+ "type": "object",
137
+ "properties": {
138
+ "settings": {
139
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
140
+ "type": "boolean",
141
+ "title": "settings"
142
+ },
143
+ "label": {
144
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
145
+ "type": "string",
146
+ "title": "label"
147
+ }
148
+ }
149
+ },
150
+ "showHalfScoring": {
151
+ "title": "ConfigureProp",
152
+ "type": "object",
153
+ "properties": {
154
+ "settings": {
155
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
156
+ "type": "boolean",
157
+ "title": "settings"
158
+ },
159
+ "label": {
160
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
161
+ "type": "string",
162
+ "title": "label"
163
+ }
164
+ }
165
+ },
166
+ "spellCheck": {
167
+ "title": "ConfigureProp",
168
+ "type": "object",
169
+ "properties": {
170
+ "settings": {
171
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
172
+ "type": "boolean",
173
+ "title": "settings"
174
+ },
175
+ "label": {
176
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
177
+ "type": "string",
178
+ "title": "label"
179
+ }
180
+ }
181
+ },
182
+ "width": {
183
+ "description": "How large (in px) should multi-trait-rubric be",
184
+ "type": "string",
185
+ "title": "width"
186
+ }
187
+ },
188
+ "required": [
189
+ "width"
190
+ ],
191
+ "definitions": {
192
+ "DialogContent": {
193
+ "title": "DialogContent",
194
+ "type": "object",
195
+ "properties": {
196
+ "title": {
197
+ "description": "Dialog box title",
198
+ "type": "string",
199
+ "title": "title"
200
+ },
201
+ "text": {
202
+ "description": "Dialog box text",
203
+ "type": "string",
204
+ "title": "text"
205
+ }
206
+ }
207
+ },
208
+ "ConfigureProp": {
209
+ "title": "ConfigureProp",
210
+ "type": "object",
211
+ "properties": {
212
+ "settings": {
213
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
214
+ "type": "boolean",
215
+ "title": "settings"
216
+ },
217
+ "label": {
218
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
219
+ "type": "string",
220
+ "title": "label"
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "$schema": "http://json-schema.org/draft-07/schema#"
226
+ }
@@ -0,0 +1,169 @@
1
+ Config Object for @pie-elements/multi-trait-rubric
2
+
3
+ The schema defines the following properties:
4
+
5
+ # `excludeZeroDialogBoxContent` (object)
6
+
7
+ Properties of the `excludeZeroDialogBoxContent` object:
8
+
9
+ ## `title` (string)
10
+
11
+ Dialog box title
12
+
13
+ ## `text` (string)
14
+
15
+ Dialog box text
16
+
17
+ # `includeZeroDialogBoxContent` (object)
18
+
19
+ Properties of the `includeZeroDialogBoxContent` object:
20
+
21
+ ## `title` (string)
22
+
23
+ Dialog box title
24
+
25
+ ## `text` (string)
26
+
27
+ Dialog box text
28
+
29
+ # `deleteTraitDialogBoxContent` (object)
30
+
31
+ Properties of the `deleteTraitDialogBoxContent` object:
32
+
33
+ ## `title` (string)
34
+
35
+ Dialog box title
36
+
37
+ ## `text` (string)
38
+
39
+ Dialog box text
40
+
41
+ # `deleteScaleDialogBoxContent` (object)
42
+
43
+ Properties of the `deleteScaleDialogBoxContent` object:
44
+
45
+ ## `title` (string)
46
+
47
+ Dialog box title
48
+
49
+ ## `text` (string)
50
+
51
+ Dialog box text
52
+
53
+ # `maxPointsDialogBoxContent` (object)
54
+
55
+ Properties of the `maxPointsDialogBoxContent` object:
56
+
57
+ ## `title` (string)
58
+
59
+ Dialog box title
60
+
61
+ ## `text` (string)
62
+
63
+ Dialog box text
64
+
65
+ # `showExcludeZero` (object)
66
+
67
+ Properties of the `showExcludeZero` object:
68
+
69
+ ## `settings` (boolean)
70
+
71
+ Indicates if the item has to be displayed in the Settings Panel
72
+
73
+ ## `label` (string)
74
+
75
+ Indicates the label for the item that has to be displayed in the Settings Panel
76
+
77
+ # `showScorePointLabels` (object)
78
+
79
+ Properties of the `showScorePointLabels` object:
80
+
81
+ ## `settings` (boolean)
82
+
83
+ Indicates if the item has to be displayed in the Settings Panel
84
+
85
+ ## `label` (string)
86
+
87
+ Indicates the label for the item that has to be displayed in the Settings Panel
88
+
89
+ # `showDescription` (object)
90
+
91
+ Properties of the `showDescription` object:
92
+
93
+ ## `settings` (boolean)
94
+
95
+ Indicates if the item has to be displayed in the Settings Panel
96
+
97
+ ## `label` (string)
98
+
99
+ Indicates the label for the item that has to be displayed in the Settings Panel
100
+
101
+ # `showVisibleToStudent` (object)
102
+
103
+ Properties of the `showVisibleToStudent` object:
104
+
105
+ ## `settings` (boolean)
106
+
107
+ Indicates if the item has to be displayed in the Settings Panel
108
+
109
+ ## `label` (string)
110
+
111
+ Indicates the label for the item that has to be displayed in the Settings Panel
112
+
113
+ # `showHalfScoring` (object)
114
+
115
+ Properties of the `showHalfScoring` object:
116
+
117
+ ## `settings` (boolean)
118
+
119
+ Indicates if the item has to be displayed in the Settings Panel
120
+
121
+ ## `label` (string)
122
+
123
+ Indicates the label for the item that has to be displayed in the Settings Panel
124
+
125
+ # `spellCheck` (object)
126
+
127
+ Properties of the `spellCheck` object:
128
+
129
+ ## `settings` (boolean)
130
+
131
+ Indicates if the item has to be displayed in the Settings Panel
132
+
133
+ ## `label` (string)
134
+
135
+ Indicates the label for the item that has to be displayed in the Settings Panel
136
+
137
+ # `width` (string, required)
138
+
139
+ How large (in px) should multi-trait-rubric be
140
+
141
+ ---
142
+
143
+ # Sub Schemas
144
+
145
+ The schema defines the following additional types:
146
+
147
+ ## `DialogContent` (object)
148
+
149
+ Properties of the `DialogContent` object:
150
+
151
+ ### `title` (string)
152
+
153
+ Dialog box title
154
+
155
+ ### `text` (string)
156
+
157
+ Dialog box text
158
+
159
+ ## `ConfigureProp` (object)
160
+
161
+ Properties of the `ConfigureProp` object:
162
+
163
+ ### `settings` (boolean)
164
+
165
+ Indicates if the item has to be displayed in the Settings Panel
166
+
167
+ ### `label` (string)
168
+
169
+ Indicates the label for the item that has to be displayed in the Settings Panel