forked from h5p/h5p-drag-question
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsemantics.json
595 lines (595 loc) · 17.2 KB
/
semantics.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
[
{
"name": "scoreShow",
"type": "text",
"label": "Check answer button",
"importance": "low",
"default": "Check",
"common": true
},
{
"name": "tryAgain",
"type": "text",
"label": "Retry button",
"importance": "low",
"default": "Retry",
"common": true,
"optional": true
},
{
"label": "Score explanation text",
"importance": "low",
"name": "scoreExplanation",
"type": "text",
"default": "Correct answers give +1 point. Incorrect answers give -1 point. The lowest possible score is 0.",
"common": true,
"optional": true
},
{
"name": "question",
"importance": "high",
"type": "group",
"widget": "wizard",
"fields": [
{
"name": "settings",
"type": "group",
"label": "Settings",
"importance": "high",
"fields": [
{
"name": "background",
"type": "image",
"label": "Background image",
"importance": "low",
"optional": true,
"description": "Optional. Select an image to use as background for your drag and drop task."
},
{
"name": "size",
"type": "group",
"widget": "dimensions",
"label": "Task size",
"importance": "low",
"description": "Specify how large (in px) the play area should be.",
"default": {
"width": 620,
"height": 310,
"field": "background"
},
"fields": [
{
"name": "width",
"type": "number"
},
{
"name": "height",
"type": "number"
}
]
}
]
},
{
"name": "task",
"type": "group",
"widget": "dragQuestion",
"label": "Task",
"importance": "high",
"description": "Start by placing your drop zones.<br/>Next, place your droppable elements and check off the appropriate drop zones.<br/>Last, edit your drop zone again and check off the correct answers.",
"fields": [
{
"name": "elements",
"type": "list",
"label": "Elements",
"importance": "high",
"entity": "element",
"field": {
"type": "group",
"label": "Element",
"importance": "high",
"fields": [
{
"name": "type",
"type": "library",
"description": "Choose the type of content you would like to add.",
"importance": "medium",
"options": [
"H5P.AdvancedText 1.1",
"H5P.Image 1.1"
]
},
{
"name": "x",
"type": "number",
"widget": "none"
},
{
"name": "y",
"type": "number",
"widget": "none"
},
{
"name": "height",
"type": "number",
"widget": "none"
},
{
"name": "width",
"type": "number",
"widget": "none"
},
{
"name": "dropZones",
"type": "select",
"widget": "dynamicCheckboxes",
"label": "Select drop zones",
"importance": "high",
"multiple": true
},
{
"name": "backgroundOpacity",
"type": "number",
"label": "Background Opacity",
"importance": "low",
"min": 0,
"max": 100,
"step": 5,
"default": 100,
"optional": true
},
{
"name": "multiple",
"type": "boolean",
"label": "Infinite number of element instances",
"importance": "low",
"description": "Clones this element so that it can be dragged to multiple drop zones.",
"default": false
}
]
}
},
{
"name": "dropZones",
"type": "list",
"label": "Drop Zones",
"importance": "high",
"entity": "Drop Zone",
"field": {
"type": "group",
"label": "Drop Zone",
"importance": "high",
"fields": [
{
"name": "label",
"type": "text",
"widget": "html",
"label": "Label",
"importance": "medium",
"enterMode": "div",
"tags": [
"strong",
"em",
"del",
"code"
]
},
{
"name": "showLabel",
"type": "boolean",
"label": "Show label",
"importance": "low"
},
{
"name": "x",
"type": "number",
"widget": "none"
},
{
"name": "y",
"type": "number",
"widget": "none"
},
{
"name": "height",
"type": "number",
"widget": "none"
},
{
"name": "width",
"type": "number",
"widget": "none"
},
{
"name": "correctElements",
"type": "select",
"widget": "dynamicCheckboxes",
"label": "Select correct elements",
"importance": "low",
"multiple": true
},
{
"name": "backgroundOpacity",
"type": "number",
"label": "Background Opacity",
"importance": "low",
"min": 0,
"max": 100,
"step": 5,
"default": 100,
"optional": true
},
{
"name": "tipsAndFeedback",
"type": "group",
"label": "Tips and feedback",
"importance": "low",
"optional": true,
"fields": [
{
"name": "tip",
"label": "Tip text",
"importance": "low",
"type": "text",
"widget": "html",
"tags": [
"p",
"br",
"strong",
"em",
"code"
],
"optional": true
},
{
"name": "feedbackOnCorrect",
"type": "text",
"label": "Message displayed on correct match",
"importance": "low",
"description": "Message will appear below the task on \"check\" if correct droppable is matched.",
"optional": true
},
{
"name": "feedbackOnIncorrect",
"type": "text",
"label": "Message displayed on incorrect match",
"importance": "low",
"description": "Message will appear below the task on \"check\" if the match is incorrect.",
"optional": true
}
]
},
{
"name": "single",
"type": "boolean",
"label": "This drop zone can only contain one element",
"description": "Make sure there is only one correct answer for this dropzone",
"importance": "low",
"default": false
},
{
"name": "autoAlign",
"type": "boolean",
"label": "Enable Auto-Align",
"importance": "low",
"description": "Will auto-align all draggables dropped in this zone."
}
]
}
}
]
}
]
},
{
"name": "overallFeedback",
"type": "group",
"label": "Overall Feedback",
"importance": "low",
"expanded": true,
"fields": [
{
"name": "overallFeedback",
"type": "list",
"widgets": [
{
"name": "RangeList",
"label": "Default"
}
],
"importance": "high",
"label": "Define custom feedback for any score range",
"description": "Click the \"Add range\" button to add as many ranges as you need. Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!",
"entity": "range",
"min": 1,
"defaultNum": 1,
"optional": true,
"field": {
"name": "overallFeedback",
"type": "group",
"importance": "low",
"fields": [
{
"name": "from",
"type": "number",
"label": "Score Range",
"min": 0,
"max": 100,
"default": 0,
"unit": "%"
},
{
"name": "to",
"type": "number",
"min": 0,
"max": 100,
"default": 100,
"unit": "%"
},
{
"name": "feedback",
"type": "text",
"label": "Feedback for defined score range",
"importance": "low",
"placeholder": "Fill in the feedback",
"optional": true
}
]
}
}
]
},
{
"name": "behaviour",
"type": "group",
"label": "Behavioural settings",
"importance": "low",
"description": "These options will let you control how the task behaves.",
"optional": true,
"fields": [
{
"name": "enableRetry",
"type": "boolean",
"label": "Enable \"Retry\"",
"importance": "low",
"default": true
},
{
"name": "enableCheckButton",
"type": "boolean",
"label": "Enable \"Check\" button",
"widget": "none",
"importance": "low",
"default": true,
"optional": true
},
{
"label": "Require user input before the solution can be viewed",
"importance": "low",
"name": "showSolutionsRequiresInput",
"type": "boolean",
"default": true
},
{
"name": "singlePoint",
"type": "boolean",
"label": "Give one point for the whole task",
"importance": "low",
"description": "Disable to give one point for each draggable that is placed correctly.",
"default": false
},
{
"label": "Apply penalties",
"name": "applyPenalties",
"type": "boolean",
"description": "Apply penalties for elements dropped in the wrong drop zones. This must be enabled when the same element(s) are able to be dropped into multiple drop zones, or if there is only one drop-zone. If this is not enabled, learners may match all items to all drop-zones and always receive a full score.",
"default": true
},
{
"name": "enableScoreExplanation",
"type": "boolean",
"label": "Enable score explanation",
"description": "Display a score explanation to user when checking their answers (if the 'Apply penalties' option has been selected).",
"importance": "low",
"default": true,
"optional": true,
"widget": "showWhen",
"showWhen": {
"rules": [
{
"field": "singlePoint",
"equals": false
}
]
}
},
{
"name": "backgroundOpacity",
"type": "text",
"label": "Background opacity for draggables",
"importance": "low",
"description": "If this field is set, it will override opacity set on all draggable elements. This should be a number between 0 and 100, where 0 means full transparency and 100 means no transparency",
"optional": true
},
{
"name": "dropZoneHighlighting",
"type": "select",
"label": "Drop Zone Highlighting",
"importance": "low",
"description": "Choose when to highlight drop zones.",
"default": "dragging",
"options": [
{
"value": "dragging",
"label": "When dragging"
},
{
"value": "always",
"label": "Always"
},
{
"value": "never",
"label": "Never"
}
]
},
{
"name": "autoAlignSpacing",
"type": "number",
"label": "Spacing for Auto-Align (in px)",
"importance": "low",
"min": 0,
"default": 2,
"optional": true
},
{
"name": "enableFullScreen",
"label": "Enable FullScreen",
"importance": "low",
"type": "boolean",
"description": "Check this option to enable the full screen button.",
"default": false
},
{
"name": "showScorePoints",
"type": "boolean",
"label": "Show score points",
"description": "Show points earned for each answer. Not available when the 'Give one point for the whole task' option is enabled.",
"importance": "low",
"default": true
},
{
"name": "showTitle",
"type": "boolean",
"label": "Show Title",
"importance": "low",
"description": "Uncheck this option if you do not want this title to be displayed. The title will only be displayed in summaries, statistics etc.",
"default": true
}
]
},
{
"name": "localize",
"type": "group",
"label": "Localize",
"common": true,
"fields": [
{
"name": "fullscreen",
"type": "text",
"label": "Fullscreen label",
"default": "Fullscreen"
},
{
"name": "exitFullscreen",
"type": "text",
"label": "Exit fullscreen label",
"default": "Exit fullscreen"
}
]
},
{
"name": "grabbablePrefix",
"type": "text",
"label": "Grabbable prefix",
"importance": "low",
"default": "Grabbable {num} of {total}.",
"common": true
},
{
"name": "grabbableSuffix",
"type": "text",
"label": "Grabbable suffix",
"importance": "low",
"default": "Placed in dropzone {num}.",
"common": true
},
{
"name": "dropzonePrefix",
"type": "text",
"label": "Dropzone prefix",
"importance": "low",
"default": "Dropzone {num} of {total}.",
"common": true
},
{
"name": "noDropzone",
"type": "text",
"label": "No dropzone selection label",
"importance": "low",
"default": "No dropzone.",
"common": true
},
{
"name": "tipLabel",
"type": "text",
"label": "Label for show tip button",
"importance": "low",
"default": "Show tip.",
"common": true
},
{
"name": "tipAvailable",
"type": "text",
"label": "Label for tip available",
"importance": "low",
"default": "Tip available",
"common": true
},
{
"name": "correctAnswer",
"type": "text",
"label": "Label for correct answer",
"importance": "low",
"default": "Correct answer",
"common": true
},
{
"name": "wrongAnswer",
"type": "text",
"label": "Label for incorrect answer",
"importance": "low",
"default": "Wrong answer",
"common": true
},
{
"name": "feedbackHeader",
"type": "text",
"label": "Header for panel containing feedback for correct/incorrect answers",
"importance": "low",
"default": "Feedback",
"common": true
},
{
"name": "scoreBarLabel",
"type": "text",
"label": "Textual representation of the score bar for those using a readspeaker",
"default": "You got :num out of :total points",
"importance": "low",
"common": true
},
{
"name": "scoreExplanationButtonLabel",
"type": "text",
"label": "Textual representation of the score explanation button",
"default": "Show score explanation",
"importance": "low",
"common": true
},
{
"name": "a11yCheck",
"type": "text",
"label": "Assistive technology label for \"Check\" button",
"default": "Check",
"importance": "low",
"common": true
},
{
"name": "a11yRetry",
"type": "text",
"label": "Assistive technology label for \"Retry\" button",
"default": "Retry",
"importance": "low",
"common": true
}
]