Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 269... Línea 269...
269
                    ->add_join($this->get_table_join($field));
269
                    ->add_join($this->get_table_join($field));
Línea 270... Línea 270...
270
 
270
 
271
                // Options are stored inside configdata json string and we need to convert it to array.
271
                // Options are stored inside configdata json string and we need to convert it to array.
272
                if ($field->get('type') === 'select') {
272
                if ($field->get('type') === 'select') {
273
                    $filter->set_options_callback(static function() use ($field): array {
-
 
274
                        $options = explode("\r\n", $field->get_configdata_property('options'));
-
 
275
                        // Method set_options starts using array at index 1. we shift one position on this array.
-
 
276
                        // In course settings this menu has an empty option and we need to respect that.
-
 
277
                        array_unshift($options, " ");
-
 
278
                        unset($options[0]);
273
                    $filter->set_options_callback(static function() use ($field): array {
279
                        return $options;
274
                        return $field->get_options();
280
                    });
275
                    });
Línea 281... Línea 276...
281
                }
276
                }
282
 
277