diff --git a/mod/choice/renderer.php b/mod/choice/renderer.php index 4f954bb0f20..725a1b7bce2 100644 --- a/mod/choice/renderer.php +++ b/mod/choice/renderer.php @@ -22,9 +22,6 @@ * @copyright 2010 Rossiani Wijaya * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later **/ -define ('DISPLAY_HORIZONTAL_LAYOUT', 0); -define ('DISPLAY_VERTICAL_LAYOUT', 1); - class mod_choice_renderer extends plugin_renderer_base { /** @@ -375,7 +372,7 @@ class mod_choice_renderer extends plugin_renderer_base { * Can be displayed either in the vertical or horizontal position. * * @param stdClass $choices Choices responses object. - * @param int $displaylayout The constants DISPLAY_HORIZONTAL_LAYOUT or DISPLAY_VERTICAL_LAYOUT. + * @param int $displaylayout The constants CHOICE_DISPLAY_HORIZONTAL or CHOICE_DISPLAY_VERTICAL. * @return string the rendered chart. */ public function display_publish_anonymous($choices, $displaylayout) { @@ -398,8 +395,8 @@ class mod_choice_renderer extends plugin_renderer_base { } $chart = new \core\chart_bar(); - if ($displaylayout == DISPLAY_HORIZONTAL_LAYOUT) { - $chart->set_horizontal(true); + if ($displaylayout == CHOICE_DISPLAY_VERTICAL) { + $chart->set_horizontal(true); // Horizontal bars when choices are vertical. } $series = new \core\chart_series(format_string(get_string("responses", "choice")), $data['series']); $series->set_labels($data['series_labels']);