Commit 178adf1c authored by abgreeve's avatar abgreeve Committed by Jake Dallimore
Browse files

Merge branch 'MDL-68747-master' of https://github.com/dcai/moodle

parents c95b2540 a42df817
......@@ -1307,10 +1307,12 @@ class mod_quiz_renderer extends plugin_renderer_base {
*
* @param \core\chart_base $chart The chart.
* @param string $title The title to display above the graph.
* @param array $attrs extra container html attributes.
* @return string HTML fragment for the graph.
*/
public function chart(\core\chart_base $chart, $title) {
return $this->heading($title, 3) . html_writer::tag('div', $this->render($chart), array('class' => 'graph'));
public function chart(\core\chart_base $chart, $title, $attrs = []) {
return $this->heading($title, 3) . html_writer::tag('div',
$this->render($chart), array_merge(['class' => 'graph'], $attrs));
}
/**
......
......@@ -225,7 +225,8 @@ class quiz_overview_report extends quiz_attempts_report {
$data = quiz_report_grade_bands($bandwidth, $bands, $quiz->id, $groupstudentsjoins);
$chart = self::get_chart($labels, $data);
$graphname = get_string('overviewreportgraphgroup', 'quiz_overview', groups_get_group_name($currentgroup));
echo $output->chart($chart, $graphname);
// Numerical range data should display in LTR even for RTL languages.
echo $output->chart($chart, $graphname, ['dir' => 'ltr']);
}
}
......@@ -233,7 +234,8 @@ class quiz_overview_report extends quiz_attempts_report {
$data = quiz_report_grade_bands($bandwidth, $bands, $quiz->id, new \core\dml\sql_join());
$chart = self::get_chart($labels, $data);
$graphname = get_string('overviewreportgraph', 'quiz_overview');
echo $output->chart($chart, $graphname);
// Numerical range data should display in LTR even for RTL languages.
echo $output->chart($chart, $graphname, ['dir' => 'ltr']);
}
}
return true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment