@quesmed/types 2.6.213 → 2.6.215

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.
@@ -22,7 +22,8 @@ export declare enum IAccessLevel {
22
22
  EXPIRED = "expired",
23
23
  EDITOR = "editor",
24
24
  MARKETING = "marketing",
25
- WRITER = "writer"
25
+ WRITER = "writer",
26
+ SENIOR_EDITOR = "seniorEditor"
26
27
  }
27
28
  export declare enum ETheme {
28
29
  AUTO = 0,
@@ -15,6 +15,7 @@ var IAccessLevel;
15
15
  IAccessLevel["EDITOR"] = "editor";
16
16
  IAccessLevel["MARKETING"] = "marketing";
17
17
  IAccessLevel["WRITER"] = "writer";
18
+ IAccessLevel["SENIOR_EDITOR"] = "seniorEditor";
18
19
  })(IAccessLevel = exports.IAccessLevel || (exports.IAccessLevel = {}));
19
20
  var ETheme;
20
21
  (function (ETheme) {
@@ -80,7 +80,12 @@ function evaluateMark({ mark, answer, questionTypeId, psaSectionId, choices, })
80
80
  const normalizedAttempt = flatAttempt
81
81
  ? flatAttempt.toLowerCase().replace(/\s/g, '')
82
82
  : '';
83
- if (normalizedAnswer === normalizedAttempt) {
83
+ const answerNum = Number.parseFloat(normalizedAnswer);
84
+ const attemptNum = Number.parseFloat(normalizedAttempt);
85
+ const isNumericMatch = !Number.isNaN(answerNum) &&
86
+ !Number.isNaN(attemptNum) &&
87
+ answerNum === attemptNum;
88
+ if (isNumericMatch || normalizedAnswer === normalizedAttempt) {
84
89
  // for psa section, we give 2 marks for correct answer
85
90
  data.score = psaSectionId ? 2 : 1;
86
91
  data.result = models_1.EMarkResult.Correct;
@@ -22,7 +22,8 @@ export declare enum IAccessLevel {
22
22
  EXPIRED = "expired",
23
23
  EDITOR = "editor",
24
24
  MARKETING = "marketing",
25
- WRITER = "writer"
25
+ WRITER = "writer",
26
+ SENIOR_EDITOR = "seniorEditor"
26
27
  }
27
28
  export declare enum ETheme {
28
29
  AUTO = 0,
@@ -12,6 +12,7 @@ export var IAccessLevel;
12
12
  IAccessLevel["EDITOR"] = "editor";
13
13
  IAccessLevel["MARKETING"] = "marketing";
14
14
  IAccessLevel["WRITER"] = "writer";
15
+ IAccessLevel["SENIOR_EDITOR"] = "seniorEditor";
15
16
  })(IAccessLevel || (IAccessLevel = {}));
16
17
  export var ETheme;
17
18
  (function (ETheme) {
@@ -77,7 +77,12 @@ export function evaluateMark({ mark, answer, questionTypeId, psaSectionId, choic
77
77
  const normalizedAttempt = flatAttempt
78
78
  ? flatAttempt.toLowerCase().replace(/\s/g, '')
79
79
  : '';
80
- if (normalizedAnswer === normalizedAttempt) {
80
+ const answerNum = Number.parseFloat(normalizedAnswer);
81
+ const attemptNum = Number.parseFloat(normalizedAttempt);
82
+ const isNumericMatch = !Number.isNaN(answerNum) &&
83
+ !Number.isNaN(attemptNum) &&
84
+ answerNum === attemptNum;
85
+ if (isNumericMatch || normalizedAnswer === normalizedAttempt) {
81
86
  // for psa section, we give 2 marks for correct answer
82
87
  data.score = psaSectionId ? 2 : 1;
83
88
  data.result = EMarkResult.Correct;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.213",
3
+ "version": "2.6.215",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",