MDL-41437 fix some more forgotten module.version's

This commit is contained in:
Petr Škoda
2013-09-25 10:50:00 +02:00
parent effff2a466
commit 5f8012d499
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -272,7 +272,12 @@ function get_component_version($component, $source='installed') {
// activity module
if ($type === 'mod') {
if ($source === 'installed') {
return $DB->get_field('modules', 'version', array('name'=>$name));
if ($CFG->version < 2013092001.02) {
return $DB->get_field('modules', 'version', array('name'=>$name));
} else {
return get_config('mod_'.$name, 'version');
}
} else {
$mods = core_component::get_plugin_list('mod');
if (empty($mods[$name]) or !is_readable($mods[$name].'/version.php')) {