From c4f5fc3528601324bbdfb7086a4bdc0e042a0728 Mon Sep 17 00:00:00 2001 From: Stephan Winiker Date: Thu, 22 Aug 2019 08:46:48 +0200 Subject: [PATCH] Avoid errors with devision with 0 --- src/QuestionTypes/NumberRange/xlvoNumberRangeSubFormGUI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QuestionTypes/NumberRange/xlvoNumberRangeSubFormGUI.php b/src/QuestionTypes/NumberRange/xlvoNumberRangeSubFormGUI.php index 991bd067..88f56b13 100755 --- a/src/QuestionTypes/NumberRange/xlvoNumberRangeSubFormGUI.php +++ b/src/QuestionTypes/NumberRange/xlvoNumberRangeSubFormGUI.php @@ -40,7 +40,7 @@ class xlvoNumberRangeSubFormGUI extends xlvoSubFormGUI { const START_RANGE_MAX = 1000000; const END_RANGE_MIN = - 1000000; const END_RANGE_MAX = 1000000; - //const STEP_RANGE_MIN = 0; + const STEP_RANGE_MIN = 1; //const STEP_RANGE_MAX = 1000000; const STEP_RANGE_DEFAULT_VALUE = 1; const STEP_RANGE_INVALID_INFO = 'qtype_6_invalid_step_range'; @@ -89,7 +89,7 @@ protected function initFormElements() { //create end range number input $stepRange = new ilNumberInputGUI($this->txt(self::OPTION_RANGE_STEP), self::OPTION_RANGE_STEP); $stepRange->setInfo($this->txt(self::OPTION_RANGE_STEP_INFO)); - //$stepRange->setMinValue(self::STEP_RANGE_MIN); + $stepRange->setMinValue(self::STEP_RANGE_MIN); //$stepRange->setMaxValue(self::STEP_RANGE_MAX); $stepRange->setValue($this->getXlvoVoting()->getStepRange());