protected function col_discrimination_index($questionstat) {
        if ($this->is_calculated_question_summary($questionstat)) {
            list($min, $max) = $questionstat->get_min_max_of('discriminationindex');

            if (isset($max)) {
                $min = $min ?: 0;
            }

            if (is_numeric($min)) {
                $min = $this->format_percentage($min, false);
            }
            if (is_numeric($max)) {
                $max = $this->format_percentage($max, false);
            }

            return $this->format_range($min, $max);
        } else if (!is_numeric($questionstat->discriminationindex)) {
            return $questionstat->discriminationindex;
        } else {
            return $this->format_percentage($questionstat->discriminationindex, false);
        }
    }