diff --git a/h5p/classes/core.php b/h5p/classes/core.php index 3d806119f23..6b1802421c5 100644 --- a/h5p/classes/core.php +++ b/h5p/classes/core.php @@ -179,6 +179,11 @@ class core extends \H5PCore { $framework = $factory->get_framework(); foreach ($contenttypes->contentTypes as $type) { + // Don't fetch content types if any of the versions is disabled. + $librarydata = (object) ['machinename' => $type->id]; + if (!api::is_library_enabled($librarydata)) { + continue; + } // Don't fetch content types that require a higher H5P core API version. if (!$this->is_required_core_api($type->coreApiVersionNeeded)) { continue;