getServiceManager()->get(\common_ext_ExtensionsManager::SERVICE_ID)->getExtensionById('taoQtiTest'); $config = $extension->getConfig('testRunner'); foreach ($toolNames as $toolName) { if (!array_key_exists($toolName, $config['plugins'])) { return new Report(Report::TYPE_ERROR, sprintf('Runner tool "%s" does not exist', $toolName)); } } $config['tool-state-server-storage'] = $toolNames; $extension->setConfig('testRunner', $config); return new Report(Report::TYPE_SUCCESS, sprintf('The list consisting of %d tools that should preserve their states is registered', count($toolNames))); } }