MDL-38109 use always get_plugin_list() to get list of plugins

get_list_of_plugins() is NOT intended for real plugins, only plugin like directories.
This commit is contained in:
Petr Škoda
2013-06-11 10:22:45 +02:00
parent b3be471f52
commit a9cda870ba
4 changed files with 9 additions and 10 deletions
+2 -3
View File
@@ -1877,9 +1877,8 @@ function data_get_available_presets($context) {
$presets = array();
// First load the ratings sub plugins that exist within the modules preset dir
if ($dirs = get_list_of_plugins('mod/data/preset')) {
foreach ($dirs as $dir) {
$fulldir = $CFG->dirroot.'/mod/data/preset/'.$dir;
if ($dirs = get_plugin_list('datapreset')) {
foreach ($dirs as $dir=>$fulldir) {
if (is_directory_a_preset($fulldir)) {
$preset = new stdClass();
$preset->path = $fulldir;