Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Avoid errors with devision by 0 #23

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/QuestionTypes/NumberRange/xlvoNumberRangeSubFormGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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());

Expand Down