@intellectif/lk-core 0.20.0 → 0.22.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +30 -1
  3. package/dist/{activity-f0bgZSTP.d.cts → activity-CYc7SD3d.d.cts} +157 -11
  4. package/dist/{activity-f0bgZSTP.d.ts → activity-CYc7SD3d.d.ts} +157 -11
  5. package/dist/ai-check.cjs +103 -15
  6. package/dist/ai-check.cjs.map +1 -1
  7. package/dist/ai-check.d.cts +9 -5
  8. package/dist/ai-check.d.ts +9 -5
  9. package/dist/ai-check.js +102 -14
  10. package/dist/ai-check.js.map +1 -1
  11. package/dist/{chunk-BIJCO2HM.js → chunk-5UCR4UNR.js} +301 -20
  12. package/dist/chunk-5UCR4UNR.js.map +1 -0
  13. package/dist/{chunk-FVZJ4X3Y.cjs → chunk-OPMY2MNS.cjs} +302 -21
  14. package/dist/chunk-OPMY2MNS.cjs.map +1 -0
  15. package/dist/{chunk-MMEQKFFQ.js → chunk-Q7MV3IXJ.js} +196 -8
  16. package/dist/chunk-Q7MV3IXJ.js.map +1 -0
  17. package/dist/{chunk-COBK2RUX.cjs → chunk-WQVZPIN7.cjs} +197 -9
  18. package/dist/chunk-WQVZPIN7.cjs.map +1 -0
  19. package/dist/{index-BA9f2ydg.d.ts → index-0Z3-nnAP.d.ts} +1 -1
  20. package/dist/{index-7S3-TLjT.d.cts → index-CxxiNSSH.d.cts} +1 -1
  21. package/dist/index.cjs +56 -9
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +93 -10
  24. package/dist/index.d.ts +93 -10
  25. package/dist/index.js +52 -5
  26. package/dist/index.js.map +1 -1
  27. package/dist/schemas.d.cts +2 -2
  28. package/dist/schemas.d.ts +2 -2
  29. package/dist/scoring.cjs +14 -2
  30. package/dist/scoring.cjs.map +1 -1
  31. package/dist/scoring.d.cts +240 -4
  32. package/dist/scoring.d.ts +240 -4
  33. package/dist/scoring.js +13 -1
  34. package/dist/xapi.d.cts +1 -1
  35. package/dist/xapi.d.ts +1 -1
  36. package/package.json +1 -1
  37. package/vectors/README.md +10 -0
  38. package/vectors/scoring.json +2127 -1
  39. package/dist/chunk-BIJCO2HM.js.map +0 -1
  40. package/dist/chunk-COBK2RUX.cjs.map +0 -1
  41. package/dist/chunk-FVZJ4X3Y.cjs.map +0 -1
  42. package/dist/chunk-MMEQKFFQ.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "Grade-stability corpus for @intellectif/lk-core. Generated by scripts/generate-vectors.mjs from the built package; never edit expectations by hand. Replay with vectors/replay.mjs. See vectors/README.md.",
3
3
  "corpusVersion": 2,
4
- "frozenFrom": "@intellectif/lk-core@0.17.0",
4
+ "frozenFrom": "@intellectif/lk-core@0.20.0",
5
5
  "vectors": [
6
6
  {
7
7
  "args": [
@@ -32855,6 +32855,2132 @@
32855
32855
  "const": "SPEECH_ASSESSMENT_MAX_WORDS",
32856
32856
  "expect": 1000,
32857
32857
  "id": "const/SPEECH_ASSESSMENT_MAX_WORDS"
32858
+ },
32859
+ {
32860
+ "const": "DEFAULT_ITEM_SCORING_POLICY",
32861
+ "expect": {
32862
+ "counts": "first",
32863
+ "hintPenalty": 0,
32864
+ "retries": 0,
32865
+ "retryPenalty": 0
32866
+ },
32867
+ "id": "const/DEFAULT_ITEM_SCORING_POLICY"
32868
+ },
32869
+ {
32870
+ "const": "ITEM_SCORING_MAX_RETRIES",
32871
+ "expect": 10,
32872
+ "id": "const/ITEM_SCORING_MAX_RETRIES"
32873
+ },
32874
+ {
32875
+ "args": [null],
32876
+ "expect": {
32877
+ "counts": "first",
32878
+ "hintPenalty": 0,
32879
+ "retries": 0,
32880
+ "retryPenalty": 0
32881
+ },
32882
+ "fn": "resolveItemScoringPolicy",
32883
+ "id": "resolveItemScoringPolicy/none-is-scoring-before-policies",
32884
+ "note": "No policy is one try, nothing costing anything, the first try counting: exactly how every question was scored before policies existed."
32885
+ },
32886
+ {
32887
+ "args": [
32888
+ {
32889
+ "counts": null,
32890
+ "hintPenalty": 0.1,
32891
+ "retries": null,
32892
+ "retryPenalty": null
32893
+ }
32894
+ ],
32895
+ "expect": {
32896
+ "counts": "first",
32897
+ "hintPenalty": 0.1,
32898
+ "retries": 0,
32899
+ "retryPenalty": 0
32900
+ },
32901
+ "fn": "resolveItemScoringPolicy",
32902
+ "id": "resolveItemScoringPolicy/settings-left-null-are-defaults"
32903
+ },
32904
+ {
32905
+ "args": [
32906
+ {
32907
+ "hintPenalty": "0.1"
32908
+ }
32909
+ ],
32910
+ "expect": {
32911
+ "$throws": "RangeError"
32912
+ },
32913
+ "fn": "resolveItemScoringPolicy",
32914
+ "id": "resolveItemScoringPolicy/refuses-a-cost-it-cannot-read",
32915
+ "note": "A grade-moving setting has no safe reading: a cost misread as 0 raises grades, as 1 lowers them. It throws, where a delivery policy would restrict."
32916
+ },
32917
+ {
32918
+ "args": [
32919
+ {
32920
+ "retries": 2,
32921
+ "retryPenalty": 0.25
32922
+ }
32923
+ ],
32924
+ "expect": {
32925
+ "$throws": "RangeError"
32926
+ },
32927
+ "fn": "resolveItemScoringPolicy",
32928
+ "id": "resolveItemScoringPolicy/refuses-a-retry-cost-never-charged",
32929
+ "note": "The first try counts by default, so a retry cost would never be charged: a school that set one believes retries cost something."
32930
+ },
32931
+ {
32932
+ "args": [
32933
+ {
32934
+ "counts": "last",
32935
+ "hintPenalty": 1,
32936
+ "retries": 10,
32937
+ "retryPenalty": 1
32938
+ }
32939
+ ],
32940
+ "expect": {
32941
+ "counts": "last",
32942
+ "hintPenalty": 1,
32943
+ "retries": 10,
32944
+ "retryPenalty": 1
32945
+ },
32946
+ "fn": "resolveItemScoringPolicy",
32947
+ "id": "resolveItemScoringPolicy/accepts-every-setting-at-its-limit",
32948
+ "note": "A cost of the whole mark and ten retries are policies a school may set; refusing them would fail every paper that uses them."
32949
+ },
32950
+ {
32951
+ "args": [3],
32952
+ "expect": {
32953
+ "$throws": "RangeError"
32954
+ },
32955
+ "fn": "resolveItemScoringPolicy",
32956
+ "id": "resolveItemScoringPolicy/refuses-a-policy-that-is-not-an-object",
32957
+ "note": "A number where a policy belongs is refused, not read as the default policy: it names no setting, and a stored column that holds one is broken."
32958
+ },
32959
+ {
32960
+ "args": [null],
32961
+ "expect": {
32962
+ "data": {},
32963
+ "success": true
32964
+ },
32965
+ "fn": "validateItemScoringPolicy",
32966
+ "id": "validateItemScoringPolicy/no-policy-is-valid"
32967
+ },
32968
+ {
32969
+ "args": [
32970
+ {
32971
+ "retries": 11
32972
+ }
32973
+ ],
32974
+ "expect": {
32975
+ "$throws": "RangeError"
32976
+ },
32977
+ "fn": "resolveItemScoringPolicy",
32978
+ "id": "resolveItemScoringPolicy/refuses-retries-past-the-limit"
32979
+ },
32980
+ {
32981
+ "args": [
32982
+ {
32983
+ "counts": "average",
32984
+ "hintPenalties": 0.1,
32985
+ "hintPenalty": 1.5,
32986
+ "retries": 1.5
32987
+ }
32988
+ ],
32989
+ "expect": {
32990
+ "issues": [
32991
+ {
32992
+ "message": "\"hintPenalties\" is not an item scoring setting. The settings are hintPenalty, retries, retryPenalty and counts.",
32993
+ "path": "hintPenalties"
32994
+ },
32995
+ {
32996
+ "message": "\"hintPenalty\" must be a number from 0 to 1: the fraction of a question's marks it costs.",
32997
+ "path": "hintPenalty"
32998
+ },
32999
+ {
33000
+ "message": "\"retries\" must be a whole number from 0 to 10.",
33001
+ "path": "retries"
33002
+ },
33003
+ {
33004
+ "message": "\"counts\" must be \"first\", \"best\" or \"last\".",
33005
+ "path": "counts"
33006
+ }
33007
+ ],
33008
+ "success": false
33009
+ },
33010
+ "fn": "validateItemScoringPolicy",
33011
+ "id": "validateItemScoringPolicy/names-each-setting-it-refuses",
33012
+ "ignore": ["message"]
33013
+ },
33014
+ {
33015
+ "args": [
33016
+ [
33017
+ {
33018
+ "hintsRevealed": 3,
33019
+ "maxScore": 1,
33020
+ "score": 0.5
33021
+ },
33022
+ {
33023
+ "maxScore": 1,
33024
+ "score": 1
33025
+ }
33026
+ ],
33027
+ null
33028
+ ],
33029
+ "expect": {
33030
+ "counted": 0,
33031
+ "maxScore": 1,
33032
+ "score": 0.5,
33033
+ "tries": [
33034
+ {
33035
+ "hintsRevealed": 3,
33036
+ "maxScore": 1,
33037
+ "penalty": 0,
33038
+ "score": 0.5,
33039
+ "scored": 0.5
33040
+ }
33041
+ ]
33042
+ },
33043
+ "fn": "scoreTries",
33044
+ "id": "scoreTries/no-policy-is-the-first-answer-as-it-scored",
33045
+ "note": "Hints reported and later tries made, and no policy: the question scores what its first answer scored, to the bit."
33046
+ },
33047
+ {
33048
+ "args": [
33049
+ [
33050
+ {
33051
+ "hintsRevealed": 2,
33052
+ "maxScore": 1,
33053
+ "score": 1
33054
+ }
33055
+ ],
33056
+ {
33057
+ "hintPenalty": 0.25
33058
+ }
33059
+ ],
33060
+ "expect": {
33061
+ "counted": 0,
33062
+ "maxScore": 1,
33063
+ "score": 0.5,
33064
+ "tries": [
33065
+ {
33066
+ "hintsRevealed": 2,
33067
+ "maxScore": 1,
33068
+ "penalty": 0.5,
33069
+ "score": 1,
33070
+ "scored": 0.5
33071
+ }
33072
+ ]
33073
+ },
33074
+ "fn": "scoreTries",
33075
+ "id": "scoreTries/hint-cost-is-a-fraction-of-the-marks"
33076
+ },
33077
+ {
33078
+ "args": [
33079
+ [
33080
+ {
33081
+ "hintsRevealed": 1,
33082
+ "maxScore": 1,
33083
+ "score": 0.5
33084
+ }
33085
+ ],
33086
+ {
33087
+ "hintPenalty": 0.25
33088
+ }
33089
+ ],
33090
+ "expect": {
33091
+ "counted": 0,
33092
+ "maxScore": 1,
33093
+ "score": 0.25,
33094
+ "tries": [
33095
+ {
33096
+ "hintsRevealed": 1,
33097
+ "maxScore": 1,
33098
+ "penalty": 0.25,
33099
+ "score": 0.5,
33100
+ "scored": 0.25
33101
+ }
33102
+ ]
33103
+ },
33104
+ "fn": "scoreTries",
33105
+ "id": "scoreTries/hint-cost-on-a-partial-answer-subtracts",
33106
+ "note": "Subtracted from what the answer scored, not multiplied into it: half marks less a quarter is a quarter, not three eighths."
33107
+ },
33108
+ {
33109
+ "args": [
33110
+ [
33111
+ {
33112
+ "hintsRevealed": 3,
33113
+ "maxScore": 1,
33114
+ "score": 0.5
33115
+ }
33116
+ ],
33117
+ {
33118
+ "hintPenalty": 0.25
33119
+ }
33120
+ ],
33121
+ "expect": {
33122
+ "counted": 0,
33123
+ "maxScore": 1,
33124
+ "score": 0,
33125
+ "tries": [
33126
+ {
33127
+ "hintsRevealed": 3,
33128
+ "maxScore": 1,
33129
+ "penalty": 0.75,
33130
+ "score": 0.5,
33131
+ "scored": 0
33132
+ }
33133
+ ]
33134
+ },
33135
+ "fn": "scoreTries",
33136
+ "id": "scoreTries/cost-never-takes-a-try-below-zero"
33137
+ },
33138
+ {
33139
+ "args": [
33140
+ [
33141
+ {
33142
+ "hintsRevealed": 2,
33143
+ "maxScore": 1,
33144
+ "score": 0.7
33145
+ }
33146
+ ],
33147
+ {
33148
+ "hintPenalty": 0.1
33149
+ }
33150
+ ],
33151
+ "expect": {
33152
+ "counted": 0,
33153
+ "maxScore": 1,
33154
+ "score": 0.5,
33155
+ "tries": [
33156
+ {
33157
+ "hintsRevealed": 2,
33158
+ "maxScore": 1,
33159
+ "penalty": 0.2,
33160
+ "score": 0.7,
33161
+ "scored": 0.5
33162
+ }
33163
+ ]
33164
+ },
33165
+ "fn": "scoreTries",
33166
+ "id": "scoreTries/no-floating-point-residue-under-a-pass-line",
33167
+ "note": "0.7 - 0.2 is 0.49999999999999994 in floating point, which fails a 0.5 pass line the learner met. A costed score is snapped to twelve decimal places."
33168
+ },
33169
+ {
33170
+ "args": [
33171
+ [
33172
+ {
33173
+ "hintsRevealed": 1.5,
33174
+ "maxScore": 1,
33175
+ "score": 1
33176
+ },
33177
+ {
33178
+ "hintsRevealed": -2,
33179
+ "maxScore": 1,
33180
+ "score": 1
33181
+ }
33182
+ ],
33183
+ {
33184
+ "counts": "last",
33185
+ "hintPenalty": 0.5,
33186
+ "retries": 1
33187
+ }
33188
+ ],
33189
+ "expect": {
33190
+ "counted": 1,
33191
+ "maxScore": 1,
33192
+ "score": 1,
33193
+ "tries": [
33194
+ {
33195
+ "hintsRevealed": 0,
33196
+ "maxScore": 1,
33197
+ "penalty": 0,
33198
+ "score": 1,
33199
+ "scored": 1
33200
+ },
33201
+ {
33202
+ "hintsRevealed": 0,
33203
+ "maxScore": 1,
33204
+ "penalty": 0,
33205
+ "score": 1,
33206
+ "scored": 1
33207
+ }
33208
+ ]
33209
+ },
33210
+ "fn": "scoreTries",
33211
+ "id": "scoreTries/a-hint-count-it-cannot-read-is-none"
33212
+ },
33213
+ {
33214
+ "args": [
33215
+ [
33216
+ {
33217
+ "maxScore": 1,
33218
+ "score": 0.5
33219
+ },
33220
+ {
33221
+ "maxScore": 1,
33222
+ "score": 1
33223
+ }
33224
+ ],
33225
+ {
33226
+ "retries": 1
33227
+ }
33228
+ ],
33229
+ "expect": {
33230
+ "counted": 0,
33231
+ "maxScore": 1,
33232
+ "score": 0.5,
33233
+ "tries": [
33234
+ {
33235
+ "hintsRevealed": 0,
33236
+ "maxScore": 1,
33237
+ "penalty": 0,
33238
+ "score": 0.5,
33239
+ "scored": 0.5
33240
+ },
33241
+ {
33242
+ "hintsRevealed": 0,
33243
+ "maxScore": 1,
33244
+ "penalty": 0,
33245
+ "score": 1,
33246
+ "scored": 1
33247
+ }
33248
+ ]
33249
+ },
33250
+ "fn": "scoreTries",
33251
+ "id": "scoreTries/first-counts-by-default",
33252
+ "note": "The default: tries after the first are for learning. Switching tries on moves no grade until a school chooses best or last."
33253
+ },
33254
+ {
33255
+ "args": [
33256
+ [
33257
+ {
33258
+ "maxScore": 1,
33259
+ "score": 0.5
33260
+ },
33261
+ {
33262
+ "maxScore": 1,
33263
+ "score": 0.5
33264
+ },
33265
+ {
33266
+ "maxScore": 1,
33267
+ "score": 1
33268
+ },
33269
+ {
33270
+ "hintsRevealed": 1,
33271
+ "maxScore": 1,
33272
+ "score": 1
33273
+ }
33274
+ ],
33275
+ {
33276
+ "counts": "best",
33277
+ "hintPenalty": 0.1,
33278
+ "retries": 3,
33279
+ "retryPenalty": 0.25
33280
+ }
33281
+ ],
33282
+ "expect": {
33283
+ "counted": 0,
33284
+ "maxScore": 1,
33285
+ "score": 0.5,
33286
+ "tries": [
33287
+ {
33288
+ "hintsRevealed": 0,
33289
+ "maxScore": 1,
33290
+ "penalty": 0,
33291
+ "score": 0.5,
33292
+ "scored": 0.5
33293
+ },
33294
+ {
33295
+ "hintsRevealed": 0,
33296
+ "maxScore": 1,
33297
+ "penalty": 0.25,
33298
+ "score": 0.5,
33299
+ "scored": 0.25
33300
+ },
33301
+ {
33302
+ "hintsRevealed": 0,
33303
+ "maxScore": 1,
33304
+ "penalty": 0.5,
33305
+ "score": 1,
33306
+ "scored": 0.5
33307
+ },
33308
+ {
33309
+ "hintsRevealed": 1,
33310
+ "maxScore": 1,
33311
+ "penalty": 0.85,
33312
+ "score": 1,
33313
+ "scored": 0.15
33314
+ }
33315
+ ]
33316
+ },
33317
+ "fn": "scoreTries",
33318
+ "id": "scoreTries/best-after-costs-earliest-of-equals",
33319
+ "note": "The third try scores 1 less two retries at a quarter: 0.5, equal to the first. The earliest of equal tries counts."
33320
+ },
33321
+ {
33322
+ "args": [
33323
+ [
33324
+ {
33325
+ "hintsRevealed": 0,
33326
+ "maxScore": 10,
33327
+ "score": 5
33328
+ },
33329
+ {
33330
+ "hintsRevealed": 0,
33331
+ "maxScore": 1,
33332
+ "score": 0.6
33333
+ }
33334
+ ],
33335
+ {
33336
+ "counts": "best",
33337
+ "retries": 1
33338
+ }
33339
+ ],
33340
+ "expect": {
33341
+ "counted": 1,
33342
+ "maxScore": 1,
33343
+ "score": 0.6,
33344
+ "tries": [
33345
+ {
33346
+ "hintsRevealed": 0,
33347
+ "maxScore": 10,
33348
+ "penalty": 0,
33349
+ "score": 5,
33350
+ "scored": 5
33351
+ },
33352
+ {
33353
+ "hintsRevealed": 0,
33354
+ "maxScore": 1,
33355
+ "penalty": 0,
33356
+ "score": 0.6,
33357
+ "scored": 0.6
33358
+ }
33359
+ ]
33360
+ },
33361
+ "fn": "scoreTries",
33362
+ "id": "scoreTries/best-compares-fractions-of-the-marks",
33363
+ "note": "Best is the highest share of the marks: 0.6 out of 1 (60%) beats 5 out of 10 (50%), though 5 is more points."
33364
+ },
33365
+ {
33366
+ "args": [
33367
+ [
33368
+ {
33369
+ "maxScore": 1,
33370
+ "score": 0
33371
+ },
33372
+ {
33373
+ "maxScore": 1,
33374
+ "score": 1
33375
+ }
33376
+ ],
33377
+ {
33378
+ "counts": "best",
33379
+ "hintPenalty": 0.1,
33380
+ "retries": 2,
33381
+ "retryPenalty": 0.25
33382
+ }
33383
+ ],
33384
+ "expect": {
33385
+ "counted": 1,
33386
+ "maxScore": 1,
33387
+ "score": 0.75,
33388
+ "tries": [
33389
+ {
33390
+ "hintsRevealed": 0,
33391
+ "maxScore": 1,
33392
+ "penalty": 0,
33393
+ "score": 0,
33394
+ "scored": 0
33395
+ },
33396
+ {
33397
+ "hintsRevealed": 0,
33398
+ "maxScore": 1,
33399
+ "penalty": 0.25,
33400
+ "score": 1,
33401
+ "scored": 0.75
33402
+ }
33403
+ ]
33404
+ },
33405
+ "fn": "scoreTries",
33406
+ "id": "scoreTries/best-a-later-right-answer"
33407
+ },
33408
+ {
33409
+ "args": [
33410
+ [
33411
+ {
33412
+ "maxScore": 1,
33413
+ "score": 1
33414
+ },
33415
+ {
33416
+ "maxScore": 1,
33417
+ "score": 0
33418
+ }
33419
+ ],
33420
+ {
33421
+ "counts": "last",
33422
+ "retries": 1
33423
+ }
33424
+ ],
33425
+ "expect": {
33426
+ "counted": 1,
33427
+ "maxScore": 1,
33428
+ "score": 0,
33429
+ "tries": [
33430
+ {
33431
+ "hintsRevealed": 0,
33432
+ "maxScore": 1,
33433
+ "penalty": 0,
33434
+ "score": 1,
33435
+ "scored": 1
33436
+ },
33437
+ {
33438
+ "hintsRevealed": 0,
33439
+ "maxScore": 1,
33440
+ "penalty": 0,
33441
+ "score": 0,
33442
+ "scored": 0
33443
+ }
33444
+ ]
33445
+ },
33446
+ "fn": "scoreTries",
33447
+ "id": "scoreTries/last-counts-even-when-lower"
33448
+ },
33449
+ {
33450
+ "args": [
33451
+ [
33452
+ {
33453
+ "maxScore": 1,
33454
+ "score": 0
33455
+ },
33456
+ {
33457
+ "maxScore": 1,
33458
+ "score": 0.5
33459
+ },
33460
+ {
33461
+ "maxScore": 1,
33462
+ "score": 1
33463
+ }
33464
+ ],
33465
+ {
33466
+ "counts": "last",
33467
+ "retries": 1
33468
+ }
33469
+ ],
33470
+ "expect": {
33471
+ "counted": 1,
33472
+ "maxScore": 1,
33473
+ "score": 0.5,
33474
+ "tries": [
33475
+ {
33476
+ "hintsRevealed": 0,
33477
+ "maxScore": 1,
33478
+ "penalty": 0,
33479
+ "score": 0,
33480
+ "scored": 0
33481
+ },
33482
+ {
33483
+ "hintsRevealed": 0,
33484
+ "maxScore": 1,
33485
+ "penalty": 0,
33486
+ "score": 0.5,
33487
+ "scored": 0.5
33488
+ }
33489
+ ]
33490
+ },
33491
+ "fn": "scoreTries",
33492
+ "id": "scoreTries/no-try-past-the-allowance-is-believed",
33493
+ "note": "Two tries allowed and three recorded: the third cannot have come from a learner under this policy, and is not read."
33494
+ },
33495
+ {
33496
+ "args": [
33497
+ [
33498
+ {
33499
+ "hintsRevealed": 1,
33500
+ "maxScore": 1,
33501
+ "score": 0
33502
+ },
33503
+ {
33504
+ "hintsRevealed": 2,
33505
+ "maxScore": 1,
33506
+ "score": 1
33507
+ }
33508
+ ],
33509
+ {
33510
+ "counts": "last",
33511
+ "hintPenalty": 0.1,
33512
+ "retries": 1,
33513
+ "retryPenalty": 0.2
33514
+ }
33515
+ ],
33516
+ "expect": {
33517
+ "counted": 1,
33518
+ "maxScore": 1,
33519
+ "score": 0.6,
33520
+ "tries": [
33521
+ {
33522
+ "hintsRevealed": 1,
33523
+ "maxScore": 1,
33524
+ "penalty": 0.1,
33525
+ "score": 0,
33526
+ "scored": 0
33527
+ },
33528
+ {
33529
+ "hintsRevealed": 2,
33530
+ "maxScore": 1,
33531
+ "penalty": 0.4,
33532
+ "score": 1,
33533
+ "scored": 0.6
33534
+ }
33535
+ ]
33536
+ },
33537
+ "fn": "scoreTries",
33538
+ "id": "scoreTries/later-hint-count-includes-earlier-hints"
33539
+ },
33540
+ {
33541
+ "args": [
33542
+ [
33543
+ {
33544
+ "hintsRevealed": 1,
33545
+ "maxScore": 10,
33546
+ "score": 8
33547
+ }
33548
+ ],
33549
+ {
33550
+ "hintPenalty": 0.1
33551
+ }
33552
+ ],
33553
+ "expect": {
33554
+ "counted": 0,
33555
+ "maxScore": 10,
33556
+ "score": 7,
33557
+ "tries": [
33558
+ {
33559
+ "hintsRevealed": 1,
33560
+ "maxScore": 10,
33561
+ "penalty": 0.1,
33562
+ "score": 8,
33563
+ "scored": 7
33564
+ }
33565
+ ]
33566
+ },
33567
+ "fn": "scoreTries",
33568
+ "id": "scoreTries/cost-out-of-any-maximum"
33569
+ },
33570
+ {
33571
+ "args": [[], null],
33572
+ "expect": {
33573
+ "$throws": "RangeError"
33574
+ },
33575
+ "fn": "scoreTries",
33576
+ "id": "scoreTries/throws-on-no-try"
33577
+ },
33578
+ {
33579
+ "args": [
33580
+ [
33581
+ {
33582
+ "maxScore": 1,
33583
+ "score": 85
33584
+ }
33585
+ ],
33586
+ {
33587
+ "hintPenalty": 0.1
33588
+ }
33589
+ ],
33590
+ "expect": {
33591
+ "$throws": "RangeError"
33592
+ },
33593
+ "fn": "scoreTries",
33594
+ "id": "scoreTries/throws-on-a-try-that-is-not-a-grade"
33595
+ },
33596
+ {
33597
+ "args": [
33598
+ {
33599
+ "id": "mc-capitals",
33600
+ "mode": "multi",
33601
+ "options": [
33602
+ {
33603
+ "id": "a",
33604
+ "isCorrect": true,
33605
+ "text": "Lisbon"
33606
+ },
33607
+ {
33608
+ "id": "b",
33609
+ "isCorrect": false,
33610
+ "text": "Porto"
33611
+ },
33612
+ {
33613
+ "id": "c",
33614
+ "isCorrect": true,
33615
+ "text": "Madrid"
33616
+ },
33617
+ {
33618
+ "id": "d",
33619
+ "isCorrect": false,
33620
+ "text": "Seville"
33621
+ }
33622
+ ],
33623
+ "question": "Which of these are capital cities?",
33624
+ "schemaVersion": "1.0",
33625
+ "scoringStrategy": "all-or-nothing",
33626
+ "title": "Capitals",
33627
+ "type": "multiple-choice"
33628
+ },
33629
+ {
33630
+ "hintsRevealed": 2,
33631
+ "selectedOptionIds": ["a", "c"],
33632
+ "type": "multiple-choice"
33633
+ },
33634
+ {
33635
+ "scoring": {
33636
+ "hintPenalty": 0.2
33637
+ }
33638
+ }
33639
+ ],
33640
+ "expect": {
33641
+ "details": [
33642
+ {
33643
+ "correct": true,
33644
+ "correctResponse": ["selected"],
33645
+ "itemId": "a",
33646
+ "learnerResponse": ["selected"],
33647
+ "outcome": "correct",
33648
+ "weight": 1
33649
+ },
33650
+ {
33651
+ "correct": true,
33652
+ "correctResponse": ["not-selected"],
33653
+ "itemId": "b",
33654
+ "learnerResponse": ["not-selected"],
33655
+ "outcome": "correct-omission",
33656
+ "weight": 1
33657
+ },
33658
+ {
33659
+ "correct": true,
33660
+ "correctResponse": ["selected"],
33661
+ "itemId": "c",
33662
+ "learnerResponse": ["selected"],
33663
+ "outcome": "correct",
33664
+ "weight": 1
33665
+ },
33666
+ {
33667
+ "correct": true,
33668
+ "correctResponse": ["not-selected"],
33669
+ "itemId": "d",
33670
+ "learnerResponse": ["not-selected"],
33671
+ "outcome": "correct-omission",
33672
+ "weight": 1
33673
+ }
33674
+ ],
33675
+ "feedback": null,
33676
+ "maxScore": 1,
33677
+ "passed": false,
33678
+ "score": 0.6,
33679
+ "status": "scored"
33680
+ },
33681
+ "fn": "evaluate",
33682
+ "id": "evaluate/mc/hint-cost-reads-the-pass-line-after-it",
33683
+ "note": "A right answer after two hints at a fifth: 0.6, below the default 0.7 pass line. The details and the feedback stay the answer's."
33684
+ },
33685
+ {
33686
+ "args": [
33687
+ {
33688
+ "id": "mc-capitals",
33689
+ "mode": "multi",
33690
+ "options": [
33691
+ {
33692
+ "id": "a",
33693
+ "isCorrect": true,
33694
+ "text": "Lisbon"
33695
+ },
33696
+ {
33697
+ "id": "b",
33698
+ "isCorrect": false,
33699
+ "text": "Porto"
33700
+ },
33701
+ {
33702
+ "id": "c",
33703
+ "isCorrect": true,
33704
+ "text": "Madrid"
33705
+ },
33706
+ {
33707
+ "id": "d",
33708
+ "isCorrect": false,
33709
+ "text": "Seville"
33710
+ }
33711
+ ],
33712
+ "question": "Which of these are capital cities?",
33713
+ "schemaVersion": "1.0",
33714
+ "scoringStrategy": "all-or-nothing",
33715
+ "title": "Capitals",
33716
+ "type": "multiple-choice"
33717
+ },
33718
+ {
33719
+ "hintsRevealed": 2,
33720
+ "selectedOptionIds": ["a", "c"],
33721
+ "type": "multiple-choice"
33722
+ },
33723
+ {
33724
+ "scoring": {}
33725
+ }
33726
+ ],
33727
+ "expect": {
33728
+ "details": [
33729
+ {
33730
+ "correct": true,
33731
+ "correctResponse": ["selected"],
33732
+ "itemId": "a",
33733
+ "learnerResponse": ["selected"],
33734
+ "outcome": "correct",
33735
+ "weight": 1
33736
+ },
33737
+ {
33738
+ "correct": true,
33739
+ "correctResponse": ["not-selected"],
33740
+ "itemId": "b",
33741
+ "learnerResponse": ["not-selected"],
33742
+ "outcome": "correct-omission",
33743
+ "weight": 1
33744
+ },
33745
+ {
33746
+ "correct": true,
33747
+ "correctResponse": ["selected"],
33748
+ "itemId": "c",
33749
+ "learnerResponse": ["selected"],
33750
+ "outcome": "correct",
33751
+ "weight": 1
33752
+ },
33753
+ {
33754
+ "correct": true,
33755
+ "correctResponse": ["not-selected"],
33756
+ "itemId": "d",
33757
+ "learnerResponse": ["not-selected"],
33758
+ "outcome": "correct-omission",
33759
+ "weight": 1
33760
+ }
33761
+ ],
33762
+ "feedback": null,
33763
+ "maxScore": 1,
33764
+ "passed": true,
33765
+ "score": 1,
33766
+ "status": "scored"
33767
+ },
33768
+ "fn": "evaluate",
33769
+ "id": "evaluate/mc/hint-cost-policy-empty-changes-nothing"
33770
+ },
33771
+ {
33772
+ "args": [
33773
+ {
33774
+ "blanks": [
33775
+ {
33776
+ "acceptedAnswers": ["a"],
33777
+ "id": "b1"
33778
+ },
33779
+ {
33780
+ "acceptedAnswers": ["the"],
33781
+ "id": "b2"
33782
+ },
33783
+ {
33784
+ "acceptedAnswers": ["the"],
33785
+ "id": "b3"
33786
+ }
33787
+ ],
33788
+ "id": "fib-articles",
33789
+ "passage": "We bought {{b1}} lamp for {{b2}} study and {{b3}} hall.",
33790
+ "schemaVersion": "1.0",
33791
+ "scoringStrategy": "partial",
33792
+ "title": "Articles",
33793
+ "type": "fill-in-the-blanks"
33794
+ },
33795
+ {
33796
+ "answers": {
33797
+ "b1": "a",
33798
+ "b2": "the",
33799
+ "b3": "wrong"
33800
+ },
33801
+ "hintsRevealed": 1,
33802
+ "type": "fill-in-the-blanks"
33803
+ },
33804
+ {
33805
+ "scoring": {
33806
+ "hintPenalty": 0.1
33807
+ }
33808
+ }
33809
+ ],
33810
+ "expect": {
33811
+ "details": [
33812
+ {
33813
+ "correct": true,
33814
+ "correctResponse": ["a"],
33815
+ "itemId": "b1",
33816
+ "learnerResponse": ["a"],
33817
+ "outcome": "correct",
33818
+ "weight": 1
33819
+ },
33820
+ {
33821
+ "correct": true,
33822
+ "correctResponse": ["the"],
33823
+ "itemId": "b2",
33824
+ "learnerResponse": ["the"],
33825
+ "outcome": "correct",
33826
+ "weight": 1
33827
+ },
33828
+ {
33829
+ "correct": false,
33830
+ "correctResponse": ["the"],
33831
+ "itemId": "b3",
33832
+ "learnerResponse": ["wrong"],
33833
+ "outcome": "incorrect",
33834
+ "weight": 1
33835
+ }
33836
+ ],
33837
+ "feedback": null,
33838
+ "maxScore": 1,
33839
+ "passed": false,
33840
+ "score": 0.566666666667,
33841
+ "status": "scored"
33842
+ },
33843
+ "fn": "evaluate",
33844
+ "id": "evaluate/fib/hint-cost-on-partial-credit"
33845
+ },
33846
+ {
33847
+ "args": [
33848
+ {
33849
+ "banks": [
33850
+ {
33851
+ "choices": [
33852
+ {
33853
+ "id": "of",
33854
+ "text": "of"
33855
+ },
33856
+ {
33857
+ "id": "from",
33858
+ "text": "from"
33859
+ },
33860
+ {
33861
+ "id": "to",
33862
+ "text": "to"
33863
+ },
33864
+ {
33865
+ "id": "on",
33866
+ "text": "on"
33867
+ }
33868
+ ],
33869
+ "id": "prep"
33870
+ }
33871
+ ],
33872
+ "gaps": [
33873
+ {
33874
+ "bankId": "prep",
33875
+ "correctChoiceId": "from",
33876
+ "id": "a"
33877
+ },
33878
+ {
33879
+ "bankId": "prep",
33880
+ "correctChoiceId": "from",
33881
+ "id": "b"
33882
+ }
33883
+ ],
33884
+ "id": "gs-prepositions",
33885
+ "passage": "Where are you {{a}}? I'm {{b}} Spain.",
33886
+ "schemaVersion": "1.0",
33887
+ "scoringStrategy": "partial",
33888
+ "title": "Prepositions",
33889
+ "type": "gap-select"
33890
+ },
33891
+ {
33892
+ "hintsRevealed": 1,
33893
+ "selections": {
33894
+ "a": "from",
33895
+ "b": "from"
33896
+ },
33897
+ "type": "gap-select"
33898
+ },
33899
+ {
33900
+ "scoring": {
33901
+ "hintPenalty": 0.3
33902
+ }
33903
+ }
33904
+ ],
33905
+ "expect": {
33906
+ "details": [
33907
+ {
33908
+ "correct": true,
33909
+ "correctResponse": ["from"],
33910
+ "itemId": "a",
33911
+ "learnerResponse": ["from"],
33912
+ "outcome": "correct",
33913
+ "weight": 1
33914
+ },
33915
+ {
33916
+ "correct": true,
33917
+ "correctResponse": ["from"],
33918
+ "itemId": "b",
33919
+ "learnerResponse": ["from"],
33920
+ "outcome": "correct",
33921
+ "weight": 1
33922
+ }
33923
+ ],
33924
+ "feedback": null,
33925
+ "maxScore": 1,
33926
+ "passed": true,
33927
+ "score": 0.7,
33928
+ "status": "scored"
33929
+ },
33930
+ "fn": "evaluate",
33931
+ "id": "evaluate/gs/hint-cost"
33932
+ },
33933
+ {
33934
+ "args": [
33935
+ {
33936
+ "id": "dc-lisbon",
33937
+ "media": {
33938
+ "alt": "Recording",
33939
+ "type": "audio",
33940
+ "url": "https://cdn.example/lisbon.mp3"
33941
+ },
33942
+ "schemaVersion": "1.0",
33943
+ "title": "Listen and type the sentence",
33944
+ "transcript": "It isn't raining in Lisbon today.",
33945
+ "type": "dictation"
33946
+ },
33947
+ {
33948
+ "hintsRevealed": 3,
33949
+ "text": "It isn't raining in Lisbon today.",
33950
+ "type": "dictation"
33951
+ },
33952
+ {
33953
+ "scoring": {
33954
+ "hintPenalty": 0.05
33955
+ }
33956
+ }
33957
+ ],
33958
+ "expect": {
33959
+ "details": [
33960
+ {
33961
+ "correct": true,
33962
+ "correctResponse": "it",
33963
+ "itemId": "w1",
33964
+ "learnerResponse": "it",
33965
+ "outcome": "correct",
33966
+ "score": 1,
33967
+ "weight": 1
33968
+ },
33969
+ {
33970
+ "correct": true,
33971
+ "correctResponse": "isn't",
33972
+ "itemId": "w2",
33973
+ "learnerResponse": "isn't",
33974
+ "outcome": "correct",
33975
+ "score": 1,
33976
+ "weight": 1
33977
+ },
33978
+ {
33979
+ "correct": true,
33980
+ "correctResponse": "raining",
33981
+ "itemId": "w3",
33982
+ "learnerResponse": "raining",
33983
+ "outcome": "correct",
33984
+ "score": 1,
33985
+ "weight": 1
33986
+ },
33987
+ {
33988
+ "correct": true,
33989
+ "correctResponse": "in",
33990
+ "itemId": "w4",
33991
+ "learnerResponse": "in",
33992
+ "outcome": "correct",
33993
+ "score": 1,
33994
+ "weight": 1
33995
+ },
33996
+ {
33997
+ "correct": true,
33998
+ "correctResponse": "lisbon",
33999
+ "itemId": "w5",
34000
+ "learnerResponse": "lisbon",
34001
+ "outcome": "correct",
34002
+ "score": 1,
34003
+ "weight": 1
34004
+ },
34005
+ {
34006
+ "correct": true,
34007
+ "correctResponse": "today",
34008
+ "itemId": "w6",
34009
+ "learnerResponse": "today",
34010
+ "outcome": "correct",
34011
+ "score": 1,
34012
+ "weight": 1
34013
+ }
34014
+ ],
34015
+ "feedback": null,
34016
+ "maxScore": 1,
34017
+ "passed": true,
34018
+ "score": 0.85,
34019
+ "status": "scored"
34020
+ },
34021
+ "fn": "evaluate",
34022
+ "id": "evaluate/dc/hint-cost-on-the-word-hints",
34023
+ "note": "A dictation has always reported the hint words it showed; a policy now charges for them."
34024
+ },
34025
+ {
34026
+ "args": [
34027
+ {
34028
+ "id": "mc-capitals",
34029
+ "mode": "multi",
34030
+ "options": [
34031
+ {
34032
+ "id": "a",
34033
+ "isCorrect": true,
34034
+ "text": "Lisbon"
34035
+ },
34036
+ {
34037
+ "id": "b",
34038
+ "isCorrect": false,
34039
+ "text": "Porto"
34040
+ },
34041
+ {
34042
+ "id": "c",
34043
+ "isCorrect": true,
34044
+ "text": "Madrid"
34045
+ },
34046
+ {
34047
+ "id": "d",
34048
+ "isCorrect": false,
34049
+ "text": "Seville"
34050
+ }
34051
+ ],
34052
+ "passThreshold": 0.5,
34053
+ "question": "Which of these are capital cities?",
34054
+ "schemaVersion": "1.0",
34055
+ "scoringStrategy": "all-or-nothing",
34056
+ "title": "Capitals",
34057
+ "type": "multiple-choice"
34058
+ },
34059
+ {
34060
+ "hintsRevealed": 2,
34061
+ "selectedOptionIds": ["a", "c"],
34062
+ "type": "multiple-choice"
34063
+ },
34064
+ {
34065
+ "rounding": {
34066
+ "dp": 2,
34067
+ "mode": "half-up"
34068
+ },
34069
+ "scoring": {
34070
+ "hintPenalty": 0.25
34071
+ }
34072
+ }
34073
+ ],
34074
+ "expect": {
34075
+ "details": [
34076
+ {
34077
+ "correct": true,
34078
+ "correctResponse": ["selected"],
34079
+ "itemId": "a",
34080
+ "learnerResponse": ["selected"],
34081
+ "outcome": "correct",
34082
+ "weight": 1
34083
+ },
34084
+ {
34085
+ "correct": true,
34086
+ "correctResponse": ["not-selected"],
34087
+ "itemId": "b",
34088
+ "learnerResponse": ["not-selected"],
34089
+ "outcome": "correct-omission",
34090
+ "weight": 1
34091
+ },
34092
+ {
34093
+ "correct": true,
34094
+ "correctResponse": ["selected"],
34095
+ "itemId": "c",
34096
+ "learnerResponse": ["selected"],
34097
+ "outcome": "correct",
34098
+ "weight": 1
34099
+ },
34100
+ {
34101
+ "correct": true,
34102
+ "correctResponse": ["not-selected"],
34103
+ "itemId": "d",
34104
+ "learnerResponse": ["not-selected"],
34105
+ "outcome": "correct-omission",
34106
+ "weight": 1
34107
+ }
34108
+ ],
34109
+ "feedback": null,
34110
+ "maxScore": 1,
34111
+ "passed": true,
34112
+ "score": 0.5,
34113
+ "status": "scored"
34114
+ },
34115
+ "fn": "evaluate",
34116
+ "id": "evaluate/mc/hint-cost-with-rounding-meets-the-line"
34117
+ },
34118
+ {
34119
+ "args": [
34120
+ {
34121
+ "id": "mc-capitals",
34122
+ "mode": "multi",
34123
+ "options": [
34124
+ {
34125
+ "id": "a",
34126
+ "isCorrect": true,
34127
+ "text": "Lisbon"
34128
+ },
34129
+ {
34130
+ "id": "b",
34131
+ "isCorrect": false,
34132
+ "text": "Porto"
34133
+ },
34134
+ {
34135
+ "id": "c",
34136
+ "isCorrect": true,
34137
+ "text": "Madrid"
34138
+ },
34139
+ {
34140
+ "id": "d",
34141
+ "isCorrect": false,
34142
+ "text": "Seville"
34143
+ }
34144
+ ],
34145
+ "passThreshold": 0.7,
34146
+ "question": "Which of these are capital cities?",
34147
+ "schemaVersion": "1.0",
34148
+ "scoringStrategy": "all-or-nothing",
34149
+ "title": "Capitals",
34150
+ "type": "multiple-choice"
34151
+ },
34152
+ {
34153
+ "hintsRevealed": 1,
34154
+ "selectedOptionIds": ["a", "c"],
34155
+ "type": "multiple-choice"
34156
+ },
34157
+ {
34158
+ "rounding": {
34159
+ "dp": 2,
34160
+ "mode": "half-up"
34161
+ },
34162
+ "scoring": {
34163
+ "hintPenalty": 0.305
34164
+ }
34165
+ }
34166
+ ],
34167
+ "expect": {
34168
+ "details": [
34169
+ {
34170
+ "correct": true,
34171
+ "correctResponse": ["selected"],
34172
+ "itemId": "a",
34173
+ "learnerResponse": ["selected"],
34174
+ "outcome": "correct",
34175
+ "weight": 1
34176
+ },
34177
+ {
34178
+ "correct": true,
34179
+ "correctResponse": ["not-selected"],
34180
+ "itemId": "b",
34181
+ "learnerResponse": ["not-selected"],
34182
+ "outcome": "correct-omission",
34183
+ "weight": 1
34184
+ },
34185
+ {
34186
+ "correct": true,
34187
+ "correctResponse": ["selected"],
34188
+ "itemId": "c",
34189
+ "learnerResponse": ["selected"],
34190
+ "outcome": "correct",
34191
+ "weight": 1
34192
+ },
34193
+ {
34194
+ "correct": true,
34195
+ "correctResponse": ["not-selected"],
34196
+ "itemId": "d",
34197
+ "learnerResponse": ["not-selected"],
34198
+ "outcome": "correct-omission",
34199
+ "weight": 1
34200
+ }
34201
+ ],
34202
+ "feedback": null,
34203
+ "maxScore": 1,
34204
+ "passed": true,
34205
+ "score": 0.695,
34206
+ "status": "scored"
34207
+ },
34208
+ "fn": "evaluate",
34209
+ "id": "evaluate/mc/hint-cost-rounded-pass-line",
34210
+ "note": "A right answer less one hint at 0.305 is 0.695: a fail against 0.7 raw, a pass once both sides are rounded half-up to two places. The pass line after a cost is read with the rounding the call was given."
34211
+ },
34212
+ {
34213
+ "args": [
34214
+ {
34215
+ "id": "mc-capitals",
34216
+ "mode": "multi",
34217
+ "options": [
34218
+ {
34219
+ "id": "a",
34220
+ "isCorrect": true,
34221
+ "text": "Lisbon"
34222
+ },
34223
+ {
34224
+ "id": "b",
34225
+ "isCorrect": false,
34226
+ "text": "Porto"
34227
+ },
34228
+ {
34229
+ "id": "c",
34230
+ "isCorrect": true,
34231
+ "text": "Madrid"
34232
+ },
34233
+ {
34234
+ "id": "d",
34235
+ "isCorrect": false,
34236
+ "text": "Seville"
34237
+ }
34238
+ ],
34239
+ "passThreshold": 0.7,
34240
+ "question": "Which of these are capital cities?",
34241
+ "schemaVersion": "1.0",
34242
+ "scoringStrategy": "all-or-nothing",
34243
+ "title": "Capitals",
34244
+ "type": "multiple-choice"
34245
+ },
34246
+ {
34247
+ "hintsRevealed": 1,
34248
+ "selectedOptionIds": ["a", "c"],
34249
+ "type": "multiple-choice"
34250
+ },
34251
+ {
34252
+ "scoring": {
34253
+ "hintPenalty": 0.305
34254
+ }
34255
+ }
34256
+ ],
34257
+ "expect": {
34258
+ "details": [
34259
+ {
34260
+ "correct": true,
34261
+ "correctResponse": ["selected"],
34262
+ "itemId": "a",
34263
+ "learnerResponse": ["selected"],
34264
+ "outcome": "correct",
34265
+ "weight": 1
34266
+ },
34267
+ {
34268
+ "correct": true,
34269
+ "correctResponse": ["not-selected"],
34270
+ "itemId": "b",
34271
+ "learnerResponse": ["not-selected"],
34272
+ "outcome": "correct-omission",
34273
+ "weight": 1
34274
+ },
34275
+ {
34276
+ "correct": true,
34277
+ "correctResponse": ["selected"],
34278
+ "itemId": "c",
34279
+ "learnerResponse": ["selected"],
34280
+ "outcome": "correct",
34281
+ "weight": 1
34282
+ },
34283
+ {
34284
+ "correct": true,
34285
+ "correctResponse": ["not-selected"],
34286
+ "itemId": "d",
34287
+ "learnerResponse": ["not-selected"],
34288
+ "outcome": "correct-omission",
34289
+ "weight": 1
34290
+ }
34291
+ ],
34292
+ "feedback": null,
34293
+ "maxScore": 1,
34294
+ "passed": false,
34295
+ "score": 0.695,
34296
+ "status": "scored"
34297
+ },
34298
+ "fn": "evaluate",
34299
+ "id": "evaluate/mc/hint-cost-raw-pass-line"
34300
+ },
34301
+ {
34302
+ "args": [
34303
+ {
34304
+ "id": "mc-capitals",
34305
+ "mode": "multi",
34306
+ "options": [
34307
+ {
34308
+ "id": "a",
34309
+ "isCorrect": true,
34310
+ "text": "Lisbon"
34311
+ },
34312
+ {
34313
+ "id": "b",
34314
+ "isCorrect": false,
34315
+ "text": "Porto"
34316
+ },
34317
+ {
34318
+ "id": "c",
34319
+ "isCorrect": true,
34320
+ "text": "Madrid"
34321
+ },
34322
+ {
34323
+ "id": "d",
34324
+ "isCorrect": false,
34325
+ "text": "Seville"
34326
+ }
34327
+ ],
34328
+ "question": "Which of these are capital cities?",
34329
+ "schemaVersion": "1.0",
34330
+ "scoringStrategy": "all-or-nothing",
34331
+ "title": "Capitals",
34332
+ "type": "multiple-choice"
34333
+ },
34334
+ [
34335
+ {
34336
+ "selectedOptionIds": ["a"],
34337
+ "type": "multiple-choice"
34338
+ },
34339
+ {
34340
+ "hintsRevealed": 1,
34341
+ "selectedOptionIds": ["a", "c"],
34342
+ "type": "multiple-choice"
34343
+ }
34344
+ ],
34345
+ {
34346
+ "scoring": {
34347
+ "counts": "best",
34348
+ "hintPenalty": 0.1,
34349
+ "retries": 2,
34350
+ "retryPenalty": 0.25
34351
+ }
34352
+ }
34353
+ ],
34354
+ "expect": {
34355
+ "counted": 1,
34356
+ "outcome": {
34357
+ "details": [
34358
+ {
34359
+ "correct": true,
34360
+ "correctResponse": ["selected"],
34361
+ "itemId": "a",
34362
+ "learnerResponse": ["selected"],
34363
+ "outcome": "correct",
34364
+ "weight": 1
34365
+ },
34366
+ {
34367
+ "correct": true,
34368
+ "correctResponse": ["not-selected"],
34369
+ "itemId": "b",
34370
+ "learnerResponse": ["not-selected"],
34371
+ "outcome": "correct-omission",
34372
+ "weight": 1
34373
+ },
34374
+ {
34375
+ "correct": true,
34376
+ "correctResponse": ["selected"],
34377
+ "itemId": "c",
34378
+ "learnerResponse": ["selected"],
34379
+ "outcome": "correct",
34380
+ "weight": 1
34381
+ },
34382
+ {
34383
+ "correct": true,
34384
+ "correctResponse": ["not-selected"],
34385
+ "itemId": "d",
34386
+ "learnerResponse": ["not-selected"],
34387
+ "outcome": "correct-omission",
34388
+ "weight": 1
34389
+ }
34390
+ ],
34391
+ "feedback": null,
34392
+ "maxScore": 1,
34393
+ "passed": false,
34394
+ "score": 0.65,
34395
+ "status": "scored"
34396
+ },
34397
+ "tries": [
34398
+ {
34399
+ "hintsRevealed": 0,
34400
+ "maxScore": 1,
34401
+ "penalty": 0,
34402
+ "score": 0,
34403
+ "scored": 0
34404
+ },
34405
+ {
34406
+ "hintsRevealed": 1,
34407
+ "maxScore": 1,
34408
+ "penalty": 0.35,
34409
+ "score": 1,
34410
+ "scored": 0.65
34411
+ }
34412
+ ]
34413
+ },
34414
+ "fn": "evaluateTries",
34415
+ "id": "evaluateTries/mc/best-a-later-right-answer"
34416
+ },
34417
+ {
34418
+ "args": [
34419
+ {
34420
+ "blanks": [
34421
+ {
34422
+ "acceptedAnswers": ["a"],
34423
+ "id": "b1"
34424
+ },
34425
+ {
34426
+ "acceptedAnswers": ["the"],
34427
+ "id": "b2"
34428
+ },
34429
+ {
34430
+ "acceptedAnswers": ["the"],
34431
+ "id": "b3"
34432
+ }
34433
+ ],
34434
+ "id": "fib-articles",
34435
+ "passage": "We bought {{b1}} lamp for {{b2}} study and {{b3}} hall.",
34436
+ "schemaVersion": "1.0",
34437
+ "scoringStrategy": "partial",
34438
+ "title": "Articles",
34439
+ "type": "fill-in-the-blanks"
34440
+ },
34441
+ [
34442
+ {
34443
+ "answers": {
34444
+ "b1": "a",
34445
+ "b2": "x",
34446
+ "b3": "x"
34447
+ },
34448
+ "type": "fill-in-the-blanks"
34449
+ },
34450
+ {
34451
+ "answers": {
34452
+ "b1": "a",
34453
+ "b2": "the",
34454
+ "b3": "x"
34455
+ },
34456
+ "hintsRevealed": 1,
34457
+ "type": "fill-in-the-blanks"
34458
+ }
34459
+ ],
34460
+ {
34461
+ "scoring": {
34462
+ "counts": "last",
34463
+ "hintPenalty": 0.1,
34464
+ "retries": 1
34465
+ }
34466
+ }
34467
+ ],
34468
+ "expect": {
34469
+ "counted": 1,
34470
+ "outcome": {
34471
+ "details": [
34472
+ {
34473
+ "correct": true,
34474
+ "correctResponse": ["a"],
34475
+ "itemId": "b1",
34476
+ "learnerResponse": ["a"],
34477
+ "outcome": "correct",
34478
+ "weight": 1
34479
+ },
34480
+ {
34481
+ "correct": true,
34482
+ "correctResponse": ["the"],
34483
+ "itemId": "b2",
34484
+ "learnerResponse": ["the"],
34485
+ "outcome": "correct",
34486
+ "weight": 1
34487
+ },
34488
+ {
34489
+ "correct": false,
34490
+ "correctResponse": ["the"],
34491
+ "itemId": "b3",
34492
+ "learnerResponse": ["x"],
34493
+ "outcome": "incorrect",
34494
+ "weight": 1
34495
+ }
34496
+ ],
34497
+ "feedback": null,
34498
+ "maxScore": 1,
34499
+ "passed": false,
34500
+ "score": 0.566666666667,
34501
+ "status": "scored"
34502
+ },
34503
+ "tries": [
34504
+ {
34505
+ "hintsRevealed": 0,
34506
+ "maxScore": 1,
34507
+ "penalty": 0,
34508
+ "score": 0.3333333333333333,
34509
+ "scored": 0.3333333333333333
34510
+ },
34511
+ {
34512
+ "hintsRevealed": 1,
34513
+ "maxScore": 1,
34514
+ "penalty": 0.1,
34515
+ "score": 0.6666666666666666,
34516
+ "scored": 0.566666666667
34517
+ }
34518
+ ]
34519
+ },
34520
+ "fn": "evaluateTries",
34521
+ "id": "evaluateTries/fib/last-on-partial-credit"
34522
+ },
34523
+ {
34524
+ "args": [
34525
+ {
34526
+ "banks": [
34527
+ {
34528
+ "choices": [
34529
+ {
34530
+ "id": "of",
34531
+ "text": "of"
34532
+ },
34533
+ {
34534
+ "id": "from",
34535
+ "text": "from"
34536
+ },
34537
+ {
34538
+ "id": "to",
34539
+ "text": "to"
34540
+ },
34541
+ {
34542
+ "id": "on",
34543
+ "text": "on"
34544
+ }
34545
+ ],
34546
+ "id": "prep"
34547
+ }
34548
+ ],
34549
+ "gaps": [
34550
+ {
34551
+ "bankId": "prep",
34552
+ "correctChoiceId": "from",
34553
+ "id": "a"
34554
+ },
34555
+ {
34556
+ "bankId": "prep",
34557
+ "correctChoiceId": "from",
34558
+ "id": "b"
34559
+ }
34560
+ ],
34561
+ "id": "gs-prepositions",
34562
+ "passage": "Where are you {{a}}? I'm {{b}} Spain.",
34563
+ "schemaVersion": "1.0",
34564
+ "scoringStrategy": "partial",
34565
+ "title": "Prepositions",
34566
+ "type": "gap-select"
34567
+ },
34568
+ [
34569
+ {
34570
+ "selections": {
34571
+ "a": "of"
34572
+ },
34573
+ "type": "gap-select"
34574
+ },
34575
+ {
34576
+ "selections": {
34577
+ "a": "from",
34578
+ "b": "from"
34579
+ },
34580
+ "type": "gap-select"
34581
+ }
34582
+ ],
34583
+ {
34584
+ "scoring": {
34585
+ "retries": 1
34586
+ }
34587
+ }
34588
+ ],
34589
+ "expect": {
34590
+ "counted": 0,
34591
+ "outcome": {
34592
+ "details": [
34593
+ {
34594
+ "correct": false,
34595
+ "correctResponse": ["from"],
34596
+ "itemId": "a",
34597
+ "learnerResponse": ["of"],
34598
+ "outcome": "incorrect",
34599
+ "weight": 1
34600
+ },
34601
+ {
34602
+ "correct": false,
34603
+ "correctResponse": ["from"],
34604
+ "itemId": "b",
34605
+ "learnerResponse": [""],
34606
+ "outcome": "incorrect-omission",
34607
+ "weight": 1
34608
+ }
34609
+ ],
34610
+ "feedback": null,
34611
+ "maxScore": 1,
34612
+ "passed": false,
34613
+ "score": 0,
34614
+ "status": "scored"
34615
+ },
34616
+ "tries": [
34617
+ {
34618
+ "hintsRevealed": 0,
34619
+ "maxScore": 1,
34620
+ "penalty": 0,
34621
+ "score": 0,
34622
+ "scored": 0
34623
+ },
34624
+ {
34625
+ "hintsRevealed": 0,
34626
+ "maxScore": 1,
34627
+ "penalty": 0,
34628
+ "score": 1,
34629
+ "scored": 1
34630
+ }
34631
+ ]
34632
+ },
34633
+ "fn": "evaluateTries",
34634
+ "id": "evaluateTries/gs/first-counts-by-default"
34635
+ },
34636
+ {
34637
+ "args": [
34638
+ {
34639
+ "id": "dc-lisbon",
34640
+ "media": {
34641
+ "alt": "Recording",
34642
+ "type": "audio",
34643
+ "url": "https://cdn.example/lisbon.mp3"
34644
+ },
34645
+ "schemaVersion": "1.0",
34646
+ "title": "Listen and type the sentence",
34647
+ "transcript": "It isn't raining in Lisbon today.",
34648
+ "type": "dictation"
34649
+ },
34650
+ [
34651
+ {
34652
+ "text": "It is raining in Lisbon.",
34653
+ "type": "dictation"
34654
+ },
34655
+ {
34656
+ "hintsRevealed": 2,
34657
+ "text": "It isn't raining in Lisbon today.",
34658
+ "type": "dictation"
34659
+ }
34660
+ ],
34661
+ {
34662
+ "scoring": {
34663
+ "counts": "best",
34664
+ "hintPenalty": 0.05,
34665
+ "retries": 1,
34666
+ "retryPenalty": 0.1
34667
+ }
34668
+ }
34669
+ ],
34670
+ "expect": {
34671
+ "counted": 1,
34672
+ "outcome": {
34673
+ "details": [
34674
+ {
34675
+ "correct": true,
34676
+ "correctResponse": "it",
34677
+ "itemId": "w1",
34678
+ "learnerResponse": "it",
34679
+ "outcome": "correct",
34680
+ "score": 1,
34681
+ "weight": 1
34682
+ },
34683
+ {
34684
+ "correct": true,
34685
+ "correctResponse": "isn't",
34686
+ "itemId": "w2",
34687
+ "learnerResponse": "isn't",
34688
+ "outcome": "correct",
34689
+ "score": 1,
34690
+ "weight": 1
34691
+ },
34692
+ {
34693
+ "correct": true,
34694
+ "correctResponse": "raining",
34695
+ "itemId": "w3",
34696
+ "learnerResponse": "raining",
34697
+ "outcome": "correct",
34698
+ "score": 1,
34699
+ "weight": 1
34700
+ },
34701
+ {
34702
+ "correct": true,
34703
+ "correctResponse": "in",
34704
+ "itemId": "w4",
34705
+ "learnerResponse": "in",
34706
+ "outcome": "correct",
34707
+ "score": 1,
34708
+ "weight": 1
34709
+ },
34710
+ {
34711
+ "correct": true,
34712
+ "correctResponse": "lisbon",
34713
+ "itemId": "w5",
34714
+ "learnerResponse": "lisbon",
34715
+ "outcome": "correct",
34716
+ "score": 1,
34717
+ "weight": 1
34718
+ },
34719
+ {
34720
+ "correct": true,
34721
+ "correctResponse": "today",
34722
+ "itemId": "w6",
34723
+ "learnerResponse": "today",
34724
+ "outcome": "correct",
34725
+ "score": 1,
34726
+ "weight": 1
34727
+ }
34728
+ ],
34729
+ "feedback": null,
34730
+ "maxScore": 1,
34731
+ "passed": true,
34732
+ "score": 0.8,
34733
+ "status": "scored"
34734
+ },
34735
+ "tries": [
34736
+ {
34737
+ "hintsRevealed": 0,
34738
+ "maxScore": 1,
34739
+ "penalty": 0,
34740
+ "score": 0.71875,
34741
+ "scored": 0.71875
34742
+ },
34743
+ {
34744
+ "hintsRevealed": 2,
34745
+ "maxScore": 1,
34746
+ "penalty": 0.2,
34747
+ "score": 1,
34748
+ "scored": 0.8
34749
+ }
34750
+ ]
34751
+ },
34752
+ "fn": "evaluateTries",
34753
+ "id": "evaluateTries/dc/best"
34754
+ },
34755
+ {
34756
+ "args": [
34757
+ {
34758
+ "id": "wr-weekend",
34759
+ "maxWords": 12,
34760
+ "minWords": 5,
34761
+ "prompt": "Describe your last weekend in 5 to 12 words.",
34762
+ "schemaVersion": "1.0",
34763
+ "title": "Your weekend",
34764
+ "type": "written-response"
34765
+ },
34766
+ {
34767
+ "text": "One two three four five six.",
34768
+ "type": "written-response",
34769
+ "wordCount": 6
34770
+ },
34771
+ {
34772
+ "scoring": {
34773
+ "hintPenalty": 0.5
34774
+ }
34775
+ }
34776
+ ],
34777
+ "expect": {
34778
+ "maxScore": 1,
34779
+ "partial": {
34780
+ "withinWordBounds": true,
34781
+ "wordCount": 6
34782
+ },
34783
+ "reason": "requires_async_grading",
34784
+ "status": "deferred"
34785
+ },
34786
+ "fn": "evaluate",
34787
+ "id": "evaluate/wr/scoring-policy-leaves-deferred",
34788
+ "note": "A written response is graded later: a scoring policy has nothing to charge yet, and the outcome stays deferred rather than turning unscorable."
34789
+ },
34790
+ {
34791
+ "args": [
34792
+ {
34793
+ "id": "wr-weekend",
34794
+ "maxWords": 12,
34795
+ "minWords": 5,
34796
+ "prompt": "Describe your last weekend in 5 to 12 words.",
34797
+ "schemaVersion": "1.0",
34798
+ "title": "Your weekend",
34799
+ "type": "written-response"
34800
+ },
34801
+ [
34802
+ {
34803
+ "text": "One two three four five six.",
34804
+ "type": "written-response",
34805
+ "wordCount": 6
34806
+ }
34807
+ ],
34808
+ {
34809
+ "scoring": {
34810
+ "retries": 1
34811
+ }
34812
+ }
34813
+ ],
34814
+ "expect": {
34815
+ "counted": null,
34816
+ "outcome": {
34817
+ "maxScore": 1,
34818
+ "partial": {
34819
+ "withinWordBounds": true,
34820
+ "wordCount": 6
34821
+ },
34822
+ "reason": "requires_async_grading",
34823
+ "status": "deferred"
34824
+ },
34825
+ "tries": []
34826
+ },
34827
+ "fn": "evaluateTries",
34828
+ "id": "evaluateTries/wr/scoring-policy-leaves-deferred"
34829
+ },
34830
+ {
34831
+ "args": [
34832
+ {
34833
+ "id": "mc-capitals",
34834
+ "mode": "multi",
34835
+ "options": [
34836
+ {
34837
+ "id": "a",
34838
+ "isCorrect": true,
34839
+ "text": "Lisbon"
34840
+ },
34841
+ {
34842
+ "id": "b",
34843
+ "isCorrect": false,
34844
+ "text": "Porto"
34845
+ },
34846
+ {
34847
+ "id": "c",
34848
+ "isCorrect": true,
34849
+ "text": "Madrid"
34850
+ },
34851
+ {
34852
+ "id": "d",
34853
+ "isCorrect": false,
34854
+ "text": "Seville"
34855
+ }
34856
+ ],
34857
+ "question": "Which of these are capital cities?",
34858
+ "schemaVersion": "1.0",
34859
+ "scoringStrategy": "all-or-nothing",
34860
+ "title": "Capitals",
34861
+ "type": "multiple-choice"
34862
+ },
34863
+ [],
34864
+ {
34865
+ "scoring": {
34866
+ "counts": "best",
34867
+ "hintPenalty": 0.1,
34868
+ "retries": 2,
34869
+ "retryPenalty": 0.25
34870
+ }
34871
+ }
34872
+ ],
34873
+ "expect": {
34874
+ "counted": null,
34875
+ "outcome": {
34876
+ "maxScore": 1,
34877
+ "reason": "no_response_recorded",
34878
+ "status": "deferred"
34879
+ },
34880
+ "tries": []
34881
+ },
34882
+ "fn": "evaluateTries",
34883
+ "id": "evaluateTries/no-try-is-no-response-recorded"
34884
+ },
34885
+ {
34886
+ "args": [
34887
+ {
34888
+ "id": "mc-capitals",
34889
+ "mode": "multi",
34890
+ "options": [
34891
+ {
34892
+ "id": "a",
34893
+ "isCorrect": true,
34894
+ "text": "Lisbon"
34895
+ },
34896
+ {
34897
+ "id": "b",
34898
+ "isCorrect": false,
34899
+ "text": "Porto"
34900
+ },
34901
+ {
34902
+ "id": "c",
34903
+ "isCorrect": true,
34904
+ "text": "Madrid"
34905
+ },
34906
+ {
34907
+ "id": "d",
34908
+ "isCorrect": false,
34909
+ "text": "Seville"
34910
+ }
34911
+ ],
34912
+ "question": "Which of these are capital cities?",
34913
+ "schemaVersion": "1.0",
34914
+ "scoringStrategy": "all-or-nothing",
34915
+ "title": "Capitals",
34916
+ "type": "multiple-choice"
34917
+ },
34918
+ [
34919
+ {
34920
+ "selectedOptionIds": ["a"],
34921
+ "type": "multiple-choice"
34922
+ },
34923
+ {
34924
+ "selectedOptionIds": ["a", "c"],
34925
+ "type": "multiple-choice"
34926
+ }
34927
+ ]
34928
+ ],
34929
+ "expect": {
34930
+ "counted": 0,
34931
+ "outcome": {
34932
+ "details": [
34933
+ {
34934
+ "correct": true,
34935
+ "correctResponse": ["selected"],
34936
+ "itemId": "a",
34937
+ "learnerResponse": ["selected"],
34938
+ "outcome": "correct",
34939
+ "weight": 1
34940
+ },
34941
+ {
34942
+ "correct": true,
34943
+ "correctResponse": ["not-selected"],
34944
+ "itemId": "b",
34945
+ "learnerResponse": ["not-selected"],
34946
+ "outcome": "correct-omission",
34947
+ "weight": 1
34948
+ },
34949
+ {
34950
+ "correct": false,
34951
+ "correctResponse": ["selected"],
34952
+ "itemId": "c",
34953
+ "learnerResponse": ["not-selected"],
34954
+ "outcome": "incorrect-omission",
34955
+ "weight": 1
34956
+ },
34957
+ {
34958
+ "correct": true,
34959
+ "correctResponse": ["not-selected"],
34960
+ "itemId": "d",
34961
+ "learnerResponse": ["not-selected"],
34962
+ "outcome": "correct-omission",
34963
+ "weight": 1
34964
+ }
34965
+ ],
34966
+ "feedback": null,
34967
+ "maxScore": 1,
34968
+ "passed": false,
34969
+ "score": 0,
34970
+ "status": "scored"
34971
+ },
34972
+ "tries": [
34973
+ {
34974
+ "hintsRevealed": 0,
34975
+ "maxScore": 1,
34976
+ "penalty": 0,
34977
+ "score": 0,
34978
+ "scored": 0
34979
+ }
34980
+ ]
34981
+ },
34982
+ "fn": "evaluateTries",
34983
+ "id": "evaluateTries/no-policy-is-evaluate-of-the-first"
32858
34984
  }
32859
34985
  ]
32860
34986
  }