getExtensionById('taoQtiItem'); $dir = \taoItems_models_classes_ItemsService::singleton()->getDefaultItemDirectory(); // maybe it's a dirty way but it's quicker. too much modification would have been required in ItemUpdater $adapter = $dir->getFileSystem()->getAdapter(); if (!$adapter instanceof Local) { throw new \Exception(__CLASS__.' can only handle local files'); } $itemUpdater = new ItemFixTextReaderDefaultValue($adapter->getPathPrefix()); $res = $itemUpdater->update($run); if ($run) { return \common_report_Report::createSuccess('Item fixed ' . count($res)); } else { return \common_report_Report::createInfo('Item to be fixed ' . count($res)); } } }