MDL-58852 choice: Use multilang for choice options in charts

This commit is contained in:
Luca Bösch
2017-05-08 23:29:40 +02:00
committed by =
parent 896ce9b4e6
commit e4d2487dd2
+2 -1
View File
@@ -527,7 +527,8 @@ function prepare_choice_show_results($choice, $course, $cm, $allresponses) {
$allusers = [];
foreach ($choice->option as $optionid => $optiontext) {
$display->options[$optionid] = new stdClass;
$display->options[$optionid]->text = $optiontext;
$display->options[$optionid]->text = format_string($optiontext, true,
['context' => context_module::instance($cm->id)]);
$display->options[$optionid]->maxanswer = $choice->maxanswers[$optionid];
if (array_key_exists($optionid, $allresponses)) {