MDL-46281 core_backup: Add class_exists check for backup_<mod>_activity_task

Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
This commit is contained in:
Tony Butler 2014-08-11 13:58:40 +01:00
parent e1eb180806
commit 206541a12c

View File

@ -159,7 +159,7 @@ class backup_xml_transformer extends xml_contenttransformer {
// Add the module ones. Each module supporting moodle2 backups MUST have it
$mods = core_component::get_plugin_list('mod');
foreach ($mods as $mod => $moddir) {
if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2)) {
if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2) && class_exists('backup_' . $mod . '_activity_task')) {
$encoders['backup_' . $mod . '_activity_task'] = 'encode_content_links';
}
}