@pie-element/fraction-model 4.0.1 → 4.2.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/CHANGELOG.md +19 -0
- package/configure/CHANGELOG.md +19 -0
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +19 -0
- package/controller/package.json +2 -2
- package/package.json +8 -22
- package/esm/configure.js +0 -22591
- package/esm/configure.js.map +0 -1
- package/esm/controller.js +0 -259
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -28253
- package/esm/element.js.map +0 -1
package/esm/controller.js
DELETED
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import isEmpty from 'lodash/isEmpty';
|
|
2
|
-
|
|
3
|
-
function _defineProperty(obj, key, value) {
|
|
4
|
-
if (key in obj) {
|
|
5
|
-
Object.defineProperty(obj, key, {
|
|
6
|
-
value: value,
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true
|
|
10
|
-
});
|
|
11
|
-
} else {
|
|
12
|
-
obj[key] = value;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return obj;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Should be exactly the same as configure/defaults.js
|
|
19
|
-
var defaults = {
|
|
20
|
-
model: {
|
|
21
|
-
correctResponse: [],
|
|
22
|
-
title: '',
|
|
23
|
-
prompt: '',
|
|
24
|
-
modelTypeSelected: 'bar',
|
|
25
|
-
maxModelSelected: 1,
|
|
26
|
-
partsPerModel: 5,
|
|
27
|
-
allowedStudentConfig: false,
|
|
28
|
-
showGraphLabels: false
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
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; }
|
|
33
|
-
|
|
34
|
-
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) { _defineProperty(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; }
|
|
35
|
-
/*
|
|
36
|
-
* Function to check the correctness of the response
|
|
37
|
-
* @param {model} model contains the model object
|
|
38
|
-
* @param {answers} answers contains the answers object
|
|
39
|
-
* @param {env} env contains the environment object
|
|
40
|
-
* @returns {string} returns the correctness of the response
|
|
41
|
-
* */
|
|
42
|
-
|
|
43
|
-
var getResponseCorrectness = function getResponseCorrectness(model, answers) {
|
|
44
|
-
var correct;
|
|
45
|
-
|
|
46
|
-
if (model.allowedStudentConfig) {
|
|
47
|
-
correct = !!(answers.partsPerModel === model.partsPerModel && partialFillCheck(answers.response, model.partsPerModel) && numeratorCheck(model.correctResponse, answers.response));
|
|
48
|
-
} else {
|
|
49
|
-
correct = !!(partialFillCheck(answers.response, model.partsPerModel) && numeratorCheck(model.correctResponse, answers.response));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return correct ? 'correct' : 'incorrect';
|
|
53
|
-
};
|
|
54
|
-
/*
|
|
55
|
-
* Function to get the correctness of the response
|
|
56
|
-
* @param {question} question contains the question object
|
|
57
|
-
* @param {env} env contains the environment object
|
|
58
|
-
* @param {answers} answers contains the answers object
|
|
59
|
-
* @returns {string} returns the correctness
|
|
60
|
-
* */
|
|
61
|
-
|
|
62
|
-
var getCorrectness = function getCorrectness(question, env) {
|
|
63
|
-
var answers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
64
|
-
|
|
65
|
-
if (env.mode === 'evaluate') {
|
|
66
|
-
return getResponseCorrectness(question, answers);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
/*
|
|
70
|
-
* Function to get the outcome score
|
|
71
|
-
* @param {question} question contains the question object
|
|
72
|
-
* @param {env} env contains the environment object
|
|
73
|
-
* @param {answers} answers contains the answers object
|
|
74
|
-
* @returns {number} returns the score
|
|
75
|
-
* */
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var getOutComeScore = function getOutComeScore(question, env) {
|
|
79
|
-
var answers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
80
|
-
var correctness = getCorrectness(question, env, answers);
|
|
81
|
-
return correctness === 'correct' ? 1 : 0;
|
|
82
|
-
};
|
|
83
|
-
/*
|
|
84
|
-
* Function to check outcome of the session
|
|
85
|
-
* @param {model} model contains the model object
|
|
86
|
-
* @param {session} session contains the session object
|
|
87
|
-
* @param {env} env contains the environment object
|
|
88
|
-
* @returns {Promise} returns the score
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var outcome = (model, session, env) => new Promise(resolve => {
|
|
93
|
-
if (!session || isEmpty(session)) {
|
|
94
|
-
resolve({
|
|
95
|
-
score: 0,
|
|
96
|
-
empty: true
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
if (env.mode !== 'evaluate') {
|
|
100
|
-
resolve({
|
|
101
|
-
score: undefined,
|
|
102
|
-
completed: undefined
|
|
103
|
-
});
|
|
104
|
-
} else {
|
|
105
|
-
resolve({
|
|
106
|
-
score: getOutComeScore(model, env, session.answers)
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
/*
|
|
112
|
-
* Function to check if the numerator of the response matches the numerator of the correct response
|
|
113
|
-
* @param {correctResponse} correctResponse contains the correct response object
|
|
114
|
-
* @param {response} response contains the response object
|
|
115
|
-
* @returns {boolean} returns true if the numerators match
|
|
116
|
-
* */
|
|
117
|
-
|
|
118
|
-
var numeratorCheck = (correctResponse, response) => {
|
|
119
|
-
var correctNumerator = 0;
|
|
120
|
-
var responseNumerator = 0;
|
|
121
|
-
|
|
122
|
-
for (var i = 0; i < correctResponse.length; i++) {
|
|
123
|
-
correctNumerator += correctResponse[i].value;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
for (var _i = 0; _i < response.length; _i++) {
|
|
127
|
-
responseNumerator += response[_i].value;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return correctNumerator === responseNumerator;
|
|
131
|
-
};
|
|
132
|
-
/*
|
|
133
|
-
* Function to check if the response contains more than one partially-filled model
|
|
134
|
-
* @param {response} response contains the response object
|
|
135
|
-
* @param {partsPerModel} partsPerModel contains the number of parts per model
|
|
136
|
-
* */
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
var partialFillCheck = (response, partsPerModel) => {
|
|
140
|
-
if (response.length > 0) {
|
|
141
|
-
var partialModelCount = 0;
|
|
142
|
-
response.forEach(selection => {
|
|
143
|
-
if (selection.value !== partsPerModel) {
|
|
144
|
-
partialModelCount++;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
return partialModelCount <= 1;
|
|
148
|
-
} else {
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
/*
|
|
153
|
-
* Function to create a default model
|
|
154
|
-
* @param {model} model contains the model object
|
|
155
|
-
* */
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
var createDefaultModel = function createDefaultModel() {
|
|
159
|
-
var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
160
|
-
return _objectSpread(_objectSpread({}, defaults.model), model);
|
|
161
|
-
};
|
|
162
|
-
/*
|
|
163
|
-
* Return the model object
|
|
164
|
-
* */
|
|
165
|
-
|
|
166
|
-
var model = (question, session, env) => {
|
|
167
|
-
return new Promise(resolve => {
|
|
168
|
-
session = session || {};
|
|
169
|
-
var model = createDefaultModel(question);
|
|
170
|
-
var correctness, score;
|
|
171
|
-
|
|
172
|
-
if ((!session || isEmpty(session)) && env.mode === 'evaluate') {
|
|
173
|
-
correctness = 'unanswered';
|
|
174
|
-
score = '0%';
|
|
175
|
-
} else {
|
|
176
|
-
correctness = getCorrectness(model, env, session && session.answers);
|
|
177
|
-
score = "".concat(getOutComeScore(model, env, session && session.answers) * 100, "%");
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
var correctInfo = {
|
|
181
|
-
score,
|
|
182
|
-
correctness
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
var out = _objectSpread(_objectSpread({
|
|
186
|
-
env
|
|
187
|
-
}, model), {}, {
|
|
188
|
-
view: env.mode === 'view' || env.mode === 'evaluate'
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
if (env.mode === 'evaluate') {
|
|
192
|
-
Object.assign(out, {
|
|
193
|
-
correctness: correctInfo
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
resolve(out);
|
|
198
|
-
});
|
|
199
|
-
};
|
|
200
|
-
/*
|
|
201
|
-
* Function to create a correct response session
|
|
202
|
-
* @param {model} model contains the model object
|
|
203
|
-
* @param {env} env contains the environment object
|
|
204
|
-
* @returns {Promise} returns the correct response session
|
|
205
|
-
* */
|
|
206
|
-
|
|
207
|
-
var createCorrectResponseSession = (model, env) => {
|
|
208
|
-
return new Promise(resolve => {
|
|
209
|
-
if (env.mode !== 'evaluate' && env.role === 'instructor') {
|
|
210
|
-
var {
|
|
211
|
-
correctResponse,
|
|
212
|
-
maxModelSelected,
|
|
213
|
-
partsPerModel
|
|
214
|
-
} = model;
|
|
215
|
-
resolve({
|
|
216
|
-
answers: {
|
|
217
|
-
response: correctResponse,
|
|
218
|
-
noOfModel: maxModelSelected,
|
|
219
|
-
partsPerModel
|
|
220
|
-
},
|
|
221
|
-
id: '1'
|
|
222
|
-
});
|
|
223
|
-
} else {
|
|
224
|
-
resolve(null);
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
};
|
|
228
|
-
/*
|
|
229
|
-
* Function to validate the model
|
|
230
|
-
* @param {model} model contains the model object
|
|
231
|
-
* @param {config} config contains the config object
|
|
232
|
-
* */
|
|
233
|
-
|
|
234
|
-
var validate = function validate() {
|
|
235
|
-
var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
236
|
-
var errors = {};
|
|
237
|
-
|
|
238
|
-
if (model.correctResponse.length === 0) {
|
|
239
|
-
errors.correctResponse = 'To save the item, at least one section must be marked as correct.';
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if (model.correctResponse.length > 0) {
|
|
243
|
-
var partialModelCount = 0;
|
|
244
|
-
model.correctResponse.forEach(selection => {
|
|
245
|
-
if (selection.value !== model.partsPerModel) {
|
|
246
|
-
partialModelCount++;
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
if (partialModelCount > 1) {
|
|
251
|
-
errors.correctResponse = 'The correct answer should include no more than one partially-filled model';
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
return errors;
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
export { createCorrectResponseSession, createDefaultModel, getResponseCorrectness, model, outcome, validate };
|
|
259
|
-
//# sourceMappingURL=controller.js.map
|
package/esm/controller.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.js","sources":["../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../controller/src/defaults.js","../controller/src/index.js"],"sourcesContent":["export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","// Should be exactly the same as configure/defaults.js\nexport default {\n model: {\n correctResponse: [],\n title: '',\n prompt: '',\n modelTypeSelected: 'bar',\n maxModelSelected: 1,\n partsPerModel: 5,\n allowedStudentConfig: false,\n showGraphLabels: false,\n },\n};\n","import isEmpty from 'lodash/isEmpty';\nimport defaults from './defaults';\n\n/*\n * Function to check the correctness of the response\n * @param {model} model contains the model object\n * @param {answers} answers contains the answers object\n * @param {env} env contains the environment object\n * @returns {string} returns the correctness of the response\n * */\nexport const getResponseCorrectness = (model, answers, env = {}) => {\n let correct;\n if (model.allowedStudentConfig) {\n correct = !!(\n answers.partsPerModel === model.partsPerModel &&\n partialFillCheck(answers.response, model.partsPerModel) &&\n numeratorCheck(model.correctResponse, answers.response)\n );\n } else {\n correct = !!(\n partialFillCheck(answers.response, model.partsPerModel) && numeratorCheck(model.correctResponse, answers.response)\n );\n }\n return correct ? 'correct' : 'incorrect';\n};\n\n/*\n * Function to get the correctness of the response\n * @param {question} question contains the question object\n * @param {env} env contains the environment object\n * @param {answers} answers contains the answers object\n * @returns {string} returns the correctness\n * */\nconst getCorrectness = (question, env, answers = {}) => {\n if (env.mode === 'evaluate') {\n return getResponseCorrectness(question, answers, env);\n }\n};\n\n/*\n * Function to get the outcome score\n * @param {question} question contains the question object\n * @param {env} env contains the environment object\n * @param {answers} answers contains the answers object\n * @returns {number} returns the score\n * */\nconst getOutComeScore = (question, env, answers = {}) => {\n const correctness = getCorrectness(question, env, answers);\n return correctness === 'correct' ? 1 : 0;\n};\n\n/*\n * Function to check outcome of the session\n * @param {model} model contains the model object\n * @param {session} session contains the session object\n * @param {env} env contains the environment object\n * @returns {Promise} returns the score\n */\nexport const outcome = (model, session, env) =>\n new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true });\n } else {\n if (env.mode !== 'evaluate') {\n resolve({ score: undefined, completed: undefined });\n } else {\n resolve({ score: getOutComeScore(model, env, session.answers) });\n }\n }\n });\n\n/*\n * Function to check if the numerator of the response matches the numerator of the correct response\n * @param {correctResponse} correctResponse contains the correct response object\n * @param {response} response contains the response object\n * @returns {boolean} returns true if the numerators match\n * */\nconst numeratorCheck = (correctResponse, response) => {\n let correctNumerator = 0;\n let responseNumerator = 0;\n for (let i = 0; i < correctResponse.length; i++) {\n correctNumerator += correctResponse[i].value;\n }\n for (let i = 0; i < response.length; i++) {\n responseNumerator += response[i].value;\n }\n return correctNumerator === responseNumerator;\n};\n\n/*\n * Function to check if the response contains more than one partially-filled model\n * @param {response} response contains the response object\n * @param {partsPerModel} partsPerModel contains the number of parts per model\n * */\nconst partialFillCheck = (response, partsPerModel) => {\n if (response.length > 0) {\n let partialModelCount = 0;\n response.forEach((selection) => {\n if (selection.value !== partsPerModel) {\n partialModelCount++;\n }\n });\n return partialModelCount <= 1;\n } else {\n return false;\n }\n};\n\n/*\n * Function to create a default model\n * @param {model} model contains the model object\n * */\nexport const createDefaultModel = (model = {}) => ({\n ...defaults.model,\n ...model,\n});\n\n/*\n * Return the model object\n * */\nexport const model = (question, session, env) => {\n return new Promise((resolve) => {\n session = session || {};\n const model = createDefaultModel(question);\n let correctness, score;\n if ((!session || isEmpty(session)) && env.mode === 'evaluate') {\n correctness = 'unanswered';\n score = '0%';\n } else {\n correctness = getCorrectness(model, env, session && session.answers);\n score = `${getOutComeScore(model, env, session && session.answers) * 100}%`;\n }\n const correctInfo = {\n score,\n correctness,\n };\n const out = {\n env,\n ...model,\n view: env.mode === 'view' || env.mode === 'evaluate',\n };\n if (env.mode === 'evaluate') {\n Object.assign(out, {\n correctness: correctInfo,\n });\n }\n resolve(out);\n });\n};\n\n/*\n * Function to create a correct response session\n * @param {model} model contains the model object\n * @param {env} env contains the environment object\n * @returns {Promise} returns the correct response session\n * */\nexport const createCorrectResponseSession = (model, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { correctResponse, maxModelSelected, partsPerModel } = model;\n resolve({\n answers: {\n response: correctResponse,\n noOfModel: maxModelSelected,\n partsPerModel,\n },\n id: '1',\n });\n } else {\n resolve(null);\n }\n });\n};\n\n/*\n * Function to validate the model\n * @param {model} model contains the model object\n * @param {config} config contains the config object\n * */\nexport const validate = (model = {}, config = {}) => {\n const errors = {};\n if (model.correctResponse.length === 0) {\n errors.correctResponse = 'To save the item, at least one section must be marked as correct.';\n }\n if (model.correctResponse.length > 0) {\n let partialModelCount = 0;\n model.correctResponse.forEach((selection) => {\n if (selection.value !== model.partsPerModel) {\n partialModelCount++;\n }\n });\n if (partialModelCount > 1) {\n errors.correctResponse = 'The correct answer should include no more than one partially-filled model';\n }\n }\n return errors;\n};\n"],"names":["model","correctResponse","title","prompt","modelTypeSelected","maxModelSelected","partsPerModel","allowedStudentConfig","showGraphLabels","getResponseCorrectness","answers","correct","partialFillCheck","response","numeratorCheck","getCorrectness","question","env","mode","getOutComeScore","correctness","outcome","session","Promise","resolve","isEmpty","score","empty","undefined","completed","correctNumerator","responseNumerator","i","length","value","partialModelCount","forEach","selection","createDefaultModel","defaults","correctInfo","out","view","Object","assign","createCorrectResponseSession","role","noOfModel","id","validate","errors"],"mappings":";;AAAe,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE;AACzD,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE;AAClB,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE;AACpC,MAAM,KAAK,EAAE,KAAK;AAClB,MAAM,UAAU,EAAE,IAAI;AACtB,MAAM,YAAY,EAAE,IAAI;AACxB,MAAM,QAAQ,EAAE,IAAI;AACpB,KAAK,CAAC,CAAC;AACP,GAAG,MAAM;AACT,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AACrB,GAAG;AACH;AACA,EAAE,OAAO,GAAG,CAAC;AACb;;ACbA;AACA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,eAAe,EAAE,EADZ;AAELC,IAAAA,KAAK,EAAE,EAFF;AAGLC,IAAAA,MAAM,EAAE,EAHH;AAILC,IAAAA,iBAAiB,EAAE,KAJd;AAKLC,IAAAA,gBAAgB,EAAE,CALb;AAMLC,IAAAA,aAAa,EAAE,CANV;AAOLC,IAAAA,oBAAoB,EAAE,KAPjB;AAQLC,IAAAA,eAAe,EAAE,KAAA;AARZ,GAAA;AADM,CAAf;;;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