math-exercises 3.0.86 → 3.0.88
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/lib/exercises/exercise.d.ts +7 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/decimalBoundingOnLine.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/index.d.ts +0 -10
- package/lib/exercises/math/calcul/arithmetics/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/index.js +0 -10
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +1 -1
- package/lib/exercises/math/calcul/fractions/evalFractionExpression.d.ts +9 -0
- package/lib/exercises/math/calcul/fractions/evalFractionExpression.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/evalFractionExpression.js +113 -0
- package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionSquare.js +1 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts +2 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/index.js +2 -0
- package/lib/exercises/math/calcul/fractions/powerNotation.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/powerNotation.js +1 -0
- package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -0
- package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.js +1 -0
- package/lib/exercises/math/calcul/fractions/simplifyToFraction.d.ts +9 -0
- package/lib/exercises/math/calcul/fractions/simplifyToFraction.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/simplifyToFraction.js +168 -0
- package/lib/exercises/math/calcul/ordering/framing.js +3 -3
- package/lib/exercises/math/calcul/sign/absoluteNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/sign/absoluteNumber.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/index.js +2 -0
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts +15 -0
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.js +143 -0
- package/lib/exercises/math/calculLitteral/inequations/minNumberInequality.d.ts +13 -0
- package/lib/exercises/math/calculLitteral/inequations/minNumberInequality.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/minNumberInequality.js +192 -0
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
- package/lib/exercises/math/functions/absolute/calculateDistanceBetweenNumbers.d.ts +8 -0
- package/lib/exercises/math/functions/absolute/calculateDistanceBetweenNumbers.d.ts.map +1 -0
- package/lib/exercises/math/functions/absolute/calculateDistanceBetweenNumbers.js +102 -0
- package/lib/exercises/math/functions/absolute/calculateDistanceWithAbsoluteValue.d.ts +10 -0
- package/lib/exercises/math/functions/absolute/calculateDistanceWithAbsoluteValue.d.ts.map +1 -0
- package/lib/exercises/math/functions/absolute/calculateDistanceWithAbsoluteValue.js +112 -0
- package/lib/exercises/math/functions/absolute/calculateWithAbsoluteValue.d.ts +8 -0
- package/lib/exercises/math/functions/absolute/calculateWithAbsoluteValue.d.ts.map +1 -0
- package/lib/exercises/math/functions/absolute/calculateWithAbsoluteValue.js +124 -0
- package/lib/exercises/math/functions/absolute/index.d.ts +3 -0
- package/lib/exercises/math/functions/absolute/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/index.js +3 -0
- package/lib/exercises/math/functions/basics/index.d.ts +2 -0
- package/lib/exercises/math/functions/basics/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/index.js +2 -1
- package/lib/exercises/math/functions/basics/valueTableCompletion.d.ts +2 -1
- package/lib/exercises/math/functions/basics/valueTableCompletion.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/valueTableCompletion.js +103 -31
- package/lib/exercises/math/functions/basics/valueTableFromGraph.d.ts +8 -0
- package/lib/exercises/math/functions/basics/valueTableFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/basics/valueTableFromGraph.js +139 -0
- package/lib/exercises/math/functions/sqrt/index.d.ts +2 -0
- package/lib/exercises/math/functions/sqrt/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/sqrt/index.js +2 -0
- package/lib/exercises/math/functions/sqrt/sqrtInequality.d.ts +10 -0
- package/lib/exercises/math/functions/sqrt/sqrtInequality.d.ts.map +1 -0
- package/lib/exercises/math/functions/sqrt/sqrtInequality.js +160 -0
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.d.ts +8 -0
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.d.ts.map +1 -0
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.js +108 -0
- package/lib/exercises/math/geometry/angles/recognizeAngleType.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/recognizeAngleType.js +0 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.js +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.js +1 -1
- package/lib/exercises/math/geometry/index.d.ts +0 -1
- package/lib/exercises/math/geometry/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/index.js +0 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +1 -1
- package/lib/exercises/math/geometry/lines/findParallelLineFromCartesianEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/findParallelLineFromCartesianEquation.js +1 -1
- package/lib/exercises/math/geometry/lines/findParallelLineFromReductEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/findParallelLineFromReductEquation.js +1 -1
- package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +1 -1
- package/lib/exercises/math/percent/evolutions/globalCM.d.ts +7 -0
- package/lib/exercises/math/percent/evolutions/globalCM.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/globalCM.js +89 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts +1 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/index.js +1 -0
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/percent/percentOfPercent.d.ts +8 -0
- package/lib/exercises/math/percent/percentOfPercent.d.ts.map +1 -0
- package/lib/exercises/math/percent/percentOfPercent.js +89 -0
- package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.js +1 -0
- package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.js +2 -0
- package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersMixOperations.js +1 -0
- package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersPower.js +2 -0
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +2 -0
- package/lib/exercises/math/probaStat/basicStats/index.d.ts +0 -1
- package/lib/exercises/math/probaStat/basicStats/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicStats/index.js +0 -1
- package/lib/exercises/math/probaStat/index.d.ts +0 -2
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +0 -2
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +2 -2
- package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.d.ts +12 -0
- package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.js +178 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.js +1 -0
- package/lib/exercises/math/sampling/getSampleCountAndSize.d.ts +12 -0
- package/lib/exercises/math/sampling/getSampleCountAndSize.d.ts.map +1 -0
- package/lib/exercises/math/sampling/getSampleCountAndSize.js +95 -0
- package/lib/exercises/math/sampling/index.d.ts +2 -0
- package/lib/exercises/math/sampling/index.d.ts.map +1 -1
- package/lib/exercises/math/sampling/index.js +2 -0
- package/lib/exercises/math/sampling/samplingFrequency.d.ts +7 -0
- package/lib/exercises/math/sampling/samplingFrequency.d.ts.map +1 -0
- package/lib/exercises/math/sampling/samplingFrequency.js +106 -0
- package/lib/exercises/math/sets/intervals/index.d.ts +2 -0
- package/lib/exercises/math/sets/intervals/index.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/index.js +2 -0
- package/lib/exercises/math/sets/intervals/intervalOnGraph.d.ts +8 -0
- package/lib/exercises/math/sets/intervals/intervalOnGraph.d.ts.map +1 -0
- package/lib/exercises/math/sets/intervals/intervalOnGraph.js +156 -0
- package/lib/exercises/math/sets/intervals/isNumberInInterval.d.ts +9 -0
- package/lib/exercises/math/sets/intervals/isNumberInInterval.d.ts.map +1 -0
- package/lib/exercises/math/sets/intervals/isNumberInInterval.js +174 -0
- package/lib/exercises/math/squareRoots/simpifySquareRoot.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/simpifySquareRoot.js +1 -0
- package/lib/exercises/math/squareRoots/squareRootIdentities.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootIdentities.js +1 -0
- package/lib/exercises/math/squareRoots/squareRootsDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsDistributivity.js +1 -0
- package/lib/exercises/math/squareRoots/squareRootsFractions.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsFractions.js +1 -0
- package/lib/exercises/math/squareRoots/squareRootsProducts.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsProducts.js +1 -0
- package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.js +1 -0
- package/lib/geogebra/spline.d.ts +2 -1
- package/lib/geogebra/spline.d.ts.map +1 -1
- package/lib/geogebra/spline.js +39 -1
- package/lib/index.d.ts +68 -55
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +0 -11
- package/lib/server.js +21 -0
- package/lib/tests/exoTest.d.ts.map +1 -1
- package/lib/tests/exoTest.js +9 -2
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +21 -2
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +0 -1
- package/lib/utils/markdown/mdTable.d.ts +1 -1
- package/lib/utils/markdown/mdTable.d.ts.map +1 -1
- package/lib/utils/markdown/mdTable.js +10 -5
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -46,24 +46,6 @@ declare const mathExercises: (Exercise<{
|
|
|
46
46
|
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
47
47
|
isDecimal: boolean;
|
|
48
48
|
}[];
|
|
49
|
-
}, {}> | Exercise<{
|
|
50
|
-
a: number;
|
|
51
|
-
b: number;
|
|
52
|
-
c: number;
|
|
53
|
-
d: number;
|
|
54
|
-
x: number;
|
|
55
|
-
left: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
56
|
-
right: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
57
|
-
inequalitySign: boolean;
|
|
58
|
-
}, {}> | Exercise<{
|
|
59
|
-
aLimit: number;
|
|
60
|
-
bLimit: number;
|
|
61
|
-
x: number;
|
|
62
|
-
y: number;
|
|
63
|
-
case: "lt" | "lte" | "lt_gt";
|
|
64
|
-
expressionToCheck: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
65
|
-
}, {}> | Exercise<{
|
|
66
|
-
x: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
67
49
|
}, {}> | Exercise<{
|
|
68
50
|
x: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
69
51
|
y: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
@@ -84,31 +66,9 @@ declare const mathExercises: (Exercise<{
|
|
|
84
66
|
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
85
67
|
b: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
86
68
|
isMinusInside: boolean;
|
|
87
|
-
}, {}> | Exercise<{
|
|
88
|
-
a: number;
|
|
89
|
-
b: number;
|
|
90
69
|
}, {}> | Exercise<{
|
|
91
70
|
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
92
71
|
b: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
93
|
-
}, {}> | Exercise<{
|
|
94
|
-
expression: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
95
|
-
}, {}> | Exercise<{
|
|
96
|
-
twoSided: boolean;
|
|
97
|
-
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
98
|
-
b?: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
99
|
-
}, {}> | Exercise<{
|
|
100
|
-
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
101
|
-
b: number;
|
|
102
|
-
c: number;
|
|
103
|
-
}, {}> | Exercise<{
|
|
104
|
-
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
105
|
-
interval: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
106
|
-
}, {}> | Exercise<{
|
|
107
|
-
expr: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
108
|
-
x: number;
|
|
109
|
-
}, {}> | Exercise<{
|
|
110
|
-
type: number;
|
|
111
|
-
expr: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
112
72
|
}, {}> | Exercise<{
|
|
113
73
|
point: import("./math/geometry/point.js").PointIdentifiers;
|
|
114
74
|
bounding: number;
|
|
@@ -193,6 +153,12 @@ declare const mathExercises: (Exercise<{
|
|
|
193
153
|
b: number;
|
|
194
154
|
c: number;
|
|
195
155
|
d: number;
|
|
156
|
+
}, {}> | Exercise<{
|
|
157
|
+
type: number;
|
|
158
|
+
expr: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
159
|
+
}, {}> | Exercise<{
|
|
160
|
+
expr: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
161
|
+
x: number;
|
|
196
162
|
}, {}> | Exercise<{
|
|
197
163
|
numbers: number[];
|
|
198
164
|
}, {}> | Exercise<{
|
|
@@ -519,6 +485,22 @@ declare const mathExercises: (Exercise<{
|
|
|
519
485
|
a: number;
|
|
520
486
|
lt: boolean;
|
|
521
487
|
b: number;
|
|
488
|
+
}, {}> | Exercise<{
|
|
489
|
+
aLimit: number;
|
|
490
|
+
bLimit: number;
|
|
491
|
+
x: number;
|
|
492
|
+
y: number;
|
|
493
|
+
case: "lt" | "lte" | "lt_gt";
|
|
494
|
+
expressionToCheck: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
495
|
+
}, {}> | Exercise<{
|
|
496
|
+
a: number;
|
|
497
|
+
b: number;
|
|
498
|
+
c: number;
|
|
499
|
+
d: number;
|
|
500
|
+
x: number;
|
|
501
|
+
left: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
502
|
+
right: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
503
|
+
inequalitySign: boolean;
|
|
522
504
|
}, {}> | Exercise<{
|
|
523
505
|
rand: boolean;
|
|
524
506
|
poly1: number[];
|
|
@@ -788,6 +770,15 @@ declare const mathExercises: (Exercise<{
|
|
|
788
770
|
}, {}> | Exercise<{
|
|
789
771
|
isSup: boolean;
|
|
790
772
|
n: number;
|
|
773
|
+
}, {}> | Exercise<{
|
|
774
|
+
a: number;
|
|
775
|
+
b: number;
|
|
776
|
+
}, {}> | Exercise<{
|
|
777
|
+
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
778
|
+
b: number;
|
|
779
|
+
c: number;
|
|
780
|
+
}, {}> | Exercise<{
|
|
781
|
+
expression: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
791
782
|
}, {}> | Exercise<{
|
|
792
783
|
xA: number;
|
|
793
784
|
yA: number;
|
|
@@ -906,6 +897,12 @@ declare const mathExercises: (Exercise<{
|
|
|
906
897
|
inegalitySymbol: import("./math/inequations/inequation.js").InegalitySymbols;
|
|
907
898
|
a: number;
|
|
908
899
|
b: number;
|
|
900
|
+
}, {}> | Exercise<{
|
|
901
|
+
coeffs: number[];
|
|
902
|
+
initTable: string[][];
|
|
903
|
+
}, {}> | Exercise<{
|
|
904
|
+
points: number[][];
|
|
905
|
+
initTable: string[][];
|
|
909
906
|
}, {}> | Exercise<{
|
|
910
907
|
k: number;
|
|
911
908
|
}, {}> | Exercise<{
|
|
@@ -1131,6 +1128,12 @@ declare const mathExercises: (Exercise<{
|
|
|
1131
1128
|
}, {}> | Exercise<{
|
|
1132
1129
|
a: number;
|
|
1133
1130
|
b: number;
|
|
1131
|
+
}, {}> | Exercise<{
|
|
1132
|
+
twoSided: boolean;
|
|
1133
|
+
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1134
|
+
b?: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1135
|
+
}, {}> | Exercise<{
|
|
1136
|
+
x: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1134
1137
|
}, {}> | Exercise<{
|
|
1135
1138
|
coin: boolean;
|
|
1136
1139
|
radius: number;
|
|
@@ -1573,8 +1576,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1573
1576
|
}, {}> | Exercise<{
|
|
1574
1577
|
triangleIdentifiers: import("./math/geometry/triangles/triangle.js").TriangleIdentifiers;
|
|
1575
1578
|
angleAsked: number;
|
|
1576
|
-
}, {}> | Exercise<{
|
|
1577
|
-
intervalNodeIdentifiers: import("./tree/nodes/sets/intervalNode.js").IntervalNodeIdentifiers;
|
|
1578
1579
|
}, {}> | Exercise<{
|
|
1579
1580
|
coeffs: number[];
|
|
1580
1581
|
to: "+\\infty" | "-\\infty";
|
|
@@ -1683,6 +1684,8 @@ declare const mathExercises: (Exercise<{
|
|
|
1683
1684
|
price: number;
|
|
1684
1685
|
evolution: number;
|
|
1685
1686
|
askingFinalPrice: boolean;
|
|
1687
|
+
}, {}> | Exercise<{
|
|
1688
|
+
evolutions: number[];
|
|
1686
1689
|
}, {}> | Exercise<{
|
|
1687
1690
|
initialCapital: number;
|
|
1688
1691
|
rate: number;
|
|
@@ -1696,6 +1699,9 @@ declare const mathExercises: (Exercise<{
|
|
|
1696
1699
|
}, {
|
|
1697
1700
|
withFormula?: boolean;
|
|
1698
1701
|
}> | Exercise<{
|
|
1702
|
+
x: number;
|
|
1703
|
+
y: number;
|
|
1704
|
+
}, {}> | Exercise<{
|
|
1699
1705
|
int: number;
|
|
1700
1706
|
power: number;
|
|
1701
1707
|
}, {}> | Exercise<{
|
|
@@ -1855,6 +1861,13 @@ declare const mathExercises: (Exercise<{
|
|
|
1855
1861
|
xVals: number[];
|
|
1856
1862
|
yVals: number[];
|
|
1857
1863
|
x: number;
|
|
1864
|
+
}, {}> | Exercise<{
|
|
1865
|
+
labels: string[];
|
|
1866
|
+
serie1: number[];
|
|
1867
|
+
serie2: number[];
|
|
1868
|
+
a: number;
|
|
1869
|
+
b: number;
|
|
1870
|
+
isBetween: boolean;
|
|
1858
1871
|
}, {}> | Exercise<{
|
|
1859
1872
|
xValues: number[];
|
|
1860
1873
|
yValues: number[];
|
|
@@ -1920,8 +1933,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1920
1933
|
}> | Exercise<{
|
|
1921
1934
|
values: number[];
|
|
1922
1935
|
target: number;
|
|
1923
|
-
}, {}> | Exercise<{
|
|
1924
|
-
samples: number[];
|
|
1925
1936
|
}, {}> | Exercise<{
|
|
1926
1937
|
xValuesIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1927
1938
|
yValuesIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
@@ -1945,10 +1956,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1945
1956
|
total: number;
|
|
1946
1957
|
distribution: number[];
|
|
1947
1958
|
observe: boolean;
|
|
1948
|
-
}, {}> | Exercise<{
|
|
1949
|
-
expCount: number;
|
|
1950
|
-
repCount: number;
|
|
1951
|
-
isSize: boolean;
|
|
1952
1959
|
}, {}> | Exercise<{
|
|
1953
1960
|
eventA: {
|
|
1954
1961
|
desc: string;
|
|
@@ -1990,13 +1997,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1990
1997
|
}, {}> | Exercise<MathExercises.Identifiers, {}> | Exercise<{
|
|
1991
1998
|
a: number;
|
|
1992
1999
|
type: number;
|
|
1993
|
-
}, {}> | Exercise<{
|
|
1994
|
-
labels: string[];
|
|
1995
|
-
serie1: number[];
|
|
1996
|
-
serie2: number[];
|
|
1997
|
-
a: number;
|
|
1998
|
-
b: number;
|
|
1999
|
-
isBetween: boolean;
|
|
2000
2000
|
}, {}> | Exercise<{
|
|
2001
2001
|
firstValue: number;
|
|
2002
2002
|
askedRank: number;
|
|
@@ -2129,6 +2129,11 @@ declare const mathExercises: (Exercise<{
|
|
|
2129
2129
|
int2Identifiers: import("./tree/nodes/sets/intervalNode.js").IntervalNodeIdentifiers;
|
|
2130
2130
|
}, {}> | Exercise<{
|
|
2131
2131
|
intervalIdentifiers: import("./tree/nodes/sets/intervalNode.js").IntervalNodeIdentifiers;
|
|
2132
|
+
}, {}> | Exercise<{
|
|
2133
|
+
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2134
|
+
interval: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2135
|
+
}, {}> | Exercise<{
|
|
2136
|
+
intervalNodeIdentifiers: import("./tree/nodes/sets/intervalNode.js").IntervalNodeIdentifiers;
|
|
2132
2137
|
}, {}> | Exercise<{
|
|
2133
2138
|
type: number;
|
|
2134
2139
|
nb: string;
|
|
@@ -2329,6 +2334,14 @@ declare const mathExercises: (Exercise<{
|
|
|
2329
2334
|
n: number;
|
|
2330
2335
|
isRepresentative: boolean;
|
|
2331
2336
|
wordingType: number;
|
|
2337
|
+
}, {}> | Exercise<{
|
|
2338
|
+
expCount: number;
|
|
2339
|
+
repCount: number;
|
|
2340
|
+
isSize: boolean;
|
|
2341
|
+
}, {
|
|
2342
|
+
isSize?: boolean;
|
|
2343
|
+
}> | Exercise<{
|
|
2344
|
+
samples: number[];
|
|
2332
2345
|
}, {}> | Exercise<{
|
|
2333
2346
|
values: number[][];
|
|
2334
2347
|
caseAsked: number;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],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AE,aAAa,GAAG,SAAS,CAAC;IAC7B,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;gBACJ,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM;IAsBvD,aAAa;;;;;IAOb,WAAW,CAAC,IAAI,EAAE,IAAI;IAYtB,iBAAiB;IAIjB,YAAY,CAAC,KAAK,EAAE,KAAK;IAYzB,gBAAgB,CAAC,KAAK,EAAE,KAAK;IAW7B,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,SAAI;IAkBjC,aAAa,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM;IAK7C,aAAa,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM;IAW7C,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM;IAa5B,iBAAiB,QAAO,SAAS,CAO/B;IAEF,oBAAoB,IAAI,SAAS;IAUjC,iBAAiB;IA2BjB,KAAK;IAGL,gBAAgB;IAIhB,aAAa,CACX,iBAAiB,EAAE,OAAO,EAC1B,EACE,OAAc,EACd,SAAiB,EACjB,yBAAgC,EAChC,oBAA2B,EAC3B,KAAiB,EACjB,KAAiB,GAClB,GAAE,kBAAuB;IA2C5B,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,EAAE,MAAM;CAY7C"}
|
|
@@ -126,17 +126,6 @@ export class Line {
|
|
|
126
126
|
else
|
|
127
127
|
return point.x.equals(this.pointA.x);
|
|
128
128
|
}
|
|
129
|
-
// console.log(
|
|
130
|
-
// "y",
|
|
131
|
-
// point.y.toTex(),
|
|
132
|
-
// "a",
|
|
133
|
-
// this.a?.toTex(),
|
|
134
|
-
// "x",
|
|
135
|
-
// point.x.toTex(),
|
|
136
|
-
// "b",
|
|
137
|
-
// this.b?.toTex(),
|
|
138
|
-
// );
|
|
139
|
-
// console.log("y", this.pointA.y.toTex(), "x", this.pointA.x.toTex());
|
|
140
129
|
if (margin) {
|
|
141
130
|
const projOrtho = point.project(this);
|
|
142
131
|
return projOrtho.distanceTo(point) < margin;
|
package/lib/server.js
CHANGED
|
@@ -122,6 +122,27 @@ const runServer = () => {
|
|
|
122
122
|
result,
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
|
+
app.post("/tableVea", jsonParser, (req, res) => {
|
|
126
|
+
const exoId = req.query.exoId;
|
|
127
|
+
const options = req.query.options
|
|
128
|
+
? JSON.parse(req.query.options)
|
|
129
|
+
: undefined;
|
|
130
|
+
const { ans, veaProps } = req.body;
|
|
131
|
+
const exoIndex = allExercises.findIndex((exo) => exo.id == exoId);
|
|
132
|
+
const exo = allExercises[exoIndex];
|
|
133
|
+
if (!exo) {
|
|
134
|
+
res.send("Exo not found");
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (!exo.isAnswerTableValid) {
|
|
138
|
+
res.send("No VEA implemented");
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const result = exo.isAnswerTableValid(ans, veaProps, options) ?? false;
|
|
142
|
+
res.json({
|
|
143
|
+
result,
|
|
144
|
+
});
|
|
145
|
+
});
|
|
125
146
|
app.post("/ggbvea", jsonParser, (req, res) => {
|
|
126
147
|
const exoId = req.query.exoId;
|
|
127
148
|
const { ggbAns, ggbVeaProps } = req.body;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIvD,eAAO,MAAM,OAAO,QAAS,QAAQ;;;;
|
|
1
|
+
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIvD,eAAO,MAAM,OAAO,QAAS,QAAQ;;;;CAuFpC,CAAC"}
|
package/lib/tests/exoTest.js
CHANGED
|
@@ -19,13 +19,16 @@ export const exoTest = (exo) => {
|
|
|
19
19
|
const questions = exo.generator(30);
|
|
20
20
|
let after = Date.now();
|
|
21
21
|
generatorTime = after - before;
|
|
22
|
-
if (exo.answerType !== "free" &&
|
|
22
|
+
if (exo.answerType !== "free" &&
|
|
23
|
+
exo.answerType !== "GGB" &&
|
|
24
|
+
exo.answerType !== "valueTable") {
|
|
23
25
|
if (!exo.getPropositions)
|
|
24
26
|
throw new Error(`exo ${exo.id} has no getPropositions`);
|
|
25
27
|
}
|
|
26
28
|
if (exo.answerType !== "QCM" &&
|
|
27
29
|
exo.answerType !== "QCU" &&
|
|
28
|
-
exo.answerType !== "GGB"
|
|
30
|
+
exo.answerType !== "GGB" &&
|
|
31
|
+
exo.answerType !== "valueTable") {
|
|
29
32
|
if (!exo.isAnswerValid)
|
|
30
33
|
throw new Error(`exo ${exo.id} has no isAnswerValid`);
|
|
31
34
|
}
|
|
@@ -33,6 +36,10 @@ export const exoTest = (exo) => {
|
|
|
33
36
|
if (!exo.isGGBAnswerValid)
|
|
34
37
|
throw new Error(`exo ${exo.id} has no isGGBAnswerValid`);
|
|
35
38
|
}
|
|
39
|
+
if (exo.answerType === "valueTable") {
|
|
40
|
+
if (!exo.isAnswerTableValid)
|
|
41
|
+
throw new Error(`exo ${exo.id} has no isAnswerTableValid`);
|
|
42
|
+
}
|
|
36
43
|
questions.forEach((question) => {
|
|
37
44
|
const times = questionTest(exo, question);
|
|
38
45
|
qcmTime = times.qcmTime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIjE,eAAO,MAAM,YAAY,QAAS,QAAQ,YAAY,QAAQ;;;
|
|
1
|
+
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIjE,eAAO,MAAM,YAAY,QAAS,QAAQ,YAAY,QAAQ;;;CAuM7D,CAAC"}
|
|
@@ -43,6 +43,10 @@ export const questionTest = (exo, question) => {
|
|
|
43
43
|
if (!question.studentGgbOptions?.coords?.length)
|
|
44
44
|
throw new Error(`exo ${exo.id} has no studentGgbOptions Coords`);
|
|
45
45
|
}
|
|
46
|
+
else if (exo.answerType === "valueTable") {
|
|
47
|
+
if (!question.answerTable?.length)
|
|
48
|
+
throw new Error(`exo ${exo.id} has no answerTable`);
|
|
49
|
+
}
|
|
46
50
|
else if (exo.answerType !== "QCU" && exo.answerType !== "QCM") {
|
|
47
51
|
if (!question.answer)
|
|
48
52
|
throw new Error(`exo ${exo.id} has no answer`);
|
|
@@ -57,6 +61,18 @@ export const questionTest = (exo, question) => {
|
|
|
57
61
|
throw new Error(`exo ${exo.id} has invalid answer`);
|
|
58
62
|
}
|
|
59
63
|
}
|
|
64
|
+
if (question.answerTable) {
|
|
65
|
+
for (const cell of question.answerTable.flat()) {
|
|
66
|
+
if (cell.match(dotDecimalPattern))
|
|
67
|
+
throw new Error(`exo ${exo.id} has invalid number format`);
|
|
68
|
+
if (cell.includes("[object Object]"))
|
|
69
|
+
throw new Error(`exo ${exo.id} has invalid answer`);
|
|
70
|
+
if (question.answerFormat !== "raw") {
|
|
71
|
+
if (!latexTester(cell, true))
|
|
72
|
+
throw new Error(`exo ${exo.id} has invalid answer`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
60
76
|
if (!question.instruction.length) {
|
|
61
77
|
throw new Error(`exo ${exo.id} has no instruction`);
|
|
62
78
|
}
|
|
@@ -103,7 +119,8 @@ export const questionTest = (exo, question) => {
|
|
|
103
119
|
// }
|
|
104
120
|
if (exo.answerType !== "QCM" &&
|
|
105
121
|
exo.answerType !== "QCU" &&
|
|
106
|
-
exo.answerType !== "GGB"
|
|
122
|
+
exo.answerType !== "GGB" &&
|
|
123
|
+
exo.answerType !== "valueTable") {
|
|
107
124
|
if (!question.keys)
|
|
108
125
|
throw new Error(`exo ${exo.id} has no keys`);
|
|
109
126
|
const answer = question.answer;
|
|
@@ -115,7 +132,9 @@ export const questionTest = (exo, question) => {
|
|
|
115
132
|
let after = Date.now();
|
|
116
133
|
veaTime = after - before;
|
|
117
134
|
}
|
|
118
|
-
if (exo.answerType !== "free" &&
|
|
135
|
+
if (exo.answerType !== "free" &&
|
|
136
|
+
exo.answerType !== "GGB" &&
|
|
137
|
+
exo.answerType !== "valueTable") {
|
|
119
138
|
let before = Date.now();
|
|
120
139
|
console.log("will generate props : ", exo.id, "ids :", question.identifiers);
|
|
121
140
|
const props = exo.getPropositions(4, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equalNode.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAEL,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAQ/B,eAAO,MAAM,KAAK,MACb,aAAa,GAAG,MAAM,GAAG,MAAM,KAC/B,aAAa,GAAG,MAAM,GAAG,MAAM,cAOnC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;IAC3B,UAAU,EAAE,eAAe,CAAC;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,8BAAsB,oBAAoB;IACxC,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AM,CAAC,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,MAAM;IAGvE,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,SAAS;IAMpE,UAAU;CAIX;AAED,eAAO,MAAM,qBAAqB,MAC7B,aAAa,KACb,aAAa,KACb,aAAa,KACb,aAAa,sBA2DjB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const mdTable: (rows: (string | number)[][]) => string;
|
|
1
|
+
export declare const mdTable: (rows: (string | number)[][], shouldDollarize?: boolean) => string;
|
|
2
2
|
//# sourceMappingURL=mdTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdTable.d.ts","sourceRoot":"","sources":["../../../src/utils/markdown/mdTable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mdTable.d.ts","sourceRoot":"","sources":["../../../src/utils/markdown/mdTable.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,SACZ,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,oBACT,OAAO,WAa1B,CAAC"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { dollarize } from "../latex/dollarize.js";
|
|
2
|
+
const rowBuilder = (row, shouldDollarize) => {
|
|
3
|
+
const rowFormated = shouldDollarize ? row.map((e) => dollarize(e)) : row;
|
|
4
|
+
return "|" + rowFormated.join("|") + "|";
|
|
3
5
|
};
|
|
4
|
-
export const mdTable = (rows) => {
|
|
6
|
+
export const mdTable = (rows, shouldDollarize) => {
|
|
5
7
|
const width = rows[0].length;
|
|
6
8
|
return `
|
|
7
9
|
<!-- table -->
|
|
8
|
-
${rowBuilder(rows[0])}
|
|
10
|
+
${rowBuilder(rows[0], shouldDollarize)}
|
|
9
11
|
${rowBuilder(new Array(width).fill("-"))}
|
|
10
|
-
${rows
|
|
12
|
+
${rows
|
|
13
|
+
.slice(1)
|
|
14
|
+
.map((e) => rowBuilder(e, shouldDollarize))
|
|
15
|
+
.join("\n")}
|
|
11
16
|
<!-- !table -->
|
|
12
17
|
`;
|
|
13
18
|
};
|