diff --git a/backup/moodle2/backup_xml_transformer.class.php b/backup/moodle2/backup_xml_transformer.class.php index 63fb8a82bd38a..eb5b1766fa733 100644 --- a/backup/moodle2/backup_xml_transformer.class.php +++ b/backup/moodle2/backup_xml_transformer.class.php @@ -159,7 +159,7 @@ private function register_link_encoders() { // 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'; } }