mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-57209-master' of git://github.com/crmpicco/moodle
This commit is contained in:
commit
80ee8a3eb0
1 changed files with 3 additions and 0 deletions
|
@ -376,6 +376,9 @@ class MoodleQuickForm_selectgroups extends HTML_QuickForm_element implements tem
|
||||||
if (is_array($this->_values)) {
|
if (is_array($this->_values)) {
|
||||||
foreach ($this->_values as $key => $val) {
|
foreach ($this->_values as $key => $val) {
|
||||||
foreach ($this->_optGroups as $optGroup) {
|
foreach ($this->_optGroups as $optGroup) {
|
||||||
|
if (empty($optGroup['options'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for ($i = 0, $optCount = count($optGroup['options']); $i < $optCount; $i++) {
|
for ($i = 0, $optCount = count($optGroup['options']); $i < $optCount; $i++) {
|
||||||
if ((string)$val == (string)$optGroup['options'][$i]['attr']['value']) {
|
if ((string)$val == (string)$optGroup['options'][$i]['attr']['value']) {
|
||||||
$value[$key] = $optGroup['options'][$i]['text'];
|
$value[$key] = $optGroup['options'][$i]['text'];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue