@quesmed/types-rn 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.
- package/models/User.d.ts +2 -1
- package/models/User.js +1 -0
- package/package.json +1 -1
- package/utils/evaluateMark.js +6 -1
package/models/User.d.ts
CHANGED
package/models/User.js
CHANGED
|
@@ -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) {
|
package/package.json
CHANGED
package/utils/evaluateMark.js
CHANGED
|
@@ -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
|
-
|
|
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;
|