original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Discrimination index. This is the product moment correlation coefficient
  between the fraction for this question, and the average fraction for the
  other questions in this quiz.
  @param \core_question\statistics\questions\calculated $questionstat stats for the question.
  @return string contents of this table cell.
docstring_tokens: Discrimination index . This is the product moment correlation coefficient between the fraction for this question and the average fraction for the other questions in this quiz .