@pie-element/math-templated 2.17.1-next.9 → 2.18.1-next.16
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 +11 -0
- package/configure/CHANGELOG.md +11 -0
- package/configure/lib/design.js +2 -1
- package/configure/lib/design.js.map +1 -1
- package/configure/lib/response.js +2 -1
- package/configure/lib/response.js.map +1 -1
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +11 -0
- package/controller/lib/index.js +2 -4
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +2 -2
- package/docs/config-schema.json +1205 -59
- package/docs/config-schema.json.md +874 -29
- package/docs/pie-schema.json +758 -7
- package/docs/pie-schema.json.md +552 -7
- package/module/configure.js +13 -8
- package/module/controller.js +4 -4
- package/module/element.js +13 -8
- package/module/index.html +1 -1
- package/module/manifest.json +1 -1
- package/module/print.html +1 -1
- package/module/print.js +13 -8
- package/package.json +3 -3
package/docs/pie-schema.json.md
CHANGED
|
@@ -1,29 +1,180 @@
|
|
|
1
|
-
|
|
1
|
+
Model for the @pie-elements/math-templated
|
|
2
2
|
|
|
3
3
|
The schema defines the following properties:
|
|
4
4
|
|
|
5
|
+
# `markup` (string, required)
|
|
6
|
+
|
|
7
|
+
Indicates markup value
|
|
8
|
+
|
|
5
9
|
# `prompt` (string, required)
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
Indicates prompt value
|
|
8
12
|
|
|
9
|
-
# `promptEnabled` (boolean)
|
|
13
|
+
# `promptEnabled` (boolean, required)
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Indicates if Prompt is enabled
|
|
12
16
|
|
|
13
|
-
# `
|
|
17
|
+
# `teacherInstructionsEnabled` (boolean, required)
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
Indicates if Teacher Instructions are enabled
|
|
20
|
+
|
|
21
|
+
# `rationale` (string, required)
|
|
22
|
+
|
|
23
|
+
Indicates rationale value
|
|
24
|
+
|
|
25
|
+
# `rationaleEnabled` (boolean, required)
|
|
26
|
+
|
|
27
|
+
Indicates if Rationale is enabled
|
|
28
|
+
|
|
29
|
+
# `spellCheckEnabled` (boolean, required)
|
|
30
|
+
|
|
31
|
+
Indicates if Spell Check is enabled
|
|
32
|
+
|
|
33
|
+
# `playerSpellCheckEnabled` (boolean, required)
|
|
34
|
+
|
|
35
|
+
Indicates if Player Spell Check is enabled
|
|
36
|
+
|
|
37
|
+
# `responses` (array, required)
|
|
38
|
+
|
|
39
|
+
Array of all responses
|
|
40
|
+
|
|
41
|
+
The object is an array with all elements of the type `object`.
|
|
42
|
+
|
|
43
|
+
The array object has the following properties:
|
|
44
|
+
|
|
45
|
+
## `allowTrailingZeros` (boolean, required)
|
|
46
|
+
|
|
47
|
+
Indicates the allowance of trailing zeros in expressions
|
|
48
|
+
|
|
49
|
+
Default: `"is false"`
|
|
50
|
+
|
|
51
|
+
## `answer` (string, required)
|
|
52
|
+
|
|
53
|
+
The value for the response's answer
|
|
54
|
+
|
|
55
|
+
## `id` (string, required)
|
|
56
|
+
|
|
57
|
+
The id for the response
|
|
58
|
+
|
|
59
|
+
## `validation` (string, enum, required)
|
|
60
|
+
|
|
61
|
+
Indicates what type of validation should be applied on the response
|
|
62
|
+
|
|
63
|
+
This element must be one of the following enum values:
|
|
64
|
+
|
|
65
|
+
* `literal`
|
|
66
|
+
* `symbolic`
|
|
67
|
+
|
|
68
|
+
Default: `"is literal"`
|
|
69
|
+
|
|
70
|
+
## `ignoreOrder` (boolean, required)
|
|
71
|
+
|
|
72
|
+
Indicates if the order of expression elements in literal validation can be ignore
|
|
73
|
+
|
|
74
|
+
Default: `"is false"`
|
|
75
|
+
|
|
76
|
+
## `alternates` (object, required)
|
|
77
|
+
|
|
78
|
+
For validation type = literal, alternates represents
|
|
79
|
+
an object with some alternatives for the correct answers
|
|
16
80
|
|
|
17
81
|
# `element` (string, required)
|
|
18
82
|
|
|
19
83
|
The html Element tag name
|
|
20
84
|
|
|
85
|
+
# `equationEditor` (, enum, required)
|
|
86
|
+
|
|
87
|
+
Indicates what type of editor should be displayed for all the possible responses
|
|
88
|
+
1 for Grade 1 - 2
|
|
89
|
+
3 for Grade 3 - 5
|
|
90
|
+
6 for Grade 6 - 7
|
|
91
|
+
8 for Grade 8 - HS
|
|
92
|
+
non-negative-integers
|
|
93
|
+
integers
|
|
94
|
+
decimals
|
|
95
|
+
fractions
|
|
96
|
+
geometry
|
|
97
|
+
advanced-algebra
|
|
98
|
+
statistics
|
|
99
|
+
|
|
100
|
+
This element must be one of the following enum values:
|
|
101
|
+
|
|
102
|
+
* `1`
|
|
103
|
+
* `3`
|
|
104
|
+
* `6`
|
|
105
|
+
* `8`
|
|
106
|
+
* `advanced-algebra`
|
|
107
|
+
* `decimals`
|
|
108
|
+
* `fractions`
|
|
109
|
+
* `geometry`
|
|
110
|
+
* `integers`
|
|
111
|
+
* `item-authoring`
|
|
112
|
+
* `non-negative-integers`
|
|
113
|
+
* `statistics`
|
|
114
|
+
|
|
115
|
+
Default: `"- item-authoring"`
|
|
116
|
+
|
|
117
|
+
# `ignoreOrderDefault` (boolean, required)
|
|
118
|
+
|
|
119
|
+
Indicates the default value for ignoreOrder, in case that it's not set
|
|
120
|
+
|
|
121
|
+
Default: `"is false"`
|
|
122
|
+
|
|
123
|
+
# `allowTrailingZerosDefault` (boolean, required)
|
|
124
|
+
|
|
125
|
+
Indicates the default value for allowTrailingZeros, in case that it's not set
|
|
126
|
+
|
|
127
|
+
Default: `"is false"`
|
|
128
|
+
|
|
129
|
+
# `toolbarEditorPosition` (string, enum)
|
|
130
|
+
|
|
131
|
+
Indicates the editor's toolbar position which can be 'bottom' or 'top'
|
|
132
|
+
|
|
133
|
+
This element must be one of the following enum values:
|
|
134
|
+
|
|
135
|
+
* `bottom`
|
|
136
|
+
* `top`
|
|
137
|
+
|
|
138
|
+
Default: `": 'bottom'"`
|
|
139
|
+
|
|
140
|
+
# `validationDefault` (string, enum, required)
|
|
141
|
+
|
|
142
|
+
Indicates what type of validation should be applied on the response
|
|
143
|
+
|
|
144
|
+
This element must be one of the following enum values:
|
|
145
|
+
|
|
146
|
+
* `literal`
|
|
147
|
+
* `symbolic`
|
|
148
|
+
|
|
149
|
+
Default: `"is literal"`
|
|
150
|
+
|
|
151
|
+
# `id` (string, required)
|
|
152
|
+
|
|
153
|
+
Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
|
|
154
|
+
|
|
21
155
|
---
|
|
22
156
|
|
|
23
157
|
# Sub Schemas
|
|
24
158
|
|
|
25
159
|
The schema defines the following additional types:
|
|
26
160
|
|
|
161
|
+
## `ConfigurePropWithEnabled` (object)
|
|
162
|
+
|
|
163
|
+
Properties of the `ConfigurePropWithEnabled` object:
|
|
164
|
+
|
|
165
|
+
### `enabled` (boolean)
|
|
166
|
+
|
|
167
|
+
Indicates the value of the item if it affects config-ui
|
|
168
|
+
(eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
|
|
169
|
+
|
|
170
|
+
### `settings` (boolean)
|
|
171
|
+
|
|
172
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
173
|
+
|
|
174
|
+
### `label` (string)
|
|
175
|
+
|
|
176
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
177
|
+
|
|
27
178
|
## `ConfigureProp` (object)
|
|
28
179
|
|
|
29
180
|
Properties of the `ConfigureProp` object:
|
|
@@ -34,4 +185,398 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
34
185
|
|
|
35
186
|
### `label` (string)
|
|
36
187
|
|
|
37
|
-
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
188
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
189
|
+
|
|
190
|
+
## `EditableHtmlConfigureProp` (object)
|
|
191
|
+
|
|
192
|
+
Properties of the `EditableHtmlConfigureProp` object:
|
|
193
|
+
|
|
194
|
+
### `math` (object)
|
|
195
|
+
|
|
196
|
+
Properties of the `math` object:
|
|
197
|
+
|
|
198
|
+
#### `disabled` (boolean)
|
|
199
|
+
|
|
200
|
+
Indicates if the plugin is disabled or not
|
|
201
|
+
|
|
202
|
+
### `audio` (object)
|
|
203
|
+
|
|
204
|
+
Properties of the `audio` object:
|
|
205
|
+
|
|
206
|
+
#### `disabled` (boolean)
|
|
207
|
+
|
|
208
|
+
Indicates if the plugin is disabled or not
|
|
209
|
+
|
|
210
|
+
### `video` (object)
|
|
211
|
+
|
|
212
|
+
Properties of the `video` object:
|
|
213
|
+
|
|
214
|
+
#### `disabled` (boolean)
|
|
215
|
+
|
|
216
|
+
Indicates if the plugin is disabled or not
|
|
217
|
+
|
|
218
|
+
### `image` (object)
|
|
219
|
+
|
|
220
|
+
Properties of the `image` object:
|
|
221
|
+
|
|
222
|
+
#### `disabled` (boolean)
|
|
223
|
+
|
|
224
|
+
Indicates if the plugin is disabled or not
|
|
225
|
+
|
|
226
|
+
### `customPlugins` (array)
|
|
227
|
+
|
|
228
|
+
An array of objects that determine custom plugins.
|
|
229
|
+
A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when button gets pressed (event).
|
|
230
|
+
Example can be found at https://github.com/pie-framework/pie-lib/blob/develop/packages/demo/pages/editable-html.js#L425.
|
|
231
|
+
|
|
232
|
+
The object is an array with all elements of the type `object`.
|
|
233
|
+
|
|
234
|
+
The array object has the following properties:
|
|
235
|
+
|
|
236
|
+
#### `event` (string, required)
|
|
237
|
+
|
|
238
|
+
The name of the custom event. It needs to be valid (only letters, numbers and "_" can be used).
|
|
239
|
+
PIE will emit the event prefixed with "PIE-".
|
|
240
|
+
Eg: event = 'client_custom_event_A' => the emitted event will be "PIE-client_custom_event_A"
|
|
241
|
+
|
|
242
|
+
#### `iconAlt` (string, required)
|
|
243
|
+
|
|
244
|
+
The alt for the custom button icon
|
|
245
|
+
|
|
246
|
+
#### `iconType` (string, required)
|
|
247
|
+
|
|
248
|
+
The icon type.
|
|
249
|
+
Currently, only "SVG" is supported.
|
|
250
|
+
|
|
251
|
+
#### `icon` (string, required)
|
|
252
|
+
|
|
253
|
+
The icon string. Currently, only "SVG" is supported, so it needs to be a valid svg.
|
|
254
|
+
|
|
255
|
+
### `blockquote` (object)
|
|
256
|
+
|
|
257
|
+
Properties of the `blockquote` object:
|
|
258
|
+
|
|
259
|
+
#### `disabled` (boolean)
|
|
260
|
+
|
|
261
|
+
Indicates if the plugin is disabled or not
|
|
262
|
+
|
|
263
|
+
### `h3` (object)
|
|
264
|
+
|
|
265
|
+
Properties of the `h3` object:
|
|
266
|
+
|
|
267
|
+
#### `disabled` (boolean)
|
|
268
|
+
|
|
269
|
+
Indicates if the plugin is disabled or not
|
|
270
|
+
|
|
271
|
+
## `EditableHtmlButtonConfigure` (object)
|
|
272
|
+
|
|
273
|
+
Properties of the `EditableHtmlButtonConfigure` object:
|
|
274
|
+
|
|
275
|
+
### `disabled` (boolean)
|
|
276
|
+
|
|
277
|
+
Indicates if the plugin is disabled or not
|
|
278
|
+
|
|
279
|
+
## `CustomPlugin` (object)
|
|
280
|
+
|
|
281
|
+
Properties of the `CustomPlugin` object:
|
|
282
|
+
|
|
283
|
+
### `event` (string, required)
|
|
284
|
+
|
|
285
|
+
The name of the custom event. It needs to be valid (only letters, numbers and "_" can be used).
|
|
286
|
+
PIE will emit the event prefixed with "PIE-".
|
|
287
|
+
Eg: event = 'client_custom_event_A' => the emitted event will be "PIE-client_custom_event_A"
|
|
288
|
+
|
|
289
|
+
### `iconAlt` (string, required)
|
|
290
|
+
|
|
291
|
+
The alt for the custom button icon
|
|
292
|
+
|
|
293
|
+
### `iconType` (string, required)
|
|
294
|
+
|
|
295
|
+
The icon type.
|
|
296
|
+
Currently, only "SVG" is supported.
|
|
297
|
+
|
|
298
|
+
### `icon` (string, required)
|
|
299
|
+
|
|
300
|
+
The icon string. Currently, only "SVG" is supported, so it needs to be a valid svg.
|
|
301
|
+
|
|
302
|
+
## `EditableHtmlPluginConfigureRequired` (object)
|
|
303
|
+
|
|
304
|
+
Properties of the `EditableHtmlPluginConfigureRequired` object:
|
|
305
|
+
|
|
306
|
+
### `inputConfiguration` (object)
|
|
307
|
+
|
|
308
|
+
Properties of the `inputConfiguration` object:
|
|
309
|
+
|
|
310
|
+
#### `math` (object)
|
|
311
|
+
|
|
312
|
+
Properties of the `math` object:
|
|
313
|
+
|
|
314
|
+
##### `disabled` (boolean)
|
|
315
|
+
|
|
316
|
+
Indicates if the plugin is disabled or not
|
|
317
|
+
|
|
318
|
+
#### `audio` (object)
|
|
319
|
+
|
|
320
|
+
Properties of the `audio` object:
|
|
321
|
+
|
|
322
|
+
##### `disabled` (boolean)
|
|
323
|
+
|
|
324
|
+
Indicates if the plugin is disabled or not
|
|
325
|
+
|
|
326
|
+
#### `video` (object)
|
|
327
|
+
|
|
328
|
+
Properties of the `video` object:
|
|
329
|
+
|
|
330
|
+
##### `disabled` (boolean)
|
|
331
|
+
|
|
332
|
+
Indicates if the plugin is disabled or not
|
|
333
|
+
|
|
334
|
+
#### `image` (object)
|
|
335
|
+
|
|
336
|
+
Properties of the `image` object:
|
|
337
|
+
|
|
338
|
+
##### `disabled` (boolean)
|
|
339
|
+
|
|
340
|
+
Indicates if the plugin is disabled or not
|
|
341
|
+
|
|
342
|
+
#### `customPlugins` (array)
|
|
343
|
+
|
|
344
|
+
An array of objects that determine custom plugins.
|
|
345
|
+
A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when button gets pressed (event).
|
|
346
|
+
Example can be found at https://github.com/pie-framework/pie-lib/blob/develop/packages/demo/pages/editable-html.js#L425.
|
|
347
|
+
|
|
348
|
+
The object is an array with all elements of the type `object`.
|
|
349
|
+
|
|
350
|
+
The array object has the following properties:
|
|
351
|
+
|
|
352
|
+
##### `event` (string, required)
|
|
353
|
+
|
|
354
|
+
The name of the custom event. It needs to be valid (only letters, numbers and "_" can be used).
|
|
355
|
+
PIE will emit the event prefixed with "PIE-".
|
|
356
|
+
Eg: event = 'client_custom_event_A' => the emitted event will be "PIE-client_custom_event_A"
|
|
357
|
+
|
|
358
|
+
##### `iconAlt` (string, required)
|
|
359
|
+
|
|
360
|
+
The alt for the custom button icon
|
|
361
|
+
|
|
362
|
+
##### `iconType` (string, required)
|
|
363
|
+
|
|
364
|
+
The icon type.
|
|
365
|
+
Currently, only "SVG" is supported.
|
|
366
|
+
|
|
367
|
+
##### `icon` (string, required)
|
|
368
|
+
|
|
369
|
+
The icon string. Currently, only "SVG" is supported, so it needs to be a valid svg.
|
|
370
|
+
|
|
371
|
+
#### `blockquote` (object)
|
|
372
|
+
|
|
373
|
+
Properties of the `blockquote` object:
|
|
374
|
+
|
|
375
|
+
##### `disabled` (boolean)
|
|
376
|
+
|
|
377
|
+
Indicates if the plugin is disabled or not
|
|
378
|
+
|
|
379
|
+
#### `h3` (object)
|
|
380
|
+
|
|
381
|
+
Properties of the `h3` object:
|
|
382
|
+
|
|
383
|
+
##### `disabled` (boolean)
|
|
384
|
+
|
|
385
|
+
Indicates if the plugin is disabled or not
|
|
386
|
+
|
|
387
|
+
### `required` (boolean)
|
|
388
|
+
|
|
389
|
+
Indicates if the item is required and the value cannot be empty
|
|
390
|
+
|
|
391
|
+
### `settings` (boolean)
|
|
392
|
+
|
|
393
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
394
|
+
|
|
395
|
+
### `label` (string)
|
|
396
|
+
|
|
397
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
398
|
+
|
|
399
|
+
## `EditableHtmlPluginConfigure` (object)
|
|
400
|
+
|
|
401
|
+
Properties of the `EditableHtmlPluginConfigure` object:
|
|
402
|
+
|
|
403
|
+
### `inputConfiguration` (object)
|
|
404
|
+
|
|
405
|
+
Properties of the `inputConfiguration` object:
|
|
406
|
+
|
|
407
|
+
#### `math` (object)
|
|
408
|
+
|
|
409
|
+
Properties of the `math` object:
|
|
410
|
+
|
|
411
|
+
##### `disabled` (boolean)
|
|
412
|
+
|
|
413
|
+
Indicates if the plugin is disabled or not
|
|
414
|
+
|
|
415
|
+
#### `audio` (object)
|
|
416
|
+
|
|
417
|
+
Properties of the `audio` object:
|
|
418
|
+
|
|
419
|
+
##### `disabled` (boolean)
|
|
420
|
+
|
|
421
|
+
Indicates if the plugin is disabled or not
|
|
422
|
+
|
|
423
|
+
#### `video` (object)
|
|
424
|
+
|
|
425
|
+
Properties of the `video` object:
|
|
426
|
+
|
|
427
|
+
##### `disabled` (boolean)
|
|
428
|
+
|
|
429
|
+
Indicates if the plugin is disabled or not
|
|
430
|
+
|
|
431
|
+
#### `image` (object)
|
|
432
|
+
|
|
433
|
+
Properties of the `image` object:
|
|
434
|
+
|
|
435
|
+
##### `disabled` (boolean)
|
|
436
|
+
|
|
437
|
+
Indicates if the plugin is disabled or not
|
|
438
|
+
|
|
439
|
+
#### `customPlugins` (array)
|
|
440
|
+
|
|
441
|
+
An array of objects that determine custom plugins.
|
|
442
|
+
A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when button gets pressed (event).
|
|
443
|
+
Example can be found at https://github.com/pie-framework/pie-lib/blob/develop/packages/demo/pages/editable-html.js#L425.
|
|
444
|
+
|
|
445
|
+
The object is an array with all elements of the type `object`.
|
|
446
|
+
|
|
447
|
+
The array object has the following properties:
|
|
448
|
+
|
|
449
|
+
##### `event` (string, required)
|
|
450
|
+
|
|
451
|
+
The name of the custom event. It needs to be valid (only letters, numbers and "_" can be used).
|
|
452
|
+
PIE will emit the event prefixed with "PIE-".
|
|
453
|
+
Eg: event = 'client_custom_event_A' => the emitted event will be "PIE-client_custom_event_A"
|
|
454
|
+
|
|
455
|
+
##### `iconAlt` (string, required)
|
|
456
|
+
|
|
457
|
+
The alt for the custom button icon
|
|
458
|
+
|
|
459
|
+
##### `iconType` (string, required)
|
|
460
|
+
|
|
461
|
+
The icon type.
|
|
462
|
+
Currently, only "SVG" is supported.
|
|
463
|
+
|
|
464
|
+
##### `icon` (string, required)
|
|
465
|
+
|
|
466
|
+
The icon string. Currently, only "SVG" is supported, so it needs to be a valid svg.
|
|
467
|
+
|
|
468
|
+
#### `blockquote` (object)
|
|
469
|
+
|
|
470
|
+
Properties of the `blockquote` object:
|
|
471
|
+
|
|
472
|
+
##### `disabled` (boolean)
|
|
473
|
+
|
|
474
|
+
Indicates if the plugin is disabled or not
|
|
475
|
+
|
|
476
|
+
#### `h3` (object)
|
|
477
|
+
|
|
478
|
+
Properties of the `h3` object:
|
|
479
|
+
|
|
480
|
+
##### `disabled` (boolean)
|
|
481
|
+
|
|
482
|
+
Indicates if the plugin is disabled or not
|
|
483
|
+
|
|
484
|
+
### `settings` (boolean)
|
|
485
|
+
|
|
486
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
487
|
+
|
|
488
|
+
### `label` (string)
|
|
489
|
+
|
|
490
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
491
|
+
|
|
492
|
+
## `ConfigureMaxImageDimensionsProp` (object)
|
|
493
|
+
|
|
494
|
+
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
495
|
+
|
|
496
|
+
### `teacherInstructions` (number)
|
|
497
|
+
|
|
498
|
+
Indicates the max dimension for images in teacher instructions
|
|
499
|
+
|
|
500
|
+
### `prompt` (number)
|
|
501
|
+
|
|
502
|
+
Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
|
|
503
|
+
|
|
504
|
+
### `rationale` (number)
|
|
505
|
+
|
|
506
|
+
Indicates the max dimension for images in rationale
|
|
507
|
+
|
|
508
|
+
## `ConfigureMathMLProp` (object)
|
|
509
|
+
|
|
510
|
+
Properties of the `ConfigureMathMLProp` object:
|
|
511
|
+
|
|
512
|
+
### `mmlOutput` (number)
|
|
513
|
+
|
|
514
|
+
Indicates if model should have mathML output instead of latex
|
|
515
|
+
|
|
516
|
+
### `mmlEditing` (number)
|
|
517
|
+
|
|
518
|
+
Indicates if mathML that's already in model should be editable
|
|
519
|
+
|
|
520
|
+
## `ConfigureLanguageOptionsProp` (object)
|
|
521
|
+
|
|
522
|
+
Properties of the `ConfigureLanguageOptionsProp` object:
|
|
523
|
+
|
|
524
|
+
### `value` (string, required)
|
|
525
|
+
|
|
526
|
+
Value of the language option
|
|
527
|
+
|
|
528
|
+
### `label` (string, required)
|
|
529
|
+
|
|
530
|
+
Label of the language option
|
|
531
|
+
|
|
532
|
+
## `Response` (object)
|
|
533
|
+
|
|
534
|
+
Properties of the `Response` object:
|
|
535
|
+
|
|
536
|
+
### `allowTrailingZeros` (boolean, required)
|
|
537
|
+
|
|
538
|
+
Indicates the allowance of trailing zeros in expressions
|
|
539
|
+
|
|
540
|
+
Default: `"is false"`
|
|
541
|
+
|
|
542
|
+
### `answer` (string, required)
|
|
543
|
+
|
|
544
|
+
The value for the response's answer
|
|
545
|
+
|
|
546
|
+
### `id` (string, required)
|
|
547
|
+
|
|
548
|
+
The id for the response
|
|
549
|
+
|
|
550
|
+
### `validation` (string, enum, required)
|
|
551
|
+
|
|
552
|
+
Indicates what type of validation should be applied on the response
|
|
553
|
+
|
|
554
|
+
This element must be one of the following enum values:
|
|
555
|
+
|
|
556
|
+
* `literal`
|
|
557
|
+
* `symbolic`
|
|
558
|
+
|
|
559
|
+
Default: `"is literal"`
|
|
560
|
+
|
|
561
|
+
### `ignoreOrder` (boolean, required)
|
|
562
|
+
|
|
563
|
+
Indicates if the order of expression elements in literal validation can be ignore
|
|
564
|
+
|
|
565
|
+
Default: `"is false"`
|
|
566
|
+
|
|
567
|
+
### `alternates` (object, required)
|
|
568
|
+
|
|
569
|
+
For validation type = literal, alternates represents
|
|
570
|
+
an object with some alternatives for the correct answers
|
|
571
|
+
|
|
572
|
+
## `Alternate` (object)
|
|
573
|
+
|
|
574
|
+
Properties of the `Alternate` object:
|
|
575
|
+
|
|
576
|
+
### `id` (number, required)
|
|
577
|
+
|
|
578
|
+
The id for the alternative response
|
|
579
|
+
|
|
580
|
+
### `answer` (string, required)
|
|
581
|
+
|
|
582
|
+
The value for the alternative response
|
package/module/configure.js
CHANGED
|
@@ -97797,7 +97797,7 @@ var bundle_min = {
|
|
|
97797
97797
|
const {name: e, children: t} = this._mathmlElement, r = t.length;
|
|
97798
97798
|
if (2 !== r) throw new n.InvalidNumberOfChildrenError(e, 2, r);
|
|
97799
97799
|
const o = (0, a.mathMLElementToLaTeXConverter)(t[0]).convert(), i = (0, a.mathMLElementToLaTeXConverter)(t[1]).convert();
|
|
97800
|
-
return "log" === o ? `\\${o}_${new a.BracketWrapper().wrap(i)}` : `${
|
|
97800
|
+
return "log" === o ? `\\${o}_${new a.BracketWrapper().wrap(i)}` : `${o}_${new a.BracketWrapper().wrap(i)}`;
|
|
97801
97801
|
}
|
|
97802
97802
|
};
|
|
97803
97803
|
},
|
|
@@ -97834,7 +97834,7 @@ var bundle_min = {
|
|
|
97834
97834
|
const {name: e, children: t} = this._mathmlElement, r = t.length;
|
|
97835
97835
|
if (2 !== r) throw new n.InvalidNumberOfChildrenError(e, 2, r);
|
|
97836
97836
|
const o = (0, a.mathMLElementToLaTeXConverter)(t[0]).convert(), i = (0, a.mathMLElementToLaTeXConverter)(t[1]).convert();
|
|
97837
|
-
return "'"
|
|
97837
|
+
return ["'", "″"].indexOf(i) ? `${o}${i}` : `${o}^${new a.BracketWrapper().wrap(i)}`;
|
|
97838
97838
|
}
|
|
97839
97839
|
};
|
|
97840
97840
|
},
|
|
@@ -98934,6 +98934,7 @@ var bundle_min = {
|
|
|
98934
98934
|
"❘": "|",
|
|
98935
98935
|
"▲": "\\bigtriangleup",
|
|
98936
98936
|
"⋿": "\\Epsilon",
|
|
98937
|
+
"◻": "\\square",
|
|
98937
98938
|
"⋾": "\\overline{\\ni}",
|
|
98938
98939
|
"⋽": "\\overline{\\ni}",
|
|
98939
98940
|
"⋼": "\\in",
|
|
@@ -99158,7 +99159,7 @@ var bundle_min = {
|
|
|
99158
99159
|
"≅": "\\cong",
|
|
99159
99160
|
"≄": "\\not\\simeq",
|
|
99160
99161
|
"≃": "\\simeq",
|
|
99161
|
-
"≁": "\\
|
|
99162
|
+
"≁": "\\nsim",
|
|
99162
99163
|
"∦": "\\not\\parallel",
|
|
99163
99164
|
"∥": "\\parallel",
|
|
99164
99165
|
"∤": "\\not|",
|
|
@@ -99176,7 +99177,7 @@ var bundle_min = {
|
|
|
99176
99177
|
"≠": "\\neq",
|
|
99177
99178
|
"≢": "\\equiv /",
|
|
99178
99179
|
"≉": "\\approx /",
|
|
99179
|
-
"∼": "sim",
|
|
99180
|
+
"∼": "\\sim",
|
|
99180
99181
|
"≈": "\\approx",
|
|
99181
99182
|
"≮": "</",
|
|
99182
99183
|
"<": "<",
|
|
@@ -100028,7 +100029,7 @@ var bundle_min = {
|
|
|
100028
100029
|
"⨩": "",
|
|
100029
100030
|
"⨨": "",
|
|
100030
100031
|
"⨧": "",
|
|
100031
|
-
"◻": "\\
|
|
100032
|
+
"◻": "\\square",
|
|
100032
100033
|
"⨦": "\\underset{\\sim}{+}",
|
|
100033
100034
|
"⨥": "\\underset{\\circ}{+}",
|
|
100034
100035
|
"⨤": "\\overset{\\sim}{+}",
|
|
@@ -100353,7 +100354,7 @@ var bundle_min = {
|
|
|
100353
100354
|
"≅": "\\cong",
|
|
100354
100355
|
"≄": "\\not\\simeq",
|
|
100355
100356
|
"≃": "\\simeq",
|
|
100356
|
-
"≁": "\\
|
|
100357
|
+
"≁": "\\nsim",
|
|
100357
100358
|
"∦": "\\not\\parallel",
|
|
100358
100359
|
"∥": "\\parallel",
|
|
100359
100360
|
"∤": "\\not|",
|
|
@@ -100369,7 +100370,7 @@ var bundle_min = {
|
|
|
100369
100370
|
"≠": "\\neq",
|
|
100370
100371
|
"≢": "\\equiv /",
|
|
100371
100372
|
"≉": "\\approx /",
|
|
100372
|
-
"∼": "sim",
|
|
100373
|
+
"∼": "\\sim",
|
|
100373
100374
|
"≈": "\\approx",
|
|
100374
100375
|
"≮": "</",
|
|
100375
100376
|
"<": "<",
|
|
@@ -100553,6 +100554,8 @@ var bundle_min = {
|
|
|
100553
100554
|
"⋮": "\\vdots",
|
|
100554
100555
|
"∵": "\\because",
|
|
100555
100556
|
"∴": "\\therefore",
|
|
100557
|
+
"∼": "\\sim",
|
|
100558
|
+
"≁": "\\nsim",
|
|
100556
100559
|
"ℵ": "\\aleph",
|
|
100557
100560
|
"∅": "\\oslash",
|
|
100558
100561
|
"±": "\\pm",
|
|
@@ -100612,6 +100615,7 @@ var bundle_min = {
|
|
|
100612
100615
|
"η": "\\eta",
|
|
100613
100616
|
"ζ": "\\zeta",
|
|
100614
100617
|
"ɛ": "\\varepsilon",
|
|
100618
|
+
"◻": "\\square",
|
|
100615
100619
|
"ε": "\\epsilon",
|
|
100616
100620
|
"Δ": "\\Delta",
|
|
100617
100621
|
"δ": "\\delta",
|
|
@@ -100980,7 +100984,8 @@ var bundle_min = {
|
|
|
100980
100984
|
"〉": "\\rangle",
|
|
100981
100985
|
"▫": "\\square",
|
|
100982
100986
|
"●": "\\circle",
|
|
100983
|
-
"”": '\\"'
|
|
100987
|
+
"”": '\\"',
|
|
100988
|
+
"◻": "\\square"
|
|
100984
100989
|
});
|
|
100985
100990
|
},
|
|
100986
100991
|
2408: function (e, t, r) {
|
package/module/controller.js
CHANGED
|
@@ -22792,6 +22792,8 @@ var _controllerUtils = controllerUtils;
|
|
|
22792
22792
|
}(controllerUtils$1));
|
|
22793
22793
|
|
|
22794
22794
|
const { translator } = Translator;
|
|
22795
|
+
|
|
22796
|
+
const getFeedback = value => value ? 'correct' : 'incorrect';
|
|
22795
22797
|
const getContent = (html) => (html || '').replace(/(<(?!img|iframe)([^>]+)>)/gi, '');
|
|
22796
22798
|
|
|
22797
22799
|
const getIsAnswerCorrect = (correctResponse, answerItem) => {
|
|
@@ -22838,7 +22840,6 @@ const getResponseCorrectness = (question, sessionResponse) => {
|
|
|
22838
22840
|
} else {
|
|
22839
22841
|
let correctAnswers = 0;
|
|
22840
22842
|
let score = 0;
|
|
22841
|
-
let correct = false;
|
|
22842
22843
|
const correctResponsesCount = Object.keys(correctResponses || {}).length;
|
|
22843
22844
|
|
|
22844
22845
|
Object.keys(correctResponses).forEach((responseId) => {
|
|
@@ -22858,9 +22859,9 @@ const getResponseCorrectness = (question, sessionResponse) => {
|
|
|
22858
22859
|
score = (correctAnswers / Object.keys(correctResponses).length).toFixed(2);
|
|
22859
22860
|
|
|
22860
22861
|
return {
|
|
22861
|
-
correctness: fullyCorrect
|
|
22862
|
+
correctness: getFeedback(fullyCorrect),
|
|
22862
22863
|
score: correctAnswers > 0 ? score : 0,
|
|
22863
|
-
correct
|
|
22864
|
+
correct: fullyCorrect
|
|
22864
22865
|
};
|
|
22865
22866
|
}
|
|
22866
22867
|
};
|
|
@@ -22888,7 +22889,6 @@ const outcome = (question, session, env) =>
|
|
|
22888
22889
|
resolve({ score: 0, empty: true });
|
|
22889
22890
|
}
|
|
22890
22891
|
const partialScoringEnabled = controllerUtils$1.partialScoring.enabled(question, env);
|
|
22891
|
-
console.log('partialScoringEnabled: ', partialScoringEnabled);
|
|
22892
22892
|
session = normalizeSession(session);
|
|
22893
22893
|
|
|
22894
22894
|
if (env.mode !== 'evaluate') {
|