original_string: public static function get_calculation_display(\core_analytics\calculable $calculable, $value, $output, $subtype = false) {
          $outcome = $calculable->get_calculation_outcome($value, $subtype);
          switch ($outcome) {
              case \core_analytics\calculable::OUTCOME_NEUTRAL:
                  $style = '';
                  $text = get_string('outcomeneutral', 'report_insights');
                  $icon = 't/check';
                  break;
              case \core_analytics\calculable::OUTCOME_VERY_POSITIVE:
                  $style = 'success';
                  $text = get_string('outcomeverypositive', 'report_insights');
                  $icon = 't/approve';
                  break;
              case \core_analytics\calculable::OUTCOME_OK:
                  $style = 'info';
                  $text = get_string('outcomeok', 'report_insights');
                  $icon = 't/check';
                  break;
              case \core_analytics\calculable::OUTCOME_NEGATIVE:
                  $style = 'warning';
                  $text = get_string('outcomenegative', 'report_insights');
                  $icon = 'i/warning';
                  break;
              case \core_analytics\calculable::OUTCOME_VERY_NEGATIVE:
                  $style = 'danger';
                  $text = get_string('outcomeverynegative', 'report_insights');
                  $icon = 'i/warning';
                  break;
              default:
                  throw new \coding_exception('The outcome returned by ' . get_class($calculable) . '::get_calculation_outcome is ' .
                      'not one of the accepted values. Please use \core_analytics\calculable::OUTCOME_VERY_POSITIVE, ' .
                      '\core_analytics\calculable::OUTCOME_OK, \core_analytics\calculable::OUTCOME_NEGATIVE, ' .
                      '\core_analytics\calculable::OUTCOME_VERY_NEGATIVE or \core_analytics\calculable::OUTCOME_NEUTRAL');
          }
          $icon = new \pix_icon($icon, $text);
          return array($style, $icon->export_for_template($output));
      }
code: public static function get_calculation_display(\core_analytics\calculable $calculable, $value, $output, $subtype = false) {
          $outcome = $calculable->get_calculation_outcome($value, $subtype);
          switch ($outcome) {
              case \core_analytics\calculable::OUTCOME_NEUTRAL:
                  $style = '';
                  $text = get_string('outcomeneutral', 'report_insights');
                  $icon = 't/check';
                  break;
              case \core_analytics\calculable::OUTCOME_VERY_POSITIVE:
                  $style = 'success';
                  $text = get_string('outcomeverypositive', 'report_insights');
                  $icon = 't/approve';
                  break;
              case \core_analytics\calculable::OUTCOME_OK:
                  $style = 'info';
                  $text = get_string('outcomeok', 'report_insights');
                  $icon = 't/check';
                  break;
              case \core_analytics\calculable::OUTCOME_NEGATIVE:
                  $style = 'warning';
                  $text = get_string('outcomenegative', 'report_insights');
                  $icon = 'i/warning';
                  break;
              case \core_analytics\calculable::OUTCOME_VERY_NEGATIVE:
                  $style = 'danger';
                  $text = get_string('outcomeverynegative', 'report_insights');
                  $icon = 'i/warning';
                  break;
              default:
                  throw new \coding_exception('The outcome returned by ' . get_class($calculable) . '::get_calculation_outcome is ' .
                      'not one of the accepted values. Please use \core_analytics\calculable::OUTCOME_VERY_POSITIVE, ' .
                      '\core_analytics\calculable::OUTCOME_OK, \core_analytics\calculable::OUTCOME_NEGATIVE, ' .
                      '\core_analytics\calculable::OUTCOME_VERY_NEGATIVE or \core_analytics\calculable::OUTCOME_NEUTRAL');
          }
          $icon = new \pix_icon($icon, $text);
          return array($style, $icon->export_for_template($output));
      }
code_tokens: public static function get_calculation_display ( \ core_analytics \ calculable $ calculable , $ value , $ output , $ subtype = false ) { $ outcome = $ calculable -> get_calculation_outcome ( $ value , $ subtype ) ; switch ( $ outcome ) { case \ core_analytics \ calculable :: OUTCOME_NEUTRAL : $ style = '' ; $ text = get_string ( 'outcomeneutral' , 'report_insights' ) ; $ icon = 't/check' ; break ; case \ core_analytics \ calculable :: OUTCOME_VERY_POSITIVE : $ style = 'success' ; $ text = get_string ( 'outcomeverypositive' , 'report_insights' ) ; $ icon = 't/approve' ; break ; case \ core_analytics \ calculable :: OUTCOME_OK : $ style = 'info' ; $ text = get_string ( 'outcomeok' , 'report_insights' ) ; $ icon = 't/check' ; break ; case \ core_analytics \ calculable :: OUTCOME_NEGATIVE : $ style = 'warning' ; $ text = get_string ( 'outcomenegative' , 'report_insights' ) ; $ icon = 'i/warning' ; break ; case \ core_analytics \ calculable :: OUTCOME_VERY_NEGATIVE : $ style = 'danger' ; $ text = get_string ( 'outcomeverynegative' , 'report_insights' ) ; $ icon = 'i/warning' ; break ; default : throw new \ coding_exception ( 'The outcome returned by ' . get_class ( $ calculable ) . '::get_calculation_outcome is ' . 'not one of the accepted values. Please use \core_analytics\calculable::OUTCOME_VERY_POSITIVE, ' . '\core_analytics\calculable::OUTCOME_OK, \core_analytics\calculable::OUTCOME_NEGATIVE, ' . '\core_analytics\calculable::OUTCOME_VERY_NEGATIVE or \core_analytics\calculable::OUTCOME_NEUTRAL' ) ; } $ icon = new \ pix_icon ( $ icon , $ text ) ; return array ( $ style , $ icon -> export_for_template ( $ output ) ) ; }
docstring: Returns display info for the calculated value outcome.
  
  @param \core_analytics\calculable $calculable
  @param float $value
  @param \renderer_base $output
  @param string|false $subtype
  @return array The style as 'success', 'info', 'warning' or 'danger' and pix_icon
docstring_tokens: Returns display info for the calculated value outcome .