Skip to content

Commit

Permalink
MDL-55830 form: Selectgroups option values where not passed to template
Browse files Browse the repository at this point in the history
Part of MDL-55071
  • Loading branch information
Frederic Massart authored and danpoltawski committed Sep 23, 2016
1 parent 4c9a20e commit 0f24d9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/form/selectgroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,8 @@ public function export_for_template(renderer_base $output) {
$options = [];

foreach ($group['options'] as $option) {
$o = [];
if (is_array($this->_values) && in_array((string)$option['attr']['value'], $this->_values)) {
$o = ['value' => (string)$option['attr']['value']];
if (is_array($this->_values) && in_array($o['value'], $this->_values)) {
$o['selected'] = true;
} else {
$o['selected'] = false;
Expand Down

0 comments on commit 0f24d9c

Please sign in to comment.