@digabi/exam-engine-mastering 19.10.1-alpha.0 → 19.10.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAmBpC,eAAO,MAAM,wBAAwB,QAAkD,CAAA;AAEvF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAe/C"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAiBpC,eAAO,MAAM,wBAAwB,QAAkD,CAAA;AAEvF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAe/C"}
@@ -5,14 +5,12 @@ const compare_versions_1 = require("compare-versions");
5
5
  const migrateFrom01To02_1 = require("./migrations/migrateFrom01To02");
6
6
  const migrateFrom02To03_1 = require("./migrations/migrateFrom02To03");
7
7
  const migrateFrom03To04_1 = require("./migrations/migrateFrom03To04");
8
- const migrateFrom04To05_1 = require("./migrations/migrateFrom04To05");
9
8
  const noop = () => { };
10
9
  const migrations = {
11
10
  '0.1': migrateFrom01To02_1.migrateFrom01To02,
12
11
  '0.2': migrateFrom02To03_1.migrateFrom02To03,
13
12
  '0.3': migrateFrom03To04_1.migrateFrom03To04,
14
- '0.4': migrateFrom04To05_1.migrateFrom04To05,
15
- '0.5': noop
13
+ '0.4': noop
16
14
  };
17
15
  const supportedVersions = Object.keys(migrations);
18
16
  exports.currentExamSchemaVersion = supportedVersions[supportedVersions.length - 1];
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.js","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":";;;AACA,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sEAAkE;AAClE,sEAAkE;AAClE,sEAAkE;AAIlE,MAAM,IAAI,GAAc,GAAG,EAAE,GAAE,CAAC,CAAA;AAChC,MAAM,UAAU,GAA8B;IAC5C,KAAK,EAAE,qCAAiB;IACxB,KAAK,EAAE,qCAAiB;IACxB,KAAK,EAAE,qCAAiB;IACxB,KAAK,EAAE,IAAI;CACZ,CAAA;AACD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AAEpC,QAAA,wBAAwB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAEvF;;;;GAIG;AACH,SAAgB,WAAW,CAAC,GAAa;;IACvC,MAAM,iBAAiB,GAAG,MAAA,MAAA,GAAG,CAAC,IAAI,EAAE,0CAAE,IAAI,CAAC,qBAAqB,CAAC,0CAAE,KAAK,EAAE,CAAA;IAE1E,IAAI,iBAAiB,IAAI,IAAI,EAAE;QAC7B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;KAC1D;SAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;QACzD,MAAM,IAAI,KAAK,CAAC,oCAAoC,iBAAiB;sFACa,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;KAClH;IAED,KAAK,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QACpE,IAAI,IAAA,0BAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE;YACtD,OAAO,CAAC,GAAG,CAAC,CAAA;SACb;KACF;AACH,CAAC;AAfD,kCAeC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digabi/exam-engine-mastering",
3
- "version": "19.10.1-alpha.0",
3
+ "version": "19.10.1",
4
4
  "main": "dist/index.js",
5
5
  "author": "Matriculation Examination Board, Finland",
6
6
  "license": "EUPL-1.1",
@@ -9,8 +9,8 @@
9
9
  "schema"
10
10
  ],
11
11
  "dependencies": {
12
- "@digabi/exam-engine-core": "19.10.1-alpha.0",
13
- "@digabi/exam-engine-rendering": "19.10.1-alpha.0",
12
+ "@digabi/exam-engine-core": "19.10.1",
13
+ "@digabi/exam-engine-rendering": "19.10.1",
14
14
  "@ffprobe-installer/ffprobe": "^2.0.0",
15
15
  "cloneable-readable": "^3.0.0",
16
16
  "compare-versions": "^6.0.0",
@@ -21,5 +21,5 @@
21
21
  "mathjax-node": "^2.1.1",
22
22
  "yazl": "^2.5.1"
23
23
  },
24
- "gitHead": "a726ad628b2fd5ee43486871572711d2a21530f1"
24
+ "gitHead": "a8a8f6a5c63a550bdce41f7368ec0c64674a654f"
25
25
  }
package/schema/exam.xsd CHANGED
@@ -73,7 +73,7 @@
73
73
 
74
74
  <xs:simpleType name="exam-schema-version">
75
75
  <xs:restriction base="xs:string">
76
- <xs:enumeration value="0.5" />
76
+ <xs:enumeration value="0.4" />
77
77
  </xs:restriction>
78
78
  </xs:simpleType>
79
79
 
@@ -1,8 +0,0 @@
1
- import { Document } from 'libxmljs2';
2
- /**
3
- * Migrates an exam from schema version 0.4 to 0.5
4
- *
5
- * Combine multiple cas-forbidden sections into one section (only a single cas forbidden section is allowed)
6
- */
7
- export declare function migrateFrom04To05(doc: Document): void;
8
- //# sourceMappingURL=migrateFrom04To05.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrateFrom04To05.d.ts","sourceRoot":"","sources":["../../src/migrations/migrateFrom04To05.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAW,MAAM,WAAW,CAAA;AAG7C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,QAuC9C"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateFrom04To05 = void 0;
4
- const libxmljs2_1 = require("libxmljs2");
5
- const schema_1 = require("../mastering/schema");
6
- /**
7
- * Migrates an exam from schema version 0.4 to 0.5
8
- *
9
- * Combine multiple cas-forbidden sections into one section (only a single cas forbidden section is allowed)
10
- */
11
- function migrateFrom04To05(doc) {
12
- var _a, _b, _c;
13
- const casForbiddenSections = doc
14
- .find('./e:section', schema_1.ns)
15
- .filter(section => { var _a; return ((_a = section.attr('cas-forbidden')) === null || _a === void 0 ? void 0 : _a.value()) == 'true'; });
16
- if (casForbiddenSections.length == 0) {
17
- return; // no cas-forbidden sections
18
- }
19
- const firstSection = (_a = doc.find('./e:section', schema_1.ns)) === null || _a === void 0 ? void 0 : _a.at(0);
20
- const isFirstSectionCasForbidden = ((_b = firstSection.attr('cas-forbidden')) === null || _b === void 0 ? void 0 : _b.value()) == 'true';
21
- if (casForbiddenSections.length == 1 && isFirstSectionCasForbidden) {
22
- return; // only the first section is cas-forbidden
23
- }
24
- const firstCasForbiddenSection = casForbiddenSections[0];
25
- let firstCasForbiddenSectionInstruction = firstCasForbiddenSection.get('./e:section-instruction', schema_1.ns);
26
- if (!firstCasForbiddenSectionInstruction) {
27
- firstCasForbiddenSectionInstruction = new libxmljs2_1.Element(doc, 'e:section-instruction');
28
- firstCasForbiddenSection.addChild(firstCasForbiddenSectionInstruction);
29
- }
30
- // merge section-instruction and questions from other cas-forbidden sections into first
31
- for (const section of casForbiddenSections.slice(1)) {
32
- const sectionInstruction = (_c = section.get('./e:section-instruction', schema_1.ns)) === null || _c === void 0 ? void 0 : _c.childNodes();
33
- if (sectionInstruction) {
34
- for (const child of sectionInstruction) {
35
- firstCasForbiddenSectionInstruction.addChild(child);
36
- }
37
- }
38
- const questions = section.find('./e:question', schema_1.ns);
39
- for (const question of questions) {
40
- firstCasForbiddenSection.addChild(question);
41
- }
42
- section.remove();
43
- }
44
- // Move cas-forbidden section to be first section if that's not the case
45
- if (!isFirstSectionCasForbidden) {
46
- firstSection.addPrevSibling(firstCasForbiddenSection);
47
- }
48
- }
49
- exports.migrateFrom04To05 = migrateFrom04To05;
50
- //# sourceMappingURL=migrateFrom04To05.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrateFrom04To05.js","sourceRoot":"","sources":["../../src/migrations/migrateFrom04To05.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAC7C,gDAAwC;AAExC;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,GAAa;;IAC7C,MAAM,oBAAoB,GAAG,GAAG;SAC7B,IAAI,CAAU,aAAa,EAAE,WAAE,CAAC;SAChC,MAAM,CAAC,OAAO,CAAC,EAAE,WAAC,OAAA,CAAA,MAAA,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,0CAAE,KAAK,EAAE,KAAI,MAAM,CAAA,EAAA,CAAC,CAAA;IACtE,IAAI,oBAAoB,CAAC,MAAM,IAAI,CAAC,EAAE;QACpC,OAAM,CAAC,4BAA4B;KACpC;IACD,MAAM,YAAY,GAAG,MAAA,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,WAAE,CAAC,0CAAE,EAAE,CAAC,CAAC,CAAY,CAAA;IAClE,MAAM,0BAA0B,GAAG,CAAA,MAAA,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,0CAAE,KAAK,EAAE,KAAI,MAAM,CAAA;IACxF,IAAI,oBAAoB,CAAC,MAAM,IAAI,CAAC,IAAI,0BAA0B,EAAE;QAClE,OAAM,CAAC,0CAA0C;KAClD;IAED,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;IACxD,IAAI,mCAAmC,GAAG,wBAAwB,CAAC,GAAG,CAAU,yBAAyB,EAAE,WAAE,CAAC,CAAA;IAC9G,IAAI,CAAC,mCAAmC,EAAE;QACxC,mCAAmC,GAAG,IAAI,mBAAO,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAA;QAC/E,wBAAwB,CAAC,QAAQ,CAAC,mCAAmC,CAAC,CAAA;KACvE;IAED,uFAAuF;IACvF,KAAK,MAA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