Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 189... Línea 189...
189
     *
189
     *
190
     * @return array The list of plugins
190
     * @return array The list of plugins
191
     */
191
     */
192
    public function get_sorted_plugins_list(): array {
192
    public function get_sorted_plugins_list(): array {
193
        $names = core_component::get_plugin_list(extension::BBB_EXTENSION_PLUGIN_NAME);
193
        $names = core_component::get_plugin_list(extension::BBB_EXTENSION_PLUGIN_NAME);
194
 
-
 
195
        $result = [];
-
 
196
 
-
 
197
        foreach ($names as $name => $path) {
194
        return extension::get_sorted_plugins_list($names);
198
            $idx = get_config(extension::BBB_EXTENSION_PLUGIN_NAME . '_' . $name, 'sortorder');
-
 
199
            if (!$idx) {
-
 
200
                $idx = 0;
-
 
201
            }
-
 
202
            while (array_key_exists($idx, $result)) {
-
 
203
                $idx += 1;
-
 
204
            }
-
 
205
            $result[$idx] = $name;
-
 
206
        }
-
 
207
        ksort($result);
-
 
208
 
-
 
209
        return $result;
-
 
210
    }
195
    }
Línea 211... Línea 196...
211
 
196
 
212
    /**
197
    /**
213
     * Util function for writing an action icon link
198
     * Util function for writing an action icon link