feat: add configurable max_first_operand for multiplication exercises with randomized operand order
This commit is contained in:
@@ -66,6 +66,16 @@
|
||||
<label class="form-check-label" for="multiplicationOnly">Générer uniquement des multiplications</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="maxFirstOperand" class="form-label">Maximum du premier opérande</label>
|
||||
<select class="form-select" id="maxFirstOperand">
|
||||
<option value="9">9 (Tables jusqu'à 9)</option>
|
||||
<option value="10" selected>10 (Tables jusqu'à 10)</option>
|
||||
<option value="12">12 (Tables jusqu'à 12)</option>
|
||||
</select>
|
||||
<div class="form-text">La valeur maximale pour le premier opérande dans les multiplications</div>
|
||||
</div>
|
||||
|
||||
<div class="d-grid">
|
||||
<button type="submit" class="btn btn-primary btn-lg" id="generateBtn">
|
||||
<span id="buttonText">Générer le PDF (Mult/Div)</span>
|
||||
@@ -517,6 +527,7 @@
|
||||
const maxTable = parseInt(document.getElementById('maxTable').value);
|
||||
const numExercises = parseInt(document.getElementById('numExercises').value);
|
||||
const multiplicationOnly = document.getElementById('multiplicationOnly').checked;
|
||||
const maxFirstOperand = parseInt(document.getElementById('maxFirstOperand').value);
|
||||
|
||||
const generateBtn = document.getElementById('generateBtn');
|
||||
const buttonText = document.getElementById('buttonText');
|
||||
@@ -537,7 +548,8 @@
|
||||
min_table: minTable,
|
||||
max_table: maxTable,
|
||||
num_exercises: numExercises,
|
||||
multiplication_only: multiplicationOnly
|
||||
multiplication_only: multiplicationOnly,
|
||||
max_first_operand: maxFirstOperand
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user