@pie-element/multi-trait-rubric 1.3.0 → 1.3.1-beta.587

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 (42) hide show
  1. package/CHANGELOG.md +466 -0
  2. package/configure/CHANGELOG.md +415 -0
  3. package/configure/lib/common.js +81 -16
  4. package/configure/lib/common.js.map +1 -1
  5. package/configure/lib/defaults.js +40 -4
  6. package/configure/lib/defaults.js.map +1 -1
  7. package/configure/lib/index.js +18 -4
  8. package/configure/lib/index.js.map +1 -1
  9. package/configure/lib/main.js +166 -97
  10. package/configure/lib/main.js.map +1 -1
  11. package/configure/lib/modals.js +71 -12
  12. package/configure/lib/modals.js.map +1 -1
  13. package/configure/lib/scale.js +69 -15
  14. package/configure/lib/scale.js.map +1 -1
  15. package/configure/lib/trait.js +50 -21
  16. package/configure/lib/trait.js.map +1 -1
  17. package/configure/lib/traitsHeader.js +28 -17
  18. package/configure/lib/traitsHeader.js.map +1 -1
  19. package/configure/lib/utils.js +29 -0
  20. package/configure/lib/utils.js.map +1 -0
  21. package/configure/package.json +7 -7
  22. package/controller/CHANGELOG.md +57 -0
  23. package/controller/lib/defaults.js +85 -1
  24. package/controller/lib/defaults.js.map +1 -1
  25. package/controller/lib/index.js +5 -3
  26. package/controller/lib/index.js.map +1 -1
  27. package/controller/package.json +2 -2
  28. package/docs/config-schema.json +129 -0
  29. package/docs/config-schema.json.md +96 -0
  30. package/docs/demo/config.js +2 -2
  31. package/docs/demo/generate.js +92 -20
  32. package/docs/demo/session.js +1 -1
  33. package/docs/pie-schema.json +23 -1
  34. package/docs/pie-schema.json.md +16 -0
  35. package/lib/index.js +4 -1
  36. package/lib/index.js.map +1 -1
  37. package/lib/main.js +42 -7
  38. package/lib/main.js.map +1 -1
  39. package/lib/scale.js +5 -1
  40. package/lib/scale.js.map +1 -1
  41. package/lib/trait.js.map +1 -1
  42. package/package.json +4 -3
@@ -4,6 +4,90 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _default = {};
7
+ var _default = {
8
+ model: {
9
+ visibleToStudent: true,
10
+ halfScoring: false,
11
+ pointLabels: true,
12
+ description: false,
13
+ standards: false,
14
+ scales: [],
15
+ excludeZero: false,
16
+ maxPointsEnabled: true,
17
+ addScaleEnabled: true
18
+ },
19
+ configuration: {
20
+ excludeZeroDialogBoxContent: {
21
+ title: 'Exclude 0 (Zero) from Score Point Values.',
22
+ text: "<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>"
23
+ },
24
+ includeZeroDialogBoxContent: {
25
+ title: 'Include 0 (Zero) in Score Point Values.',
26
+ text: "<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>"
27
+ },
28
+ deleteScaleDialogBoxContent: {
29
+ title: 'Delete Scale',
30
+ text: 'Are you sure you want to delete this scale?'
31
+ },
32
+ maxPointsDialogBoxContent: {
33
+ title: 'Decreasing Max Points.',
34
+ text: " You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted."
35
+ },
36
+ settingsPanelDisabled: false,
37
+ spellCheck: {
38
+ label: 'Spellcheck',
39
+ settings: false,
40
+ enabled: true
41
+ },
42
+ showExcludeZero: {
43
+ settings: true,
44
+ label: 'Exclude Zero'
45
+ },
46
+ showScorePointLabels: {
47
+ settings: true,
48
+ label: 'Show Score Point Labels'
49
+ },
50
+ showDescription: {
51
+ settings: true,
52
+ label: 'Show Description'
53
+ },
54
+ showVisibleToStudent: {
55
+ settings: true,
56
+ label: 'Visible to Student'
57
+ },
58
+ showHalfScoring: {
59
+ settings: true,
60
+ label: 'Half Scoring'
61
+ },
62
+ width: '900px',
63
+ // these should not be set to true (should not be used) for now
64
+ showStandards: {
65
+ settings: false,
66
+ label: 'Show Standards'
67
+ },
68
+ showLevelTagInput: {
69
+ settings: false,
70
+ label: 'Show Level Tag Input',
71
+ enabled: false
72
+ },
73
+ dragAndDrop: {
74
+ settings: true,
75
+ label: 'Enable Drag and Drop',
76
+ enabled: false
77
+ },
78
+ showMaxPoint: {
79
+ settings: true,
80
+ label: 'Show Max Points Dropdown'
81
+ },
82
+ addScale: {
83
+ settings: true,
84
+ label: 'Add Scale Available'
85
+ },
86
+ minNoOfTraits: 1,
87
+ maxNoOfTraits: 10,
88
+ minNoOfScales: 2,
89
+ maxNoOfScales: 10
90
+ }
91
+ };
8
92
  exports["default"] = _default;
9
93
  //# sourceMappingURL=defaults.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":[],"mappings":";;;;;;eAAe,E","sourcesContent":["export default {};\n"],"file":"defaults.js"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","visibleToStudent","halfScoring","pointLabels","description","standards","scales","excludeZero","maxPointsEnabled","addScaleEnabled","configuration","excludeZeroDialogBoxContent","title","text","includeZeroDialogBoxContent","deleteScaleDialogBoxContent","maxPointsDialogBoxContent","settingsPanelDisabled","spellCheck","label","settings","enabled","showExcludeZero","showScorePointLabels","showDescription","showVisibleToStudent","showHalfScoring","width","showStandards","showLevelTagInput","dragAndDrop","showMaxPoint","addScale","minNoOfTraits","maxNoOfTraits","minNoOfScales","maxNoOfScales"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,gBAAgB,EAAE,IADb;AAELC,IAAAA,WAAW,EAAE,KAFR;AAGLC,IAAAA,WAAW,EAAE,IAHR;AAILC,IAAAA,WAAW,EAAE,KAJR;AAKLC,IAAAA,SAAS,EAAE,KALN;AAMLC,IAAAA,MAAM,EAAE,EANH;AAOLC,IAAAA,WAAW,EAA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ACAC,IAAAA,aAAa,EAAE;AACbR,MAAAA,QAAQ,EAAE,KADG;AAEbD,MAAAA,KAAK,EAAE;AAFM,KA3EF;AA+EbU,IAAAA,iBAAiB,EAAE;AACjBT,MAAAA,QAAQ,EAAE,KADO;AAEjBD,MAAAA,KAAK,EAAE,sBAFU;AAGjBE,MAAAA,OAAO,EAAE;AAHQ,KA/EN;AAoFbS,IAAAA,WAAW,EAAE;AACXV,MAAAA,QAAQ,EAAE,IADC;AAEXD,MAAAA,KAAK,EAAE,sBAFI;AAGXE,MAAAA,OAAO,EAAE;AAHE,KApFA;AAyFbU,IAAAA,YAAY,EAAE;AACZX,MAAAA,QAAQ,EAAE,IADE;AAEZD,MAAAA,KAAK,EAAE;AAFK,KAzFD;AA6Fba,IAAAA,QAAQ,EAAE;AACRZ,MAAAA,QAAQ,EAAE,IADF;AAERD,MAAAA,KAAK,EAAE;AAFC,KA7FG;AAiGbc,IAAAA,aAAa,EAAE,CAjGF;AAkGbC,IAAAA,aAAa,EAAE,EAlGF;AAmGbC,IAAAA,aAAa,EAAE,CAnGF;AAoGbC,IAAAA,aAAa,EAAE;AApGF;AAZF,C","sourcesContent":["export default {\n model: {\n visibleToStudent: true,\n halfScoring: false,\n pointLabels: true,\n description: false,\n standards: false,\n scales: [],\n excludeZero: false,\n maxPointsEnabled: true,\n addScaleEnabled: true,\n },\n configuration: {\n excludeZeroDialogBoxContent: {\n title: 'Exclude 0 (Zero) from Score Point Values.',\n text: `<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>`,\n },\n includeZeroDialogBoxContent: {\n title: 'Include 0 (Zero) in Score Point Values.',\n text: `<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>`,\n },\n deleteScaleDialogBoxContent: {\n title: 'Delete Scale',\n text: 'Are you sure you want to delete this scale?',\n },\n maxPointsDialogBoxContent: {\n title: 'Decreasing Max Points.',\n text: ` You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted.`,\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n showExcludeZero: {\n settings: true,\n label: 'Exclude Zero',\n },\n showScorePointLabels: {\n settings: true,\n label: 'Show Score Point Labels',\n },\n showDescription: {\n settings: true,\n label: 'Show Description',\n },\n showVisibleToStudent: {\n settings: true,\n label: 'Visible to Student',\n },\n showHalfScoring: {\n settings: true,\n label: 'Half Scoring',\n },\n width: '900px',\n // these should not be set to true (should not be used) for now\n showStandards: {\n settings: false,\n label: 'Show Standards',\n },\n showLevelTagInput: {\n settings: false,\n label: 'Show Level Tag Input',\n enabled: false,\n },\n dragAndDrop: {\n settings: true,\n label: 'Enable Drag and Drop',\n enabled: false,\n },\n showMaxPoint: {\n settings: true,\n label: 'Show Max Points Dropdown',\n },\n addScale: {\n settings: true,\n label: 'Add Scale Available',\n },\n minNoOfTraits: 1,\n maxNoOfTraits: 10,\n minNoOfScales: 2,\n maxNoOfScales: 10,\n },\n};\n"],"file":"defaults.js"}
@@ -5,10 +5,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
+ exports.createCorrectResponseSession = void 0;
8
9
  exports.createDefaultModel = createDefaultModel;
10
+ exports.getScore = void 0;
9
11
  exports.model = model;
12
+ exports.normalize = void 0;
10
13
  exports.outcome = outcome;
11
- exports.createCorrectResponseSession = exports.getScore = exports.normalize = void 0;
12
14
 
13
15
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
14
16
 
@@ -18,9 +20,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
18
20
 
19
21
  var _defaults = _interopRequireDefault(require("./defaults"));
20
22
 
21
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
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; }
22
24
 
23
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
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; }
24
26
 
25
27
  function createDefaultModel() {
26
28
  var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -1 +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","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;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"}
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,UAACC,OAAD;AAAA,WAAaA,OAAO,iCAAMC,oBAAN,GAAmBH,KAAnB,EAApB;AAAA,GAAZ,CAAP;AACD;;AAEM,IAAMI,SAAS,GAAG,SAAZA,SAAY,CAACC,QAAD;AAAA,yCAAoBF,oBAApB,GAAiCE,QAAjC;AAAA,CAAlB;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,UAACC,KAAD;AAAA,qDAAiBA,KAAjB;AAAwBH,gBAAAA,WAAW,EAAXA;AAAxB;AAAA,aAAnB,CAXhB;AAAA,6EAcAL,kBAdA;AAeHI,cAAAA,MAAM,EAAEE;AAfL;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAmBA,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,UAACC,OAAD;AAAA,WAAaA,OAAO,CAAC;AAAEiB,MAAAA,KAAK,EAAE,CAAT;AAAYC,MAAAA,KAAK,EAAE;AAAnB,KAAD,CAApB;AAAA,GAAZ,CAAP;AACD;;AAEM,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CAAChB,QAAD,EAAWE,GAAX,EAAmB;AAC7D,SAAO,IAAIN,OAAJ,CAAY,UAACC,OAAD,EAAa;AAC9B,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\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"}
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/multi-trait-rubric-controller",
3
3
  "private": true,
4
- "version": "1.2.3",
4
+ "version": "1.2.13",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "@pie-lib/controller-utils": "^0.2.24",
11
+ "@pie-lib/controller-utils": "^0.2.42",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15"
14
14
  }
@@ -3,6 +3,75 @@
3
3
  "additionalProperties": false,
4
4
  "type": "object",
5
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
+ "deleteScaleDialogBoxContent": {
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
+ "maxPointsDialogBoxContent": {
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
+ "settingsPanelDisabled": {
71
+ "description": "Indicates if the settings panel is not available",
72
+ "type": "boolean",
73
+ "title": "settingsPanelDisabled"
74
+ },
6
75
  "showExcludeZero": {
7
76
  "title": "ConfigureProp",
8
77
  "type": "object",
@@ -82,9 +151,69 @@
82
151
  "title": "label"
83
152
  }
84
153
  }
154
+ },
155
+ "spellCheck": {
156
+ "title": "ConfigureProp",
157
+ "type": "object",
158
+ "properties": {
159
+ "settings": {
160
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
161
+ "type": "boolean",
162
+ "title": "settings"
163
+ },
164
+ "label": {
165
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
166
+ "type": "string",
167
+ "title": "label"
168
+ }
169
+ }
170
+ },
171
+ "width": {
172
+ "description": "How large (in px) should multi-trait-rubric be",
173
+ "type": "string",
174
+ "title": "width"
175
+ },
176
+ "minNoOfTraits": {
177
+ "description": "Minimum number of traits",
178
+ "type": "number",
179
+ "title": "minNoOfTraits"
180
+ },
181
+ "maxNoOfTraits": {
182
+ "description": "Maximum number of traits",
183
+ "type": "number",
184
+ "title": "maxNoOfTraits"
185
+ },
186
+ "minNoOfScales": {
187
+ "description": "Minimum number of scales",
188
+ "type": "number",
189
+ "title": "minNoOfScales"
190
+ },
191
+ "maxNoOfScales": {
192
+ "description": "Maximum number of scales",
193
+ "type": "number",
194
+ "title": "maxNoOfScales"
85
195
  }
86
196
  },
197
+ "required": [
198
+ "width"
199
+ ],
87
200
  "definitions": {
201
+ "DialogContent": {
202
+ "title": "DialogContent",
203
+ "type": "object",
204
+ "properties": {
205
+ "title": {
206
+ "description": "Dialog box title",
207
+ "type": "string",
208
+ "title": "title"
209
+ },
210
+ "text": {
211
+ "description": "Dialog box text",
212
+ "type": "string",
213
+ "title": "text"
214
+ }
215
+ }
216
+ },
88
217
  "ConfigureProp": {
89
218
  "title": "ConfigureProp",
90
219
  "type": "object",
@@ -2,6 +2,58 @@ Config Object for @pie-elements/multi-trait-rubric
2
2
 
3
3
  The schema defines the following properties:
4
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
+ # `deleteScaleDialogBoxContent` (object)
30
+
31
+ Properties of the `deleteScaleDialogBoxContent` object:
32
+
33
+ ## `title` (string)
34
+
35
+ Dialog box title
36
+
37
+ ## `text` (string)
38
+
39
+ Dialog box text
40
+
41
+ # `maxPointsDialogBoxContent` (object)
42
+
43
+ Properties of the `maxPointsDialogBoxContent` object:
44
+
45
+ ## `title` (string)
46
+
47
+ Dialog box title
48
+
49
+ ## `text` (string)
50
+
51
+ Dialog box text
52
+
53
+ # `settingsPanelDisabled` (boolean)
54
+
55
+ Indicates if the settings panel is not available
56
+
5
57
  # `showExcludeZero` (object)
6
58
 
7
59
  Properties of the `showExcludeZero` object:
@@ -62,12 +114,56 @@ Indicates if the item has to be displayed in the Settings Panel
62
114
 
63
115
  Indicates the label for the item that has to be displayed in the Settings Panel
64
116
 
117
+ # `spellCheck` (object)
118
+
119
+ Properties of the `spellCheck` object:
120
+
121
+ ## `settings` (boolean)
122
+
123
+ Indicates if the item has to be displayed in the Settings Panel
124
+
125
+ ## `label` (string)
126
+
127
+ Indicates the label for the item that has to be displayed in the Settings Panel
128
+
129
+ # `width` (string, required)
130
+
131
+ How large (in px) should multi-trait-rubric be
132
+
133
+ # `minNoOfTraits` (number)
134
+
135
+ Minimum number of traits
136
+
137
+ # `maxNoOfTraits` (number)
138
+
139
+ Maximum number of traits
140
+
141
+ # `minNoOfScales` (number)
142
+
143
+ Minimum number of scales
144
+
145
+ # `maxNoOfScales` (number)
146
+
147
+ Maximum number of scales
148
+
65
149
  ---
66
150
 
67
151
  # Sub Schemas
68
152
 
69
153
  The schema defines the following additional types:
70
154
 
155
+ ## `DialogContent` (object)
156
+
157
+ Properties of the `DialogContent` object:
158
+
159
+ ### `title` (string)
160
+
161
+ Dialog box title
162
+
163
+ ### `text` (string)
164
+
165
+ Dialog box text
166
+
71
167
  ## `ConfigureProp` (object)
72
168
 
73
169
  Properties of the `ConfigureProp` object:
@@ -2,7 +2,7 @@ const { model } = require('./generate');
2
2
 
3
3
  module.exports = {
4
4
  elements: {
5
- 'multi-trait-rubric': '../..'
5
+ 'multi-trait-rubric': '../..',
6
6
  },
7
- models: [model('1', 'multi-trait-rubric')]
7
+ models: [model('1', 'multi-trait-rubric')],
8
8
  };
@@ -7,6 +7,8 @@ exports.model = (id, element) => ({
7
7
  pointLabels: true,
8
8
  description: false,
9
9
  standards: false,
10
+ maxPointsEnabled: true,
11
+ addScaleEnabled: true,
10
12
  scales: [
11
13
  {
12
14
  maxPoints: 4,
@@ -31,10 +33,42 @@ exports.model = (id, element) => ({
31
33
  description: 'the internal structure of the piece',
32
34
  scorePointsDescriptors: [
33
35
  'Student’s response is blank, not in English, not legible, or does not respond to the prompt.',
34
- 'Does not have a beginning, middle and/or end\n' + '\n' + 'Does not have a lead and/or conclusion\n' + '\n' + 'Transitions confusing and/or not present\n' + '\n' + 'Not written in logical order\n' + '\n' + 'No sign of paragraphing / incorrect paragraphing',
35
- 'Weak beginning, middle and end\n' + '\n' + 'Has evidence of a lead and/or conclusion but missing elements\n' + '\n' + 'Transitions are used sometimes\n' + '\n' + 'Some logical order\n' + '\n' + 'Most paragraphing incorrect',
36
- 'Has an acceptable beginning, middle and end\n' + '\n' + 'Includes a lead and conclusion\n' + '\n' + 'Transitions are used correctly\n' + '\n' + 'Mostly logical order\n' + '\n' + 'Mostly correct paragraphing',
37
- 'Has an effective beginning, middle and end\n' + '\n' + 'Powerful introduction / lead and conclusion\n' + '\n' + 'Effective transitions\n' + '\n' + 'Logical order / sequencing\n' + '\n' + 'Uses appropriate paragraphing',
36
+ 'Does not have a beginning, middle and/or end\n' +
37
+ '\n' +
38
+ 'Does not have a lead and/or conclusion\n' +
39
+ '\n' +
40
+ 'Transitions confusing and/or not present\n' +
41
+ '\n' +
42
+ 'Not written in logical order\n' +
43
+ '\n' +
44
+ 'No sign of paragraphing / incorrect paragraphing',
45
+ 'Weak beginning, middle and end\n' +
46
+ '\n' +
47
+ 'Has evidence of a lead and/or conclusion but missing elements\n' +
48
+ '\n' +
49
+ 'Transitions are used sometimes\n' +
50
+ '\n' +
51
+ 'Some logical order\n' +
52
+ '\n' +
53
+ 'Most paragraphing incorrect',
54
+ 'Has an acceptable beginning, middle and end\n' +
55
+ '\n' +
56
+ 'Includes a lead and conclusion\n' +
57
+ '\n' +
58
+ 'Transitions are used correctly\n' +
59
+ '\n' +
60
+ 'Mostly logical order\n' +
61
+ '\n' +
62
+ 'Mostly correct paragraphing',
63
+ 'Has an effective beginning, middle and end\n' +
64
+ '\n' +
65
+ 'Powerful introduction / lead and conclusion\n' +
66
+ '\n' +
67
+ 'Effective transitions\n' +
68
+ '\n' +
69
+ 'Logical order / sequencing\n' +
70
+ '\n' +
71
+ 'Uses appropriate paragraphing',
38
72
  ],
39
73
  },
40
74
  {
@@ -44,8 +78,14 @@ exports.model = (id, element) => ({
44
78
  scorePointsDescriptors: [
45
79
  'Student’s response is blank, not in English, not legible, or does not respond to the prompt.',
46
80
  'Vocabulary is limited/used incorrectly\n' + '\n' + 'No figurative language; words do not convey meaning',
47
- 'Generally correct words\n' + '\n' + 'Attempt at figurative language\n' + '\n' + 'and/or words convey general meaning',
48
- 'Some active verbs and precise nouns\n' + '\n' + 'Effective use of figurative language and/or words that enhance meaning',
81
+ 'Generally correct words\n' +
82
+ '\n' +
83
+ 'Attempt at figurative language\n' +
84
+ '\n' +
85
+ 'and/or words convey general meaning',
86
+ 'Some active verbs and precise nouns\n' +
87
+ '\n' +
88
+ 'Effective use of figurative language and/or words that enhance meaning',
49
89
  'Powerful and engaging words\n' + '\n' + 'Artful use of figurative language and/or sensory detail',
50
90
  ],
51
91
  },
@@ -55,10 +95,26 @@ exports.model = (id, element) => ({
55
95
  description: 'the rhythm and flow of the language',
56
96
  scorePointsDescriptors: [
57
97
  'Student’s response is blank, not in English, not legible, or does not respond to the prompt.',
58
- 'No sentences are clear\n' + '\n' + 'No variety in sentence structure\n' + '\n' + 'Frequent run-ons and/or fragments are present',
59
- 'Some sentences are clear\n' + '\n' + 'Sentence variety used rarely\n' + '\n' + 'Some run-ons and/or fragments are present',
60
- 'Most sentences are clear\n' + '\n' + 'Some sentence variety is used\n' + '\n' + 'Run-ons and/or fragments are rare',
61
- 'All Sentences are clear\n' + '\n' + 'Variety of sentence structure is used\n' + '\n' + 'Run-ons and/or fragments are not present',
98
+ 'No sentences are clear\n' +
99
+ '\n' +
100
+ 'No variety in sentence structure\n' +
101
+ '\n' +
102
+ 'Frequent run-ons and/or fragments are present',
103
+ 'Some sentences are clear\n' +
104
+ '\n' +
105
+ 'Sentence variety used rarely\n' +
106
+ '\n' +
107
+ 'Some run-ons and/or fragments are present',
108
+ 'Most sentences are clear\n' +
109
+ '\n' +
110
+ 'Some sentence variety is used\n' +
111
+ '\n' +
112
+ 'Run-ons and/or fragments are rare',
113
+ 'All Sentences are clear\n' +
114
+ '\n' +
115
+ 'Variety of sentence structure is used\n' +
116
+ '\n' +
117
+ 'Run-ons and/or fragments are not present',
62
118
  ],
63
119
  },
64
120
  {
@@ -76,16 +132,32 @@ exports.model = (id, element) => ({
76
132
  {
77
133
  name: 'Voice',
78
134
  standards: [],
79
- description: 'the personal tone and flavor of the author\'s message',
135
+ description: "the personal tone and flavor of the author's message",
80
136
  scorePointsDescriptors: [
81
137
  'Student’s response is blank, not in English, not legible, or does not respond to the prompt.',
82
- 'Not concerned with audience or purpose\n' + '\n' + 'No viewpoint (perspective) used\n' + '\n' + 'Writing is mechanical and lifeless',
83
- 'Shows beginning awareness of audience/purpose\n' + '\n' + 'Some viewpoint (perspective) used throughout the piece\n' + '\n' + 'Writing is distant, too formal or informal',
84
- 'Awareness of audience; purpose is clear most of the time\n' + '\n' + 'Uses viewpoint (perspective) throughout most of the paper\n' + '\n' + 'Writing is pleasant, agreeable and satisfying',
85
- 'Powerful connection with audience; purpose is clearly communicated\n' + '\n' + 'Maintains strong viewpoint (perspective) throughout entire piece\n' + '\n' + 'Writing is expressive, engaging and has lots of energy',
138
+ 'Not concerned with audience or purpose\n' +
139
+ '\n' +
140
+ 'No viewpoint (perspective) used\n' +
141
+ '\n' +
142
+ 'Writing is mechanical and lifeless',
143
+ 'Shows beginning awareness of audience/purpose\n' +
144
+ '\n' +
145
+ 'Some viewpoint (perspective) used throughout the piece\n' +
146
+ '\n' +
147
+ 'Writing is distant, too formal or informal',
148
+ 'Awareness of audience; purpose is clear most of the time\n' +
149
+ '\n' +
150
+ 'Uses viewpoint (perspective) throughout most of the paper\n' +
151
+ '\n' +
152
+ 'Writing is pleasant, agreeable and satisfying',
153
+ 'Powerful connection with audience; purpose is clearly communicated\n' +
154
+ '\n' +
155
+ 'Maintains strong viewpoint (perspective) throughout entire piece\n' +
156
+ '\n' +
157
+ 'Writing is expressive, engaging and has lots of energy',
86
158
  ],
87
- }
88
- ]
159
+ },
160
+ ],
89
161
  },
90
162
  {
91
163
  maxPoints: 5,
@@ -102,7 +174,7 @@ exports.model = (id, element) => ({
102
174
  'Handwriting is generally legible\n' + '\n' + 'Overall appearance is acceptable or better',
103
175
  ],
104
176
  },
105
- ]
106
- }
107
- ]
177
+ ],
178
+ },
179
+ ],
108
180
  });
@@ -2,5 +2,5 @@ module.exports = [
2
2
  {
3
3
  id: '1',
4
4
  element: 'multi-trait-rubric',
5
- }
5
+ },
6
6
  ];
@@ -33,6 +33,11 @@
33
33
  "type": "boolean",
34
34
  "title": "excludeZero"
35
35
  },
36
+ "spellCheckEnabled": {
37
+ "description": "Indicates if spellcheck is enabled for the author. Default value is true",
38
+ "type": "boolean",
39
+ "title": "spellCheckEnabled"
40
+ },
36
41
  "scales": {
37
42
  "description": "scales",
38
43
  "type": "array",
@@ -125,9 +130,26 @@
125
130
  "required": [
126
131
  "element",
127
132
  "id",
128
- "scales"
133
+ "scales",
134
+ "spellCheckEnabled"
129
135
  ],
130
136
  "definitions": {
137
+ "DialogContent": {
138
+ "title": "DialogContent",
139
+ "type": "object",
140
+ "properties": {
141
+ "title": {
142
+ "description": "Dialog box title",
143
+ "type": "string",
144
+ "title": "title"
145
+ },
146
+ "text": {
147
+ "description": "Dialog box text",
148
+ "type": "string",
149
+ "title": "text"
150
+ }
151
+ }
152
+ },
131
153
  "ConfigureProp": {
132
154
  "title": "ConfigureProp",
133
155
  "type": "object",