From b6ba1e9500535b6df7930c60c71b22dbc1d556d9 Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Tue, 26 Oct 2021 11:07:19 +0200 Subject: [PATCH 01/10] Increase plugins min & max ilias version --- plugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.php b/plugin.php index 006c10b..6e325d5 100755 --- a/plugin.php +++ b/plugin.php @@ -9,8 +9,8 @@ $id = "xqsp"; $version = "7.0.0"; -$ilias_min_version = "6.0"; -$ilias_max_version = "6.999"; +$ilias_min_version = "7.0"; +$ilias_max_version = "7.999"; $responsible = "Thomas Joußen"; $responsible_mail = "tjoussen@databay.de"; -- GitLab From eb442fb3ce6b68777557117245e051709a4e5a63 Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Mon, 15 Nov 2021 13:40:13 +0100 Subject: [PATCH 02/10] Add composer/add class autoloading --- composer.json | 6 + vendor/composer/ClassLoader.php | 44 +++- vendor/composer/autoload_classmap.php | 143 +++++++++++++ vendor/composer/autoload_real.php | 20 +- vendor/composer/autoload_static.php | 147 +++++++++++++ vendor/composer/installed.json | 297 +++++++++++++------------- 6 files changed, 495 insertions(+), 162 deletions(-) diff --git a/composer.json b/composer.json index 55bbc3e..d78a28b 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,12 @@ "email": "ntheen@databay.de" } ], + "autoload": { + "classmap": ["./classes"] + }, + "config": { + "classmap-authoritative": true + }, "require": { "php": ">=5.3", "graphp/graphviz": "~0.2.0" diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index dc02dfb..247294d 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -37,11 +37,13 @@ namespace Composer\Autoload; * * @author Fabien Potencier * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { + private $vendorDir; + // PSR-4 private $prefixLengthsPsr4 = array(); private $prefixDirsPsr4 = array(); @@ -57,10 +59,17 @@ class ClassLoader private $missingClasses = array(); private $apcuPrefix; + private static $registeredLoaders = array(); + + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); @@ -279,7 +288,7 @@ class ClassLoader */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** @@ -300,6 +309,17 @@ class ClassLoader public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } } /** @@ -308,6 +328,10 @@ class ClassLoader public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } } /** @@ -367,6 +391,16 @@ class ClassLoader return $file; } + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + private function findFileWithExtension($class, $ext) { // PSR-4 lookup @@ -377,7 +411,7 @@ class ClassLoader $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; + $search = $subPath . '\\'; if (isset($this->prefixDirsPsr4[$search])) { $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 7a91153..b839bb0 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,4 +6,147 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'Fhaculty\\Graph\\Attribute\\AttributeAware' => $vendorDir . '/clue/graph/src/Attribute/AttributeAware.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBag' => $vendorDir . '/clue/graph/src/Attribute/AttributeBag.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBagContainer' => $vendorDir . '/clue/graph/src/Attribute/AttributeBagContainer.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBagNamespaced' => $vendorDir . '/clue/graph/src/Attribute/AttributeBagNamespaced.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBagReference' => $vendorDir . '/clue/graph/src/Attribute/AttributeBagReference.php', + 'Fhaculty\\Graph\\Edge\\Base' => $vendorDir . '/clue/graph/src/Edge/Base.php', + 'Fhaculty\\Graph\\Edge\\Directed' => $vendorDir . '/clue/graph/src/Edge/Directed.php', + 'Fhaculty\\Graph\\Edge\\Undirected' => $vendorDir . '/clue/graph/src/Edge/Undirected.php', + 'Fhaculty\\Graph\\Exception' => $vendorDir . '/clue/graph/src/Exception.php', + 'Fhaculty\\Graph\\Exception\\BadMethodCallException' => $vendorDir . '/clue/graph/src/Exception/BadMethodCallException.php', + 'Fhaculty\\Graph\\Exception\\DomainException' => $vendorDir . '/clue/graph/src/Exception/DomainException.php', + 'Fhaculty\\Graph\\Exception\\InvalidArgumentException' => $vendorDir . '/clue/graph/src/Exception/InvalidArgumentException.php', + 'Fhaculty\\Graph\\Exception\\LogicException' => $vendorDir . '/clue/graph/src/Exception/LogicException.php', + 'Fhaculty\\Graph\\Exception\\NegativeCycleException' => $vendorDir . '/clue/graph/src/Exception/NegativeCycleException.php', + 'Fhaculty\\Graph\\Exception\\OutOfBoundsException' => $vendorDir . '/clue/graph/src/Exception/OutOfBoundsException.php', + 'Fhaculty\\Graph\\Exception\\OverflowException' => $vendorDir . '/clue/graph/src/Exception/OverflowException.php', + 'Fhaculty\\Graph\\Exception\\RangeException' => $vendorDir . '/clue/graph/src/Exception/RangeException.php', + 'Fhaculty\\Graph\\Exception\\RuntimeException' => $vendorDir . '/clue/graph/src/Exception/RuntimeException.php', + 'Fhaculty\\Graph\\Exception\\UnderflowException' => $vendorDir . '/clue/graph/src/Exception/UnderflowException.php', + 'Fhaculty\\Graph\\Exception\\UnexpectedValueException' => $vendorDir . '/clue/graph/src/Exception/UnexpectedValueException.php', + 'Fhaculty\\Graph\\Exporter\\ExporterInterface' => $vendorDir . '/clue/graph/src/Exporter/ExporterInterface.php', + 'Fhaculty\\Graph\\Graph' => $vendorDir . '/clue/graph/src/Graph.php', + 'Fhaculty\\Graph\\Set\\DualAggregate' => $vendorDir . '/clue/graph/src/Set/DualAggregate.php', + 'Fhaculty\\Graph\\Set\\Edges' => $vendorDir . '/clue/graph/src/Set/Edges.php', + 'Fhaculty\\Graph\\Set\\EdgesAggregate' => $vendorDir . '/clue/graph/src/Set/EdgesAggregate.php', + 'Fhaculty\\Graph\\Set\\Vertices' => $vendorDir . '/clue/graph/src/Set/Vertices.php', + 'Fhaculty\\Graph\\Set\\VerticesAggregate' => $vendorDir . '/clue/graph/src/Set/VerticesAggregate.php', + 'Fhaculty\\Graph\\Set\\VerticesMap' => $vendorDir . '/clue/graph/src/Set/VerticesMap.php', + 'Fhaculty\\Graph\\Vertex' => $vendorDir . '/clue/graph/src/Vertex.php', + 'Fhaculty\\Graph\\Walk' => $vendorDir . '/clue/graph/src/Walk.php', + 'Graphp\\Algorithms\\Base' => $vendorDir . '/graphp/algorithms/src/Base.php', + 'Graphp\\Algorithms\\BaseDual' => $vendorDir . '/graphp/algorithms/src/BaseDual.php', + 'Graphp\\Algorithms\\BaseGraph' => $vendorDir . '/graphp/algorithms/src/BaseGraph.php', + 'Graphp\\Algorithms\\BaseVertex' => $vendorDir . '/graphp/algorithms/src/BaseVertex.php', + 'Graphp\\Algorithms\\Bipartit' => $vendorDir . '/graphp/algorithms/src/Bipartit.php', + 'Graphp\\Algorithms\\Complete' => $vendorDir . '/graphp/algorithms/src/Complete.php', + 'Graphp\\Algorithms\\ConnectedComponents' => $vendorDir . '/graphp/algorithms/src/ConnectedComponents.php', + 'Graphp\\Algorithms\\Degree' => $vendorDir . '/graphp/algorithms/src/Degree.php', + 'Graphp\\Algorithms\\DetectNegativeCycle' => $vendorDir . '/graphp/algorithms/src/DetectNegativeCycle.php', + 'Graphp\\Algorithms\\Directed' => $vendorDir . '/graphp/algorithms/src/Directed.php', + 'Graphp\\Algorithms\\Eulerian' => $vendorDir . '/graphp/algorithms/src/Eulerian.php', + 'Graphp\\Algorithms\\Flow' => $vendorDir . '/graphp/algorithms/src/Flow.php', + 'Graphp\\Algorithms\\Groups' => $vendorDir . '/graphp/algorithms/src/Groups.php', + 'Graphp\\Algorithms\\Loop' => $vendorDir . '/graphp/algorithms/src/Loop.php', + 'Graphp\\Algorithms\\MaxFlow\\EdmondsKarp' => $vendorDir . '/graphp/algorithms/src/MaxFlow/EdmondsKarp.php', + 'Graphp\\Algorithms\\MaximumMatching\\Base' => $vendorDir . '/graphp/algorithms/src/MaximumMatching/Base.php', + 'Graphp\\Algorithms\\MaximumMatching\\Flow' => $vendorDir . '/graphp/algorithms/src/MaximumMatching/Flow.php', + 'Graphp\\Algorithms\\MinimumCostFlow\\Base' => $vendorDir . '/graphp/algorithms/src/MinimumCostFlow/Base.php', + 'Graphp\\Algorithms\\MinimumCostFlow\\CycleCanceling' => $vendorDir . '/graphp/algorithms/src/MinimumCostFlow/CycleCanceling.php', + 'Graphp\\Algorithms\\MinimumCostFlow\\SuccessiveShortestPath' => $vendorDir . '/graphp/algorithms/src/MinimumCostFlow/SuccessiveShortestPath.php', + 'Graphp\\Algorithms\\MinimumSpanningTree\\Base' => $vendorDir . '/graphp/algorithms/src/MinimumSpanningTree/Base.php', + 'Graphp\\Algorithms\\MinimumSpanningTree\\Kruskal' => $vendorDir . '/graphp/algorithms/src/MinimumSpanningTree/Kruskal.php', + 'Graphp\\Algorithms\\MinimumSpanningTree\\Prim' => $vendorDir . '/graphp/algorithms/src/MinimumSpanningTree/Prim.php', + 'Graphp\\Algorithms\\Parallel' => $vendorDir . '/graphp/algorithms/src/Parallel.php', + 'Graphp\\Algorithms\\Property\\GraphProperty' => $vendorDir . '/graphp/algorithms/src/Property/GraphProperty.php', + 'Graphp\\Algorithms\\Property\\WalkProperty' => $vendorDir . '/graphp/algorithms/src/Property/WalkProperty.php', + 'Graphp\\Algorithms\\ResidualGraph' => $vendorDir . '/graphp/algorithms/src/ResidualGraph.php', + 'Graphp\\Algorithms\\Search\\Base' => $vendorDir . '/graphp/algorithms/src/Search/Base.php', + 'Graphp\\Algorithms\\Search\\BreadthFirst' => $vendorDir . '/graphp/algorithms/src/Search/BreadthFirst.php', + 'Graphp\\Algorithms\\Search\\DepthFirst' => $vendorDir . '/graphp/algorithms/src/Search/DepthFirst.php', + 'Graphp\\Algorithms\\ShortestPath\\Base' => $vendorDir . '/graphp/algorithms/src/ShortestPath/Base.php', + 'Graphp\\Algorithms\\ShortestPath\\BreadthFirst' => $vendorDir . '/graphp/algorithms/src/ShortestPath/BreadthFirst.php', + 'Graphp\\Algorithms\\ShortestPath\\Dijkstra' => $vendorDir . '/graphp/algorithms/src/ShortestPath/Dijkstra.php', + 'Graphp\\Algorithms\\ShortestPath\\MooreBellmanFord' => $vendorDir . '/graphp/algorithms/src/ShortestPath/MooreBellmanFord.php', + 'Graphp\\Algorithms\\Symmetric' => $vendorDir . '/graphp/algorithms/src/Symmetric.php', + 'Graphp\\Algorithms\\TopologicalSort' => $vendorDir . '/graphp/algorithms/src/TopologicalSort.php', + 'Graphp\\Algorithms\\TransposeGraph' => $vendorDir . '/graphp/algorithms/src/TransposeGraph.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\Base' => $vendorDir . '/graphp/algorithms/src/TravelingSalesmanProblem/Base.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\Bruteforce' => $vendorDir . '/graphp/algorithms/src/TravelingSalesmanProblem/Bruteforce.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\MinimumSpanningTree' => $vendorDir . '/graphp/algorithms/src/TravelingSalesmanProblem/MinimumSpanningTree.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\NearestNeighbor' => $vendorDir . '/graphp/algorithms/src/TravelingSalesmanProblem/NearestNeighbor.php', + 'Graphp\\Algorithms\\Tree\\Base' => $vendorDir . '/graphp/algorithms/src/Tree/Base.php', + 'Graphp\\Algorithms\\Tree\\BaseDirected' => $vendorDir . '/graphp/algorithms/src/Tree/BaseDirected.php', + 'Graphp\\Algorithms\\Tree\\InTree' => $vendorDir . '/graphp/algorithms/src/Tree/InTree.php', + 'Graphp\\Algorithms\\Tree\\OutTree' => $vendorDir . '/graphp/algorithms/src/Tree/OutTree.php', + 'Graphp\\Algorithms\\Tree\\Undirected' => $vendorDir . '/graphp/algorithms/src/Tree/Undirected.php', + 'Graphp\\Algorithms\\Weight' => $vendorDir . '/graphp/algorithms/src/Weight.php', + 'Graphp\\GraphViz\\Dot' => $vendorDir . '/graphp/graphviz/src/Dot.php', + 'Graphp\\GraphViz\\GraphViz' => $vendorDir . '/graphp/graphviz/src/GraphViz.php', + 'Graphp\\GraphViz\\Image' => $vendorDir . '/graphp/graphviz/src/Image.php', + 'ilConditionInputGUI' => $baseDir . '/classes/utils/class.ilConditionInputGUI.php', + 'ilObjQuestionSetPool' => $baseDir . '/classes/class.ilObjQuestionSetPool.php', + 'ilObjQuestionSetPoolAccess' => $baseDir . '/classes/class.ilObjQuestionSetPoolAccess.php', + 'ilObjQuestionSetPoolGUI' => $baseDir . '/classes/class.ilObjQuestionSetPoolGUI.php', + 'ilObjQuestionSetPoolListGUI' => $baseDir . '/classes/class.ilObjQuestionSetPoolListGUI.php', + 'ilObjQuestionSetPoolXMLParser' => $baseDir . '/classes/class.ilObjQuestionSetPoolXMLParser.php', + 'ilParserQuestionProvider' => $baseDir . '/classes/providers/class.ilParserQuestionProvider.php', + 'ilPluginControllerFormGUI' => $baseDir . '/classes/controllers/abstract.ilPluginControllerFormGUI.php', + 'ilPluginControllerGUI' => $baseDir . '/classes/controllers/abstract.ilPluginControllerGUI.php', + 'ilPluginControllerTableGUI' => $baseDir . '/classes/controllers/abstract.ilPluginControllerTableGUI.php', + 'ilPluginDispatcher' => $baseDir . '/classes/dispatcher/class.ilPluginDispatcher.php', + 'ilPluginModel' => $baseDir . '/classes/models/abstract.ilPluginModel.php', + 'ilPluginModelInterface' => $baseDir . '/classes/models/interface.ilPluginModelInterface.php', + 'ilPluginModelList' => $baseDir . '/classes/models/abstract.ilPluginModelList.php', + 'ilPluginTableDataProvider' => $baseDir . '/classes/providers/interface.ilPluginTableDataProvider.php', + 'ilPluginTableDatabaseDataProvider' => $baseDir . '/classes/providers/abstract.ilPluginTableDatabaseDataProvider.php', + 'ilPluginTableGUI' => $baseDir . '/classes/tables/class.ilPluginTableGUI.php', + 'ilQuestionPoolQuestionList' => $baseDir . '/classes/models/class.ilQuestionPoolQuestionList.php', + 'ilQuestionSetPoolConditionGUI' => $baseDir . '/classes/controllers/abstract.ilQuestionSetPoolConditionGUI.php', + 'ilQuestionSetPoolConditionValidator' => $baseDir . '/classes/utils/abstract.ilQuestionSetPoolConditionValidator.php', + 'ilQuestionSetPoolExportGUI' => $baseDir . '/classes/class.ilQuestionSetPoolExportGUI.php', + 'ilQuestionSetPoolExportTableGUI' => $baseDir . '/classes/tables/class.ilQuestionSetPoolExportTableGUI.php', + 'ilQuestionSetPoolExporter' => $baseDir . '/classes/class.ilQuestionSetPoolExporter.php', + 'ilQuestionSetPoolImporter' => $baseDir . '/classes/class.ilQuestionSetPoolImporter.php', + 'ilQuestionSetPoolInfoBox' => $baseDir . '/classes/utils/abstract.ilQuestionSetPoolInfoBox.php', + 'ilQuestionSetPoolInitialConditionGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolInitialConditionGUI.php', + 'ilQuestionSetPoolJumpCondition' => $baseDir . '/classes/models/class.ilQuestionSetPoolJumpCondition.php', + 'ilQuestionSetPoolJumpConditionGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolJumpConditionGUI.php', + 'ilQuestionSetPoolJumpConditionList' => $baseDir . '/classes/models/class.ilQuestionSetPoolJumpConditionList.php', + 'ilQuestionSetPoolJumpConditionsProvider' => $baseDir . '/classes/providers/class.ilQuestionSetPoolJumpConditionsProvider.php', + 'ilQuestionSetPoolNode' => $baseDir . '/classes/models/class.ilQuestionSetPoolNode.php', + 'ilQuestionSetPoolNodeGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolNodeGUI.php', + 'ilQuestionSetPoolNodeList' => $baseDir . '/classes/models/class.ilQuestionSetPoolNodeList.php', + 'ilQuestionSetPoolNodeProvider' => $baseDir . '/classes/providers/class.ilQuestionSetPoolNodeProvider.php', + 'ilQuestionSetPoolNodeTableGUI' => $baseDir . '/classes/tables/class.ilQuestionSetPoolNodeTableGUI.php', + 'ilQuestionSetPoolNodesGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolNodesGUI.php', + 'ilQuestionSetPoolPath' => $baseDir . '/classes/models/class.ilQuestionSetPoolPath.php', + 'ilQuestionSetPoolPathGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolPathGUI.php', + 'ilQuestionSetPoolPathGraphGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolPathGraphGUI.php', + 'ilQuestionSetPoolPathList' => $baseDir . '/classes/models/class.ilQuestionSetPoolPathList.php', + 'ilQuestionSetPoolPathProvider' => $baseDir . '/classes/providers/class.ilQuestionSetPoolPathProvider.php', + 'ilQuestionSetPoolPathTableGUI' => $baseDir . '/classes/tables/class.ilQuestionSetPoolPathTableGUI.php', + 'ilQuestionSetPoolPathsGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolPathsGUI.php', + 'ilQuestionSetPoolPlugin' => $baseDir . '/classes/class.ilQuestionSetPoolPlugin.php', + 'ilQuestionSetPoolPropertiesGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolPropertiesGUI.php', + 'ilQuestionSetPoolQuestionHeaderBuilder' => $baseDir . '/classes/utils/class.ilQuestionSetPoolQuestionHeaderBuilder.php', + 'ilQuestionSetPoolQuestionsBrowserProvider' => $baseDir . '/classes/providers/class.ilQuestionSetPoolQuestionsBrowserProvider.php', + 'ilQuestionSetPoolQuestionsTableGUI' => $baseDir . '/classes/tables/class.ilQuestionSetPoolQuestionsTableGUI.php', + 'ilQuestionSetPoolSet' => $baseDir . '/classes/models/class.ilQuestionSetPoolSet.php', + 'ilQuestionSetPoolSetGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolSetGUI.php', + 'ilQuestionSetPoolSetList' => $baseDir . '/classes/models/class.ilQuestionSetPoolSetList.php', + 'ilQuestionSetPoolSetQuestionList' => $baseDir . '/classes/models/class.ilQuestionSetPoolSetQuestionList.php', + 'ilQuestionSetPoolSetQuestionsGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolSetQuestionsGUI.php', + 'ilQuestionSetPoolSetQuestionsProvider' => $baseDir . '/classes/providers/class.ilQuestionSetPoolSetQuestionsProvider.php', + 'ilQuestionSetPoolSetQuestionsTableGUI' => $baseDir . '/classes/tables/class.ilQuestionSetPoolSetQuestionsTableGUI.php', + 'ilQuestionSetPoolSetsGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolSetsGUI.php', + 'ilQuestionSetPoolSetsProvider' => $baseDir . '/classes/providers/class.ilQuestionSetPoolSetsProvider.php', + 'ilQuestionSetPoolSetsTableGUI' => $baseDir . '/classes/tables/class.ilQuestionSetPoolSetsTableGUI.php', + 'ilQuestionSetPoolSkillAdministrationGUI' => $baseDir . '/classes/controllers/class.ilQuestionSetPoolSkillAdministrationGUI.php', + 'ilQuestionSetPoolSkillAssQuestionList' => $baseDir . '/classes/utils/class.ilQuestionSetPoolSkillAssQuestionList.php', + 'ilQuestionSetPoolSkillQuestionListProvider' => $baseDir . '/classes/providers/class.ilQuestionSetPoolSkillQuestionListProvider.php', + 'ilQuestionSetPoolXmlValidator' => $baseDir . '/classes/class.ilQuestionSetPoolXmlValidator.php', ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index ff7cd48..d0527c6 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -13,38 +13,34 @@ class ComposerAutoloaderInit5eeebf534aceb45b65756d4e6db1f8cf } } + /** + * @return \Composer\Autoload\ClassLoader + */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } + require __DIR__ . '/platform_check.php'; + spl_autoload_register(array('ComposerAutoloaderInit5eeebf534aceb45b65756d4e6db1f8cf', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); spl_autoload_unregister(array('ComposerAutoloaderInit5eeebf534aceb45b65756d4e6db1f8cf', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; + require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInit5eeebf534aceb45b65756d4e6db1f8cf::getInitializer($loader)); } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { $loader->addClassMap($classMap); } } + $loader->setClassMapAuthoritative(true); $loader->register(true); return $loader; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 24c4bed..957e996 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -33,11 +33,158 @@ class ComposerStaticInit5eeebf534aceb45b65756d4e6db1f8cf ), ); + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'Fhaculty\\Graph\\Attribute\\AttributeAware' => __DIR__ . '/..' . '/clue/graph/src/Attribute/AttributeAware.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBag' => __DIR__ . '/..' . '/clue/graph/src/Attribute/AttributeBag.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBagContainer' => __DIR__ . '/..' . '/clue/graph/src/Attribute/AttributeBagContainer.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBagNamespaced' => __DIR__ . '/..' . '/clue/graph/src/Attribute/AttributeBagNamespaced.php', + 'Fhaculty\\Graph\\Attribute\\AttributeBagReference' => __DIR__ . '/..' . '/clue/graph/src/Attribute/AttributeBagReference.php', + 'Fhaculty\\Graph\\Edge\\Base' => __DIR__ . '/..' . '/clue/graph/src/Edge/Base.php', + 'Fhaculty\\Graph\\Edge\\Directed' => __DIR__ . '/..' . '/clue/graph/src/Edge/Directed.php', + 'Fhaculty\\Graph\\Edge\\Undirected' => __DIR__ . '/..' . '/clue/graph/src/Edge/Undirected.php', + 'Fhaculty\\Graph\\Exception' => __DIR__ . '/..' . '/clue/graph/src/Exception.php', + 'Fhaculty\\Graph\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/clue/graph/src/Exception/BadMethodCallException.php', + 'Fhaculty\\Graph\\Exception\\DomainException' => __DIR__ . '/..' . '/clue/graph/src/Exception/DomainException.php', + 'Fhaculty\\Graph\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/clue/graph/src/Exception/InvalidArgumentException.php', + 'Fhaculty\\Graph\\Exception\\LogicException' => __DIR__ . '/..' . '/clue/graph/src/Exception/LogicException.php', + 'Fhaculty\\Graph\\Exception\\NegativeCycleException' => __DIR__ . '/..' . '/clue/graph/src/Exception/NegativeCycleException.php', + 'Fhaculty\\Graph\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/clue/graph/src/Exception/OutOfBoundsException.php', + 'Fhaculty\\Graph\\Exception\\OverflowException' => __DIR__ . '/..' . '/clue/graph/src/Exception/OverflowException.php', + 'Fhaculty\\Graph\\Exception\\RangeException' => __DIR__ . '/..' . '/clue/graph/src/Exception/RangeException.php', + 'Fhaculty\\Graph\\Exception\\RuntimeException' => __DIR__ . '/..' . '/clue/graph/src/Exception/RuntimeException.php', + 'Fhaculty\\Graph\\Exception\\UnderflowException' => __DIR__ . '/..' . '/clue/graph/src/Exception/UnderflowException.php', + 'Fhaculty\\Graph\\Exception\\UnexpectedValueException' => __DIR__ . '/..' . '/clue/graph/src/Exception/UnexpectedValueException.php', + 'Fhaculty\\Graph\\Exporter\\ExporterInterface' => __DIR__ . '/..' . '/clue/graph/src/Exporter/ExporterInterface.php', + 'Fhaculty\\Graph\\Graph' => __DIR__ . '/..' . '/clue/graph/src/Graph.php', + 'Fhaculty\\Graph\\Set\\DualAggregate' => __DIR__ . '/..' . '/clue/graph/src/Set/DualAggregate.php', + 'Fhaculty\\Graph\\Set\\Edges' => __DIR__ . '/..' . '/clue/graph/src/Set/Edges.php', + 'Fhaculty\\Graph\\Set\\EdgesAggregate' => __DIR__ . '/..' . '/clue/graph/src/Set/EdgesAggregate.php', + 'Fhaculty\\Graph\\Set\\Vertices' => __DIR__ . '/..' . '/clue/graph/src/Set/Vertices.php', + 'Fhaculty\\Graph\\Set\\VerticesAggregate' => __DIR__ . '/..' . '/clue/graph/src/Set/VerticesAggregate.php', + 'Fhaculty\\Graph\\Set\\VerticesMap' => __DIR__ . '/..' . '/clue/graph/src/Set/VerticesMap.php', + 'Fhaculty\\Graph\\Vertex' => __DIR__ . '/..' . '/clue/graph/src/Vertex.php', + 'Fhaculty\\Graph\\Walk' => __DIR__ . '/..' . '/clue/graph/src/Walk.php', + 'Graphp\\Algorithms\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/Base.php', + 'Graphp\\Algorithms\\BaseDual' => __DIR__ . '/..' . '/graphp/algorithms/src/BaseDual.php', + 'Graphp\\Algorithms\\BaseGraph' => __DIR__ . '/..' . '/graphp/algorithms/src/BaseGraph.php', + 'Graphp\\Algorithms\\BaseVertex' => __DIR__ . '/..' . '/graphp/algorithms/src/BaseVertex.php', + 'Graphp\\Algorithms\\Bipartit' => __DIR__ . '/..' . '/graphp/algorithms/src/Bipartit.php', + 'Graphp\\Algorithms\\Complete' => __DIR__ . '/..' . '/graphp/algorithms/src/Complete.php', + 'Graphp\\Algorithms\\ConnectedComponents' => __DIR__ . '/..' . '/graphp/algorithms/src/ConnectedComponents.php', + 'Graphp\\Algorithms\\Degree' => __DIR__ . '/..' . '/graphp/algorithms/src/Degree.php', + 'Graphp\\Algorithms\\DetectNegativeCycle' => __DIR__ . '/..' . '/graphp/algorithms/src/DetectNegativeCycle.php', + 'Graphp\\Algorithms\\Directed' => __DIR__ . '/..' . '/graphp/algorithms/src/Directed.php', + 'Graphp\\Algorithms\\Eulerian' => __DIR__ . '/..' . '/graphp/algorithms/src/Eulerian.php', + 'Graphp\\Algorithms\\Flow' => __DIR__ . '/..' . '/graphp/algorithms/src/Flow.php', + 'Graphp\\Algorithms\\Groups' => __DIR__ . '/..' . '/graphp/algorithms/src/Groups.php', + 'Graphp\\Algorithms\\Loop' => __DIR__ . '/..' . '/graphp/algorithms/src/Loop.php', + 'Graphp\\Algorithms\\MaxFlow\\EdmondsKarp' => __DIR__ . '/..' . '/graphp/algorithms/src/MaxFlow/EdmondsKarp.php', + 'Graphp\\Algorithms\\MaximumMatching\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/MaximumMatching/Base.php', + 'Graphp\\Algorithms\\MaximumMatching\\Flow' => __DIR__ . '/..' . '/graphp/algorithms/src/MaximumMatching/Flow.php', + 'Graphp\\Algorithms\\MinimumCostFlow\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/MinimumCostFlow/Base.php', + 'Graphp\\Algorithms\\MinimumCostFlow\\CycleCanceling' => __DIR__ . '/..' . '/graphp/algorithms/src/MinimumCostFlow/CycleCanceling.php', + 'Graphp\\Algorithms\\MinimumCostFlow\\SuccessiveShortestPath' => __DIR__ . '/..' . '/graphp/algorithms/src/MinimumCostFlow/SuccessiveShortestPath.php', + 'Graphp\\Algorithms\\MinimumSpanningTree\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/MinimumSpanningTree/Base.php', + 'Graphp\\Algorithms\\MinimumSpanningTree\\Kruskal' => __DIR__ . '/..' . '/graphp/algorithms/src/MinimumSpanningTree/Kruskal.php', + 'Graphp\\Algorithms\\MinimumSpanningTree\\Prim' => __DIR__ . '/..' . '/graphp/algorithms/src/MinimumSpanningTree/Prim.php', + 'Graphp\\Algorithms\\Parallel' => __DIR__ . '/..' . '/graphp/algorithms/src/Parallel.php', + 'Graphp\\Algorithms\\Property\\GraphProperty' => __DIR__ . '/..' . '/graphp/algorithms/src/Property/GraphProperty.php', + 'Graphp\\Algorithms\\Property\\WalkProperty' => __DIR__ . '/..' . '/graphp/algorithms/src/Property/WalkProperty.php', + 'Graphp\\Algorithms\\ResidualGraph' => __DIR__ . '/..' . '/graphp/algorithms/src/ResidualGraph.php', + 'Graphp\\Algorithms\\Search\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/Search/Base.php', + 'Graphp\\Algorithms\\Search\\BreadthFirst' => __DIR__ . '/..' . '/graphp/algorithms/src/Search/BreadthFirst.php', + 'Graphp\\Algorithms\\Search\\DepthFirst' => __DIR__ . '/..' . '/graphp/algorithms/src/Search/DepthFirst.php', + 'Graphp\\Algorithms\\ShortestPath\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/ShortestPath/Base.php', + 'Graphp\\Algorithms\\ShortestPath\\BreadthFirst' => __DIR__ . '/..' . '/graphp/algorithms/src/ShortestPath/BreadthFirst.php', + 'Graphp\\Algorithms\\ShortestPath\\Dijkstra' => __DIR__ . '/..' . '/graphp/algorithms/src/ShortestPath/Dijkstra.php', + 'Graphp\\Algorithms\\ShortestPath\\MooreBellmanFord' => __DIR__ . '/..' . '/graphp/algorithms/src/ShortestPath/MooreBellmanFord.php', + 'Graphp\\Algorithms\\Symmetric' => __DIR__ . '/..' . '/graphp/algorithms/src/Symmetric.php', + 'Graphp\\Algorithms\\TopologicalSort' => __DIR__ . '/..' . '/graphp/algorithms/src/TopologicalSort.php', + 'Graphp\\Algorithms\\TransposeGraph' => __DIR__ . '/..' . '/graphp/algorithms/src/TransposeGraph.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/TravelingSalesmanProblem/Base.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\Bruteforce' => __DIR__ . '/..' . '/graphp/algorithms/src/TravelingSalesmanProblem/Bruteforce.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\MinimumSpanningTree' => __DIR__ . '/..' . '/graphp/algorithms/src/TravelingSalesmanProblem/MinimumSpanningTree.php', + 'Graphp\\Algorithms\\TravelingSalesmanProblem\\NearestNeighbor' => __DIR__ . '/..' . '/graphp/algorithms/src/TravelingSalesmanProblem/NearestNeighbor.php', + 'Graphp\\Algorithms\\Tree\\Base' => __DIR__ . '/..' . '/graphp/algorithms/src/Tree/Base.php', + 'Graphp\\Algorithms\\Tree\\BaseDirected' => __DIR__ . '/..' . '/graphp/algorithms/src/Tree/BaseDirected.php', + 'Graphp\\Algorithms\\Tree\\InTree' => __DIR__ . '/..' . '/graphp/algorithms/src/Tree/InTree.php', + 'Graphp\\Algorithms\\Tree\\OutTree' => __DIR__ . '/..' . '/graphp/algorithms/src/Tree/OutTree.php', + 'Graphp\\Algorithms\\Tree\\Undirected' => __DIR__ . '/..' . '/graphp/algorithms/src/Tree/Undirected.php', + 'Graphp\\Algorithms\\Weight' => __DIR__ . '/..' . '/graphp/algorithms/src/Weight.php', + 'Graphp\\GraphViz\\Dot' => __DIR__ . '/..' . '/graphp/graphviz/src/Dot.php', + 'Graphp\\GraphViz\\GraphViz' => __DIR__ . '/..' . '/graphp/graphviz/src/GraphViz.php', + 'Graphp\\GraphViz\\Image' => __DIR__ . '/..' . '/graphp/graphviz/src/Image.php', + 'ilConditionInputGUI' => __DIR__ . '/../..' . '/classes/utils/class.ilConditionInputGUI.php', + 'ilObjQuestionSetPool' => __DIR__ . '/../..' . '/classes/class.ilObjQuestionSetPool.php', + 'ilObjQuestionSetPoolAccess' => __DIR__ . '/../..' . '/classes/class.ilObjQuestionSetPoolAccess.php', + 'ilObjQuestionSetPoolGUI' => __DIR__ . '/../..' . '/classes/class.ilObjQuestionSetPoolGUI.php', + 'ilObjQuestionSetPoolListGUI' => __DIR__ . '/../..' . '/classes/class.ilObjQuestionSetPoolListGUI.php', + 'ilObjQuestionSetPoolXMLParser' => __DIR__ . '/../..' . '/classes/class.ilObjQuestionSetPoolXMLParser.php', + 'ilParserQuestionProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilParserQuestionProvider.php', + 'ilPluginControllerFormGUI' => __DIR__ . '/../..' . '/classes/controllers/abstract.ilPluginControllerFormGUI.php', + 'ilPluginControllerGUI' => __DIR__ . '/../..' . '/classes/controllers/abstract.ilPluginControllerGUI.php', + 'ilPluginControllerTableGUI' => __DIR__ . '/../..' . '/classes/controllers/abstract.ilPluginControllerTableGUI.php', + 'ilPluginDispatcher' => __DIR__ . '/../..' . '/classes/dispatcher/class.ilPluginDispatcher.php', + 'ilPluginModel' => __DIR__ . '/../..' . '/classes/models/abstract.ilPluginModel.php', + 'ilPluginModelInterface' => __DIR__ . '/../..' . '/classes/models/interface.ilPluginModelInterface.php', + 'ilPluginModelList' => __DIR__ . '/../..' . '/classes/models/abstract.ilPluginModelList.php', + 'ilPluginTableDataProvider' => __DIR__ . '/../..' . '/classes/providers/interface.ilPluginTableDataProvider.php', + 'ilPluginTableDatabaseDataProvider' => __DIR__ . '/../..' . '/classes/providers/abstract.ilPluginTableDatabaseDataProvider.php', + 'ilPluginTableGUI' => __DIR__ . '/../..' . '/classes/tables/class.ilPluginTableGUI.php', + 'ilQuestionPoolQuestionList' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionPoolQuestionList.php', + 'ilQuestionSetPoolConditionGUI' => __DIR__ . '/../..' . '/classes/controllers/abstract.ilQuestionSetPoolConditionGUI.php', + 'ilQuestionSetPoolConditionValidator' => __DIR__ . '/../..' . '/classes/utils/abstract.ilQuestionSetPoolConditionValidator.php', + 'ilQuestionSetPoolExportGUI' => __DIR__ . '/../..' . '/classes/class.ilQuestionSetPoolExportGUI.php', + 'ilQuestionSetPoolExportTableGUI' => __DIR__ . '/../..' . '/classes/tables/class.ilQuestionSetPoolExportTableGUI.php', + 'ilQuestionSetPoolExporter' => __DIR__ . '/../..' . '/classes/class.ilQuestionSetPoolExporter.php', + 'ilQuestionSetPoolImporter' => __DIR__ . '/../..' . '/classes/class.ilQuestionSetPoolImporter.php', + 'ilQuestionSetPoolInfoBox' => __DIR__ . '/../..' . '/classes/utils/abstract.ilQuestionSetPoolInfoBox.php', + 'ilQuestionSetPoolInitialConditionGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolInitialConditionGUI.php', + 'ilQuestionSetPoolJumpCondition' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolJumpCondition.php', + 'ilQuestionSetPoolJumpConditionGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolJumpConditionGUI.php', + 'ilQuestionSetPoolJumpConditionList' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolJumpConditionList.php', + 'ilQuestionSetPoolJumpConditionsProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilQuestionSetPoolJumpConditionsProvider.php', + 'ilQuestionSetPoolNode' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolNode.php', + 'ilQuestionSetPoolNodeGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolNodeGUI.php', + 'ilQuestionSetPoolNodeList' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolNodeList.php', + 'ilQuestionSetPoolNodeProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilQuestionSetPoolNodeProvider.php', + 'ilQuestionSetPoolNodeTableGUI' => __DIR__ . '/../..' . '/classes/tables/class.ilQuestionSetPoolNodeTableGUI.php', + 'ilQuestionSetPoolNodesGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolNodesGUI.php', + 'ilQuestionSetPoolPath' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolPath.php', + 'ilQuestionSetPoolPathGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolPathGUI.php', + 'ilQuestionSetPoolPathGraphGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolPathGraphGUI.php', + 'ilQuestionSetPoolPathList' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolPathList.php', + 'ilQuestionSetPoolPathProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilQuestionSetPoolPathProvider.php', + 'ilQuestionSetPoolPathTableGUI' => __DIR__ . '/../..' . '/classes/tables/class.ilQuestionSetPoolPathTableGUI.php', + 'ilQuestionSetPoolPathsGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolPathsGUI.php', + 'ilQuestionSetPoolPlugin' => __DIR__ . '/../..' . '/classes/class.ilQuestionSetPoolPlugin.php', + 'ilQuestionSetPoolPropertiesGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolPropertiesGUI.php', + 'ilQuestionSetPoolQuestionHeaderBuilder' => __DIR__ . '/../..' . '/classes/utils/class.ilQuestionSetPoolQuestionHeaderBuilder.php', + 'ilQuestionSetPoolQuestionsBrowserProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilQuestionSetPoolQuestionsBrowserProvider.php', + 'ilQuestionSetPoolQuestionsTableGUI' => __DIR__ . '/../..' . '/classes/tables/class.ilQuestionSetPoolQuestionsTableGUI.php', + 'ilQuestionSetPoolSet' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolSet.php', + 'ilQuestionSetPoolSetGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolSetGUI.php', + 'ilQuestionSetPoolSetList' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolSetList.php', + 'ilQuestionSetPoolSetQuestionList' => __DIR__ . '/../..' . '/classes/models/class.ilQuestionSetPoolSetQuestionList.php', + 'ilQuestionSetPoolSetQuestionsGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolSetQuestionsGUI.php', + 'ilQuestionSetPoolSetQuestionsProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilQuestionSetPoolSetQuestionsProvider.php', + 'ilQuestionSetPoolSetQuestionsTableGUI' => __DIR__ . '/../..' . '/classes/tables/class.ilQuestionSetPoolSetQuestionsTableGUI.php', + 'ilQuestionSetPoolSetsGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolSetsGUI.php', + 'ilQuestionSetPoolSetsProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilQuestionSetPoolSetsProvider.php', + 'ilQuestionSetPoolSetsTableGUI' => __DIR__ . '/../..' . '/classes/tables/class.ilQuestionSetPoolSetsTableGUI.php', + 'ilQuestionSetPoolSkillAdministrationGUI' => __DIR__ . '/../..' . '/classes/controllers/class.ilQuestionSetPoolSkillAdministrationGUI.php', + 'ilQuestionSetPoolSkillAssQuestionList' => __DIR__ . '/../..' . '/classes/utils/class.ilQuestionSetPoolSkillAssQuestionList.php', + 'ilQuestionSetPoolSkillQuestionListProvider' => __DIR__ . '/../..' . '/classes/providers/class.ilQuestionSetPoolSkillQuestionListProvider.php', + 'ilQuestionSetPoolXmlValidator' => __DIR__ . '/../..' . '/classes/class.ilQuestionSetPoolXmlValidator.php', + ); + public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInit5eeebf534aceb45b65756d4e6db1f8cf::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit5eeebf534aceb45b65756d4e6db1f8cf::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit5eeebf534aceb45b65756d4e6db1f8cf::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e949ed6..460379e 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,145 +1,152 @@ -[ - { - "name": "clue/graph", - "version": "v0.9.0", - "version_normalized": "0.9.0.0", - "source": { - "type": "git", - "url": "https://github.com/clue/graph.git", - "reference": "0336a4d5229fa61a20ccceaeab25e52ac9542700" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/graph/zipball/0336a4d5229fa61a20ccceaeab25e52ac9542700", - "reference": "0336a4d5229fa61a20ccceaeab25e52ac9542700", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "graphp/algorithms": "Common graph algorithms, such as Dijkstra and Moore-Bellman-Ford (shortest path), minimum spanning tree (MST), Kruskal, Prim and many more..", - "graphp/graphviz": "GraphViz graph drawing / DOT output" - }, - "time": "2015-03-07T18:11:31+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Fhaculty\\Graph\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A mathematical graph/network library written in PHP", - "homepage": "https://github.com/clue/graph", - "keywords": [ - "edge", - "graph", - "mathematical", - "network", - "vertex" - ] - }, - { - "name": "graphp/algorithms", - "version": "v0.8.1", - "version_normalized": "0.8.1.0", - "source": { - "type": "git", - "url": "https://github.com/graphp/algorithms.git", - "reference": "81db4049c35730767ec8f97fb5c4844234b86cef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/graphp/algorithms/zipball/81db4049c35730767ec8f97fb5c4844234b86cef", - "reference": "81db4049c35730767ec8f97fb5c4844234b86cef", - "shasum": "" - }, - "require": { - "clue/graph": "~0.9.0|~0.8.0", - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2015-03-08T10:12:01+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Graphp\\Algorithms\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@lueck.tv" - } - ], - "description": "Common mathematical graph algorithms", - "homepage": "https://github.com/graphp/algorithms", - "keywords": [ - "Graph algorithms", - "dijkstra", - "kruskal", - "minimum spanning tree", - "moore-bellman-ford", - "prim", - "shortest path" - ] - }, - { - "name": "graphp/graphviz", - "version": "v0.2.1", - "version_normalized": "0.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/graphp/graphviz.git", - "reference": "2676522dfcd907fd3cb52891ea64a052c4ac4c2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/graphp/graphviz/zipball/2676522dfcd907fd3cb52891ea64a052c4ac4c2a", - "reference": "2676522dfcd907fd3cb52891ea64a052c4ac4c2a", - "shasum": "" - }, - "require": { - "clue/graph": "~0.9.0|~0.8.0", - "graphp/algorithms": "~0.8.0", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2015-03-08T10:30:28+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Graphp\\GraphViz\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "GraphViz graph drawing for mathematical graph/network", - "homepage": "https://github.com/graphp/graphviz", - "keywords": [ - "dot output", - "graph drawing", - "graph image", - "graphviz" - ] - } -] +{ + "packages": [ + { + "name": "clue/graph", + "version": "v0.9.0", + "version_normalized": "0.9.0.0", + "source": { + "type": "git", + "url": "https://github.com/clue/graph.git", + "reference": "0336a4d5229fa61a20ccceaeab25e52ac9542700" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/graph/zipball/0336a4d5229fa61a20ccceaeab25e52ac9542700", + "reference": "0336a4d5229fa61a20ccceaeab25e52ac9542700", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "graphp/algorithms": "Common graph algorithms, such as Dijkstra and Moore-Bellman-Ford (shortest path), minimum spanning tree (MST), Kruskal, Prim and many more..", + "graphp/graphviz": "GraphViz graph drawing / DOT output" + }, + "time": "2015-03-07T18:11:31+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Fhaculty\\Graph\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A mathematical graph/network library written in PHP", + "homepage": "https://github.com/clue/graph", + "keywords": [ + "edge", + "graph", + "mathematical", + "network", + "vertex" + ], + "install-path": "../clue/graph" + }, + { + "name": "graphp/algorithms", + "version": "v0.8.1", + "version_normalized": "0.8.1.0", + "source": { + "type": "git", + "url": "https://github.com/graphp/algorithms.git", + "reference": "81db4049c35730767ec8f97fb5c4844234b86cef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/graphp/algorithms/zipball/81db4049c35730767ec8f97fb5c4844234b86cef", + "reference": "81db4049c35730767ec8f97fb5c4844234b86cef", + "shasum": "" + }, + "require": { + "clue/graph": "~0.9.0|~0.8.0", + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2015-03-08T10:12:01+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Graphp\\Algorithms\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "Common mathematical graph algorithms", + "homepage": "https://github.com/graphp/algorithms", + "keywords": [ + "Graph algorithms", + "dijkstra", + "kruskal", + "minimum spanning tree", + "moore-bellman-ford", + "prim", + "shortest path" + ], + "install-path": "../graphp/algorithms" + }, + { + "name": "graphp/graphviz", + "version": "v0.2.1", + "version_normalized": "0.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/graphp/graphviz.git", + "reference": "2676522dfcd907fd3cb52891ea64a052c4ac4c2a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/graphp/graphviz/zipball/2676522dfcd907fd3cb52891ea64a052c4ac4c2a", + "reference": "2676522dfcd907fd3cb52891ea64a052c4ac4c2a", + "shasum": "" + }, + "require": { + "clue/graph": "~0.9.0|~0.8.0", + "graphp/algorithms": "~0.8.0", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2015-03-08T10:30:28+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Graphp\\GraphViz\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "GraphViz graph drawing for mathematical graph/network", + "homepage": "https://github.com/graphp/graphviz", + "keywords": [ + "dot output", + "graph drawing", + "graph image", + "graphviz" + ], + "install-path": "../graphp/graphviz" + } + ], + "dev": true, + "dev-package-names": [] +} -- GitLab From 8cd8665f9e99476d91e89dcc5aecaad32d6ed301 Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Mon, 15 Nov 2021 14:23:19 +0100 Subject: [PATCH 03/10] Remove no longer needed require_once --- classes/class.ilObjQuestionSetPool.php | 5 ----- classes/class.ilObjQuestionSetPoolAccess.php | 2 -- classes/class.ilObjQuestionSetPoolGUI.php | 3 --- classes/class.ilObjQuestionSetPoolListGUI.php | 1 - classes/class.ilQuestionSetPoolExportGUI.php | 1 - .../abstract.ilPluginControllerFormGUI.php | 2 -- .../abstract.ilPluginControllerGUI.php | 2 -- .../abstract.ilPluginControllerTableGUI.php | 2 -- .../abstract.ilQuestionSetPoolConditionGUI.php | 4 ---- ...class.ilQuestionSetPoolInitialConditionGUI.php | 2 -- .../class.ilQuestionSetPoolJumpConditionGUI.php | 2 -- .../class.ilQuestionSetPoolNodeGUI.php | 2 -- .../class.ilQuestionSetPoolNodesGUI.php | 2 -- .../class.ilQuestionSetPoolPathGUI.php | 2 -- .../class.ilQuestionSetPoolPathGraphGUI.php | 1 - .../class.ilQuestionSetPoolPathsGUI.php | 2 -- .../class.ilQuestionSetPoolPropertiesGUI.php | 2 -- .../controllers/class.ilQuestionSetPoolSetGUI.php | 2 -- .../class.ilQuestionSetPoolSetQuestionsGUI.php | 2 -- .../class.ilQuestionSetPoolSetsGUI.php | 2 -- ...ss.ilQuestionSetPoolSkillAdministrationGUI.php | 3 --- classes/models/abstract.ilPluginModel.php | 2 -- .../models/class.ilQuestionPoolQuestionList.php | 4 ---- .../class.ilQuestionSetPoolJumpCondition.php | 3 --- .../class.ilQuestionSetPoolJumpConditionList.php | 4 ---- classes/models/class.ilQuestionSetPoolNode.php | 7 ------- .../models/class.ilQuestionSetPoolNodeList.php | 6 ------ classes/models/class.ilQuestionSetPoolPath.php | 7 ------- .../models/class.ilQuestionSetPoolPathList.php | 4 ---- classes/models/class.ilQuestionSetPoolSet.php | 8 -------- classes/models/class.ilQuestionSetPoolSetList.php | 7 ------- .../class.ilQuestionSetPoolSetQuestionList.php | 4 ---- ...abstract.ilPluginTableDatabaseDataProvider.php | 2 -- ...ss.ilQuestionSetPoolJumpConditionsProvider.php | 2 -- .../class.ilQuestionSetPoolNodeProvider.php | 2 -- .../class.ilQuestionSetPoolPathProvider.php | 2 -- ....ilQuestionSetPoolQuestionsBrowserProvider.php | 2 -- ...lass.ilQuestionSetPoolSetQuestionsProvider.php | 2 -- .../class.ilQuestionSetPoolSetsProvider.php | 2 -- ...ilQuestionSetPoolSkillQuestionListProvider.php | 2 -- classes/tables/class.ilPluginTableGUI.php | 3 --- .../class.ilQuestionSetPoolNodeTableGUI.php | 3 --- .../class.ilQuestionSetPoolPathTableGUI.php | 2 -- .../class.ilQuestionSetPoolQuestionsTableGUI.php | 2 -- ...lass.ilQuestionSetPoolSetQuestionsTableGUI.php | 1 - .../class.ilQuestionSetPoolSetsTableGUI.php | 2 -- ...stract.ilQuestionSetPoolConditionValidator.php | 15 --------------- test/ilQuestionSetPoolTestSuite.php | 2 -- 48 files changed, 148 deletions(-) diff --git a/classes/class.ilObjQuestionSetPool.php b/classes/class.ilObjQuestionSetPool.php index 66c16a3..f306e3b 100644 --- a/classes/class.ilObjQuestionSetPool.php +++ b/classes/class.ilObjQuestionSetPool.php @@ -1,8 +1,6 @@ language()->loadLanguageModule('assessment'); @@ -102,7 +98,6 @@ class ilObjQuestionSetPool extends ilObjectPlugin implements ilPluginModelInterf */ protected function initType() { - require_once 'class.ilQuestionSetPoolPlugin.php'; $this->setType(ilQuestionSetPoolPlugin::getPluginId()); } diff --git a/classes/class.ilObjQuestionSetPoolAccess.php b/classes/class.ilObjQuestionSetPoolAccess.php index f58347e..0403ab0 100644 --- a/classes/class.ilObjQuestionSetPoolAccess.php +++ b/classes/class.ilObjQuestionSetPoolAccess.php @@ -1,8 +1,6 @@ ctrl->getNextClass($this); switch ($next_class) { case 'ilquestionsetpoolskilladministrationgui': - require_once 'controllers/class.ilQuestionSetPoolSkillAdministrationGUI.php'; $this->prepareOutput(); $this->addHeaderAction(); @@ -89,7 +88,6 @@ class ilObjQuestionSetPoolGUI extends ilObjectPluginGUI implements ilDesktopItem default: $this->ensureEntityExistance(); - require_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/classes/dispatcher/class.ilPluginDispatcher.php"; $dispatcher = ilPluginDispatcher::getInstance($this); $dispatcher->dispatch($cmd); break; @@ -183,7 +181,6 @@ class ilObjQuestionSetPoolGUI extends ilObjectPluginGUI implements ilDesktopItem */ public function getType() { - require_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/classes/class.ilQuestionSetPoolPlugin.php"; return ilQuestionSetPoolPlugin::getPluginId(); } diff --git a/classes/class.ilObjQuestionSetPoolListGUI.php b/classes/class.ilObjQuestionSetPoolListGUI.php index 4f9c464..a7e3d15 100644 --- a/classes/class.ilObjQuestionSetPoolListGUI.php +++ b/classes/class.ilObjQuestionSetPoolListGUI.php @@ -35,7 +35,6 @@ class ilObjQuestionSetPoolListGUI extends ilObjectPluginListGUI public function initType() { - require_once 'class.ilQuestionSetPoolPlugin.php'; $this->setType(ilQuestionSetPoolPlugin::getPluginId()); } diff --git a/classes/class.ilQuestionSetPoolExportGUI.php b/classes/class.ilQuestionSetPoolExportGUI.php index 7c0230d..26b772d 100755 --- a/classes/class.ilQuestionSetPoolExportGUI.php +++ b/classes/class.ilQuestionSetPoolExportGUI.php @@ -12,7 +12,6 @@ class ilQuestionSetPoolExportGUI extends ilExportGUI */ protected function buildExportTableGUI() { - require_once 'tables/class.ilQuestionSetPoolExportTableGUI.php'; $table = new ilQuestionSetPoolExportTableGUI($this, 'listExportFiles', $this->obj); return $table; } diff --git a/classes/controllers/abstract.ilPluginControllerFormGUI.php b/classes/controllers/abstract.ilPluginControllerFormGUI.php index 0da1961..3224c2c 100644 --- a/classes/controllers/abstract.ilPluginControllerFormGUI.php +++ b/classes/controllers/abstract.ilPluginControllerFormGUI.php @@ -1,7 +1,5 @@ node->getId(); $data = $provider->loadData($filter, $params); diff --git a/classes/models/class.ilQuestionSetPoolNode.php b/classes/models/class.ilQuestionSetPoolNode.php index 2778cae..55319ca 100644 --- a/classes/models/class.ilQuestionSetPoolNode.php +++ b/classes/models/class.ilQuestionSetPoolNode.php @@ -1,7 +1,5 @@ jump_condition_list = new ilQuestionSetPoolJumpConditionList($this); parent::__construct($id); @@ -247,8 +244,6 @@ class ilQuestionSetPoolNode extends ilPluginModel public function read() { - require_once "class.ilQuestionSetPoolPath.php"; - global $DIC; $ilDB = $DIC->database(); @@ -305,7 +300,6 @@ class ilQuestionSetPoolNode extends ilPluginModel ) ); - require_once "class.ilQuestionSetPoolJumpCondition.php"; $data = $this->getJumpConditionList()->getData(); foreach ($data as $element) { $condition = new ilQuestionSetPoolJumpCondition($element["id"]); @@ -354,7 +348,6 @@ class ilQuestionSetPoolNode extends ilPluginModel private function removeJumpConditions() { - require_once "class.ilQuestionSetPoolJumpCondition.php"; $data = $this->getJumpConditionList()->getData(); foreach ($data as $element) { $condition = new ilQuestionSetPoolJumpCondition($element["id"]); diff --git a/classes/models/class.ilQuestionSetPoolNodeList.php b/classes/models/class.ilQuestionSetPoolNodeList.php index 0d9f498..a692444 100644 --- a/classes/models/class.ilQuestionSetPoolNodeList.php +++ b/classes/models/class.ilQuestionSetPoolNodeList.php @@ -1,7 +1,5 @@ path->getId(); return $provider->loadData($filter, $params); @@ -123,8 +119,6 @@ class ilQuestionSetPoolNodeList extends ilPluginModelList */ public function createObjectsFromData($data) { - require_once "class.ilQuestionSetPoolJumpConditionList.php"; - require_once "class.ilQuestionSetPoolNode.php"; foreach ($data as $key => $element) { $node = new ilQuestionSetPoolNode($element["id"]); $node->read(); diff --git a/classes/models/class.ilQuestionSetPoolPath.php b/classes/models/class.ilQuestionSetPoolPath.php index fe70301..c5f2fd0 100644 --- a/classes/models/class.ilQuestionSetPoolPath.php +++ b/classes/models/class.ilQuestionSetPoolPath.php @@ -1,7 +1,5 @@ database(); $result = $ilDB->queryF( @@ -273,7 +269,6 @@ class ilQuestionSetPoolPath extends ilPluginModel array($clone->getId(), $clone->getTitle(),$clone->getSet()->getId(),$clone->getSet()->getId()) ); - require_once "class.ilQuestionSetPoolNode.php"; $data = $this->getNodes()->getData(); foreach ($data as $element) { $node = new ilQuestionSetPoolNode($element["id"]); @@ -351,8 +346,6 @@ class ilQuestionSetPoolPath extends ilPluginModel private function removeNodes() { - require_once "class.ilQuestionSetPoolNode.php"; - $data = $this->getNodes()->getData(); foreach ($data as $element) { $node = new ilQuestionSetPoolNode($element["id"]); diff --git a/classes/models/class.ilQuestionSetPoolPathList.php b/classes/models/class.ilQuestionSetPoolPathList.php index 413ae46..7571628 100644 --- a/classes/models/class.ilQuestionSetPoolPathList.php +++ b/classes/models/class.ilQuestionSetPoolPathList.php @@ -1,7 +1,5 @@ set->getId(); return $provider->loadData($filter, $params); diff --git a/classes/models/class.ilQuestionSetPoolSet.php b/classes/models/class.ilQuestionSetPoolSet.php index 557791b..668b4d6 100644 --- a/classes/models/class.ilQuestionSetPoolSet.php +++ b/classes/models/class.ilQuestionSetPoolSet.php @@ -1,7 +1,5 @@ question_list = new ilQuestionSetPoolSetQuestionList($this); $this->path_list = new ilQuestionSetPoolPathList($this); @@ -384,8 +380,6 @@ class ilQuestionSetPoolSet extends ilPluginModel private function removePaths() { - require_once "class.ilQuestionSetPoolPath.php"; - $data = $this->getPathList()->getData(); foreach ($data as $element) { $path = new ilQuestionSetPoolPath($element["id"]); @@ -418,8 +412,6 @@ class ilQuestionSetPoolSet extends ilPluginModel */ private function duplicatePaths($clone, $question_ids) { - require_once "class.ilQuestionSetPoolPath.php"; - $data = $this->getPathList()->getData(); foreach ($data as $element) { $path = new ilQuestionSetPoolPath($element["id"]); diff --git a/classes/models/class.ilQuestionSetPoolSetList.php b/classes/models/class.ilQuestionSetPoolSetList.php index 021db34..a152393 100644 --- a/classes/models/class.ilQuestionSetPoolSetList.php +++ b/classes/models/class.ilQuestionSetPoolSetList.php @@ -1,7 +1,5 @@ question_set_pool->getId(); return $provider->loadData($filter, $params); @@ -70,8 +66,6 @@ class ilQuestionSetPoolSetList extends ilPluginModelList */ public function insert($set_ids, $do_clone = true) { - require_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/classes/class.ilObjQuestionSetPool.php"; - foreach ($set_ids as $set_id) { $set = new ilQuestionSetPoolSet($set_id); $set->read(); @@ -120,7 +114,6 @@ class ilQuestionSetPoolSetList extends ilPluginModelList { $objects = array(); foreach ($data as $item) { - require_once 'class.ilQuestionSetPoolSet.php'; $set = new ilQuestionSetPoolSet($this->question_set_pool); $set->setId($item['id']); $set->setTitle($item['title']); diff --git a/classes/models/class.ilQuestionSetPoolSetQuestionList.php b/classes/models/class.ilQuestionSetPoolSetQuestionList.php index 434fe11..47496d5 100644 --- a/classes/models/class.ilQuestionSetPoolSetQuestionList.php +++ b/classes/models/class.ilQuestionSetPoolSetQuestionList.php @@ -1,7 +1,5 @@ set->getId(); return $provider->loadData($filter, $params); diff --git a/classes/providers/abstract.ilPluginTableDatabaseDataProvider.php b/classes/providers/abstract.ilPluginTableDatabaseDataProvider.php index 792242e..34adb71 100644 --- a/classes/providers/abstract.ilPluginTableDatabaseDataProvider.php +++ b/classes/providers/abstract.ilPluginTableDatabaseDataProvider.php @@ -1,7 +1,5 @@ read(); $row["jump_conditions"] = $model->getJumpConditionList()->getData(); diff --git a/classes/tables/class.ilQuestionSetPoolPathTableGUI.php b/classes/tables/class.ilQuestionSetPoolPathTableGUI.php index 88630ae..d36326f 100644 --- a/classes/tables/class.ilQuestionSetPoolPathTableGUI.php +++ b/classes/tables/class.ilQuestionSetPoolPathTableGUI.php @@ -1,7 +1,5 @@ Date: Mon, 15 Nov 2021 14:32:26 +0100 Subject: [PATCH 04/10] Remove no longer needed require_once & fix test --- test/Mocks/ilPluginTableDatabaseDataProviderMock.php | 2 -- test/dispatcher/ilPluginDispatcherTest.php | 11 +++++------ test/ilQuestionSetPoolTestSuite.php | 4 +++- .../ilPluginTableDatabaseDataProviderTest.php | 6 +++--- .../ilQuestionSetPoolQuestionsProviderTest.php | 12 ++++++------ 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/test/Mocks/ilPluginTableDatabaseDataProviderMock.php b/test/Mocks/ilPluginTableDatabaseDataProviderMock.php index 548f4f4..0385044 100644 --- a/test/Mocks/ilPluginTableDatabaseDataProviderMock.php +++ b/test/Mocks/ilPluginTableDatabaseDataProviderMock.php @@ -1,7 +1,5 @@ */ -class ilPluginDispatcherTest extends PHPUnit_Framework_TestCase +class ilPluginDispatcherTest extends TestCase { /** @@ -18,16 +19,14 @@ class ilPluginDispatcherTest extends PHPUnit_Framework_TestCase protected $dispatcher; /** - * @var PHPUnit_Framework_MockObject_MockObject + * @var MockObject */ protected $baseController_mock; - public function setUp() + public function setUp() : void { // Include original Object for mock, because an Error accures, if it is included in subfiles in a test - require_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/classes/class.ilObjQuestionSetPoolGUI.php"; require_once "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php"; - require_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/test/Mocks/ilQuestionSetPoolPluginMock.php"; global $DIC; $ilTabs = $DIC->tabs(); diff --git a/test/ilQuestionSetPoolTestSuite.php b/test/ilQuestionSetPoolTestSuite.php index 962b06f..4e74ba2 100644 --- a/test/ilQuestionSetPoolTestSuite.php +++ b/test/ilQuestionSetPoolTestSuite.php @@ -1,5 +1,7 @@ */ -class ilQuestionSetPoolTestSuite extends PHPUnit_Framework_TestSuite +class ilQuestionSetPoolTestSuite extends TestSuite { public static function suite() { diff --git a/test/providers/ilPluginTableDatabaseDataProviderTest.php b/test/providers/ilPluginTableDatabaseDataProviderTest.php index 508ca7b..1353d76 100644 --- a/test/providers/ilPluginTableDatabaseDataProviderTest.php +++ b/test/providers/ilPluginTableDatabaseDataProviderTest.php @@ -1,6 +1,6 @@ */ -class ilPluginTableDatabaseDataProviderTest extends PHPUnit_Framework_TestCase +class ilPluginTableDatabaseDataProviderTest extends TestCase { /** @@ -17,7 +17,7 @@ class ilPluginTableDatabaseDataProviderTest extends PHPUnit_Framework_TestCase */ protected $provider; - public function setUp() + public function setUp() : void { global $DIC; $ilDB = $DIC->database(); diff --git a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php index 7f871a7..c74e977 100644 --- a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php +++ b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php @@ -1,5 +1,7 @@ */ -class ilQuestionSetPoolQuestionsProviderTest extends PHPUnit_Framework_TestCase +class ilQuestionSetPoolQuestionsProviderTest extends TestCase { /** - * @var ilQuestionSetPoolQuestionsProvider; + * @var ilQuestionSetPoolSetQuestionsProvider; */ protected $provider; - public function setUp() + public function setUp() : void { - require_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/classes/providers/class.ilQuestionSetPoolQuestionsProvider.php"; - global $DIC; $ilDB = $DIC->database(); @@ -31,7 +31,7 @@ class ilQuestionSetPoolQuestionsProviderTest extends PHPUnit_Framework_TestCase $ilDB = $ilDB_mock; - $this->provider = new ilQuestionSetPoolQuestionsProvider(); + $this->provider = new ilQuestionSetPoolSetQuestionsProvider(); } public function testGetSelectPart() -- GitLab From 4b3208512d4f1a8fcaa986f368a2d789e34aaf92 Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Mon, 15 Nov 2021 14:56:59 +0100 Subject: [PATCH 05/10] Add missing vendor files --- test/QuestionSetPoolTestBaseCase.php | 58 +++++ vendor/composer/InstalledVersions.php | 312 ++++++++++++++++++++++++++ vendor/composer/installed.php | 51 +++++ vendor/composer/platform_check.php | 26 +++ 4 files changed, 447 insertions(+) create mode 100644 test/QuestionSetPoolTestBaseCase.php create mode 100644 vendor/composer/InstalledVersions.php create mode 100644 vendor/composer/installed.php create mode 100644 vendor/composer/platform_check.php diff --git a/test/QuestionSetPoolTestBaseCase.php b/test/QuestionSetPoolTestBaseCase.php new file mode 100644 index 0000000..b6ec41b --- /dev/null +++ b/test/QuestionSetPoolTestBaseCase.php @@ -0,0 +1,58 @@ + + */ +class QuestionSetPoolTestBaseCase extends TestCase +{ + protected Container $dic; + + protected function setUp() : void + { + $this->dic = new Container(); + $GLOBALS['DIC'] = $this->dic; + + parent::setUp(); + } + + /** + * @return mixed|MockObject|ilTabsGUI + */ + protected function addGlobal_ilTabs() + { + $mock = $this->getMockBuilder("ilTabsGUI")->disableOriginalConstructor()->getMock(); + $this->setGlobalVariable("ilTabs", $mock); + return $mock; + } + + /** + * @return mixed|MockObject|ilDBInterface + */ + protected function addGlobal_ilDB() + { + $mock = $this->getMockBuilder("ilDB")->getMock(); + $this->setGlobalVariable("lng", $mock); + return $mock; + } + + /** + * @param string $name + * @param mixed $value + */ + protected function setGlobalVariable(string $name, $value) : void + { + global $DIC; + + $GLOBALS[$name] = $value; + + unset($DIC[$name]); + $DIC[$name] = $GLOBALS[$name]; + } +} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..d74de26 --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,312 @@ + + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '3a1c0aaa56a1691218fb1c8853a8de9a4de1b7e2', + 'name' => 'ilias-plugins/question-set-pool', + ), + 'versions' => + array ( + 'clue/graph' => + array ( + 'pretty_version' => 'v0.9.0', + 'version' => '0.9.0.0', + 'aliases' => + array ( + ), + 'reference' => '0336a4d5229fa61a20ccceaeab25e52ac9542700', + ), + 'graphp/algorithms' => + array ( + 'pretty_version' => 'v0.8.1', + 'version' => '0.8.1.0', + 'aliases' => + array ( + ), + 'reference' => '81db4049c35730767ec8f97fb5c4844234b86cef', + ), + 'graphp/graphviz' => + array ( + 'pretty_version' => 'v0.2.1', + 'version' => '0.2.1.0', + 'aliases' => + array ( + ), + 'reference' => '2676522dfcd907fd3cb52891ea64a052c4ac4c2a', + ), + 'ilias-plugins/question-set-pool' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '3a1c0aaa56a1691218fb1c8853a8de9a4de1b7e2', + ), + ), +); +private static $canGetVendors; +private static $installedByVendor = array(); + + + + + + + +public static function getInstalledPackages() +{ +$packages = array(); +foreach (self::getInstalled() as $installed) { +$packages[] = array_keys($installed['versions']); +} + +if (1 === \count($packages)) { +return $packages[0]; +} + +return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); +} + + + + + + + + + +public static function isInstalled($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (isset($installed['versions'][$packageName])) { +return true; +} +} + +return false; +} + + + + + + + + + + + + + + +public static function satisfies(VersionParser $parser, $packageName, $constraint) +{ +$constraint = $parser->parseConstraints($constraint); +$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + +return $provided->matches($constraint); +} + + + + + + + + + + +public static function getVersionRanges($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +$ranges = array(); +if (isset($installed['versions'][$packageName]['pretty_version'])) { +$ranges[] = $installed['versions'][$packageName]['pretty_version']; +} +if (array_key_exists('aliases', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); +} +if (array_key_exists('replaced', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); +} +if (array_key_exists('provided', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); +} + +return implode(' || ', $ranges); +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['version'])) { +return null; +} + +return $installed['versions'][$packageName]['version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getPrettyVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['pretty_version'])) { +return null; +} + +return $installed['versions'][$packageName]['pretty_version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getReference($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['reference'])) { +return null; +} + +return $installed['versions'][$packageName]['reference']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getRootPackage() +{ +$installed = self::getInstalled(); + +return $installed[0]['root']; +} + + + + + + + +public static function getRawData() +{ +return self::$installed; +} + + + + + + + + + + + + + + + + + + + +public static function reload($data) +{ +self::$installed = $data; +self::$installedByVendor = array(); +} + + + + + +private static function getInstalled() +{ +if (null === self::$canGetVendors) { +self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); +} + +$installed = array(); + +if (self::$canGetVendors) { +foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { +if (isset(self::$installedByVendor[$vendorDir])) { +$installed[] = self::$installedByVendor[$vendorDir]; +} elseif (is_file($vendorDir.'/composer/installed.php')) { +$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; +} +} +} + +$installed[] = self::$installed; + +return $installed; +} +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 0000000..37d9fbe --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,51 @@ + + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '3a1c0aaa56a1691218fb1c8853a8de9a4de1b7e2', + 'name' => 'ilias-plugins/question-set-pool', + ), + 'versions' => + array ( + 'clue/graph' => + array ( + 'pretty_version' => 'v0.9.0', + 'version' => '0.9.0.0', + 'aliases' => + array ( + ), + 'reference' => '0336a4d5229fa61a20ccceaeab25e52ac9542700', + ), + 'graphp/algorithms' => + array ( + 'pretty_version' => 'v0.8.1', + 'version' => '0.8.1.0', + 'aliases' => + array ( + ), + 'reference' => '81db4049c35730767ec8f97fb5c4844234b86cef', + ), + 'graphp/graphviz' => + array ( + 'pretty_version' => 'v0.2.1', + 'version' => '0.2.1.0', + 'aliases' => + array ( + ), + 'reference' => '2676522dfcd907fd3cb52891ea64a052c4ac4c2a', + ), + 'ilias-plugins/question-set-pool' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '3a1c0aaa56a1691218fb1c8853a8de9a4de1b7e2', + ), + ), +); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 0000000..7621d4f --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 50300)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 5.3.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} -- GitLab From 2a427f28ad06477db752ba432b5fe3da036faa7d Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Mon, 15 Nov 2021 15:06:48 +0100 Subject: [PATCH 06/10] Fix some issues with tests --- test/dispatcher/ilPluginDispatcherTest.php | 16 ++++++++++------ .../ilQuestionSetPoolQuestionsProviderTest.php | 14 ++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/test/dispatcher/ilPluginDispatcherTest.php b/test/dispatcher/ilPluginDispatcherTest.php index 21369a9..0d8cfb6 100644 --- a/test/dispatcher/ilPluginDispatcherTest.php +++ b/test/dispatcher/ilPluginDispatcherTest.php @@ -2,6 +2,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\MockObject\MockObject; +use ILIAS\DI\Container; /** * Class ilPluginDispatcherTest @@ -29,17 +30,20 @@ class ilPluginDispatcherTest extends TestCase require_once "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php"; global $DIC; - $ilTabs = $DIC->tabs(); + $DIC = new Container(); + $ilTabs_mock = $this->getMockBuilder(ilTabsGUI::class)->disableOriginalConstructor()->getMock(); + $GLOBALS["ilTabs"] = $ilTabs_mock; + unset($DIC["ilTabs"]); + $DIC["ilTabs"] = $GLOBALS["ilTabs"]; - $this->baseController_mock = $this->getMockBuilder("ilObjQuestionSetPoolGUI")->disableOriginalConstructor()->getMock(); - $this->baseController_mock->plugin = new ilQuestionSetPoolPluginMock(); - - $ilTabs_mock = $this->getMockBuilder("ilTabsGUI")->disableOriginalConstructor()->getMock(); $ilTabs_mock ->expects($this->any()) ->method("activateTab"); - $ilTabs = $ilTabs_mock; + $this->baseController_mock = $this->getMockBuilder("ilObjQuestionSetPoolGUI")->disableOriginalConstructor()->getMock(); + $this->baseController_mock->plugin = new ilQuestionSetPoolPluginMock(); + + $this->dispatcher = ilPluginDispatcher::getInstance($this->baseController_mock); } diff --git a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php index c74e977..1028ed7 100644 --- a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php +++ b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php @@ -1,6 +1,7 @@ database(); + $DIC = new Container(); + $ilDB_mock = $this->getMockBuilder(ilDBInterface::class)->getMock(); + $GLOBALS["ilDB"] = $ilDB_mock; + unset($DIC["ilDB"]); + $DIC["ilDB"] = $GLOBALS["ilDB"]; - $ilDB_mock = $this->getMockBuilder("ilDB")->getMock(); $ilDB_mock ->expects($this->any()) ->method("quote") ->with(2) - ->will($this->returnValue(2)); - - $ilDB = $ilDB_mock; + ->willReturn(2); $this->provider = new ilQuestionSetPoolSetQuestionsProvider(); } @@ -120,7 +122,7 @@ class ilQuestionSetPoolQuestionsProviderTest extends TestCase */ private function getMethod($method) { - $class = new ReflectionClass("ilQuestionSetPoolQuestionsProvider"); + $class = new ReflectionClass("ilQuestionSetPoolSetQuestionsProvider"); $method = $class->getMethod($method); $method->setAccessible(true); -- GitLab From cde8b9bddbedd9c9aa73f183c23da5751319791d Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Mon, 22 Nov 2021 08:11:32 +0100 Subject: [PATCH 07/10] Improve test case loading --- ...seCase.php => QuestionSetPoolBaseTest.php} | 6 ++-- test/ilQuestionSetPoolTestSuite.php | 36 +++++++++++++++---- .../ilPluginTableDatabaseDataProviderTest.php | 11 +++--- ...ilQuestionSetPoolQuestionsProviderTest.php | 7 ++-- 4 files changed, 40 insertions(+), 20 deletions(-) rename test/{QuestionSetPoolTestBaseCase.php => QuestionSetPoolBaseTest.php} (88%) diff --git a/test/QuestionSetPoolTestBaseCase.php b/test/QuestionSetPoolBaseTest.php similarity index 88% rename from test/QuestionSetPoolTestBaseCase.php rename to test/QuestionSetPoolBaseTest.php index b6ec41b..f43a228 100644 --- a/test/QuestionSetPoolTestBaseCase.php +++ b/test/QuestionSetPoolBaseTest.php @@ -10,7 +10,7 @@ use PHPUnit\Framework\MockObject\MockObject; * Class TestBaseCase * @author Marvin Beym */ -class QuestionSetPoolTestBaseCase extends TestCase +class QuestionSetPoolBaseTest extends TestCase { protected Container $dic; @@ -37,8 +37,8 @@ class QuestionSetPoolTestBaseCase extends TestCase */ protected function addGlobal_ilDB() { - $mock = $this->getMockBuilder("ilDB")->getMock(); - $this->setGlobalVariable("lng", $mock); + $mock = $this->createMock(ilDBInterface::class); + $this->setGlobalVariable("ilDB", $mock); return $mock; } diff --git a/test/ilQuestionSetPoolTestSuite.php b/test/ilQuestionSetPoolTestSuite.php index 4e74ba2..a9d795c 100644 --- a/test/ilQuestionSetPoolTestSuite.php +++ b/test/ilQuestionSetPoolTestSuite.php @@ -15,14 +15,38 @@ class ilQuestionSetPoolTestSuite extends TestSuite { $suite = new self(); - require_once './Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/test/dispatcher/ilPluginDispatcherTest.php'; - $suite->addTestSuite('ilPluginDispatcherTest'); + foreach (new RegExIterator( + new RecursiveIteratorIterator( + new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS), + RecursiveIteratorIterator::LEAVES_ONLY + ), + '/BaseTest\.php$/' + ) as $file) { + /** @var SplFileInfo $file */ + require_once $file->getPathname(); + } - require_once './Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/test/providers/ilQuestionSetPoolQuestionsProviderTest.php'; - $suite->addTestSuite('ilQuestionSetPoolQuestionsProviderTest'); + foreach (new RegExIterator( + new RecursiveIteratorIterator( + new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS), + RecursiveIteratorIterator::LEAVES_ONLY + ), + '/(?getPathname(); - require_once './Customizing/global/plugins/Services/Repository/RepositoryObject/QuestionSetPool/test/providers/ilPluginTableDatabaseDataProviderTest.php'; - $suite->addTestSuite('ilPluginTableDatabaseDataProviderTest'); + $className = preg_replace('/(.*?)(\.php)/', '$1', $file->getBasename()); + if (class_exists($className)) { + $reflection = new ReflectionClass($className); + if ( + !$reflection->isAbstract() && + !$reflection->isInterface() && + $reflection->isSubclassOf(\PHPUnit\Framework\TestCase::class)) { + $suite->addTestSuite($className); + } + } + } return $suite; } diff --git a/test/providers/ilPluginTableDatabaseDataProviderTest.php b/test/providers/ilPluginTableDatabaseDataProviderTest.php index 1353d76..814adeb 100644 --- a/test/providers/ilPluginTableDatabaseDataProviderTest.php +++ b/test/providers/ilPluginTableDatabaseDataProviderTest.php @@ -9,7 +9,7 @@ use PHPUnit\Framework\TestCase; * Time: 13:33 * @author Thomas Joußen */ -class ilPluginTableDatabaseDataProviderTest extends TestCase +class ilPluginTableDatabaseDataProviderTest extends QuestionSetPoolBaseTest { /** @@ -20,14 +20,13 @@ class ilPluginTableDatabaseDataProviderTest extends TestCase public function setUp() : void { global $DIC; - $ilDB = $DIC->database(); $ilDB_mock = $this->getMockBuilder("ilDB")->getMock(); $ilDB_mock - ->expects($this->any()) - ->method("quote") - ->with(2) - ->will($this->returnValue(2)); + ->expects($this->any()) + ->method("quote") + ->with(2) + ->will($this->returnValue(2)); $ilDB = $ilDB_mock; diff --git a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php index 1028ed7..e812196 100644 --- a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php +++ b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php @@ -10,7 +10,7 @@ use ILIAS\DI\Container; * Time: 12:33 * @author Thomas Joußen */ -class ilQuestionSetPoolQuestionsProviderTest extends TestCase +class ilQuestionSetPoolQuestionsProviderTest extends QuestionSetPoolBaseTest { /** @@ -22,10 +22,7 @@ class ilQuestionSetPoolQuestionsProviderTest extends TestCase { global $DIC; $DIC = new Container(); - $ilDB_mock = $this->getMockBuilder(ilDBInterface::class)->getMock(); - $GLOBALS["ilDB"] = $ilDB_mock; - unset($DIC["ilDB"]); - $DIC["ilDB"] = $GLOBALS["ilDB"]; + $ilDB_mock = $this->addGlobal_ilDB(); $ilDB_mock ->expects($this->any()) -- GitLab From 1606280a0391d5f8d90f4dce251d0b1b2e9c4269 Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Mon, 22 Nov 2021 08:32:38 +0100 Subject: [PATCH 08/10] Fix some tests --- .../class.ilQuestionSetPoolSetQuestionsProvider.php | 2 +- test/providers/ilPluginTableDatabaseDataProviderTest.php | 7 ++----- test/providers/ilQuestionSetPoolQuestionsProviderTest.php | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/classes/providers/class.ilQuestionSetPoolSetQuestionsProvider.php b/classes/providers/class.ilQuestionSetPoolSetQuestionsProvider.php index 86997c7..f9aa046 100644 --- a/classes/providers/class.ilQuestionSetPoolSetQuestionsProvider.php +++ b/classes/providers/class.ilQuestionSetPoolSetQuestionsProvider.php @@ -61,7 +61,7 @@ class ilQuestionSetPoolSetQuestionsProvider extends ilPluginTableDatabaseDataPro { $where = array( "qpl_questions.tstamp > 0", - "rep_robj_xqsp_qs_qst.questionset_fi = " . $this->db->quote($filter["questionset_fi"], 'integer') + "rep_robj_xqsp_qs_qst.questionset_fi = " . $this->db->quote($filter["questionset_fi"] , 'integer') ); // ADD FILTER ELEMENTS diff --git a/test/providers/ilPluginTableDatabaseDataProviderTest.php b/test/providers/ilPluginTableDatabaseDataProviderTest.php index 814adeb..4395592 100644 --- a/test/providers/ilPluginTableDatabaseDataProviderTest.php +++ b/test/providers/ilPluginTableDatabaseDataProviderTest.php @@ -19,17 +19,14 @@ class ilPluginTableDatabaseDataProviderTest extends QuestionSetPoolBaseTest public function setUp() : void { - global $DIC; - - $ilDB_mock = $this->getMockBuilder("ilDB")->getMock(); + parent::setUp(); + $ilDB_mock = $this->addGlobal_ilDB(); $ilDB_mock ->expects($this->any()) ->method("quote") ->with(2) ->will($this->returnValue(2)); - $ilDB = $ilDB_mock; - $this->provider = new ilPluginTableDatabaseDataProviderMock(); } diff --git a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php index e812196..ef9d150 100644 --- a/test/providers/ilQuestionSetPoolQuestionsProviderTest.php +++ b/test/providers/ilQuestionSetPoolQuestionsProviderTest.php @@ -20,8 +20,7 @@ class ilQuestionSetPoolQuestionsProviderTest extends QuestionSetPoolBaseTest public function setUp() : void { - global $DIC; - $DIC = new Container(); + parent::setUp(); $ilDB_mock = $this->addGlobal_ilDB(); $ilDB_mock @@ -37,7 +36,7 @@ class ilQuestionSetPoolQuestionsProviderTest extends QuestionSetPoolBaseTest { $method = $this->getMethod("getSelectPart"); - $expected = "qpl_questions.*, qpl_qst_type.type_tag, qpl_qst_type.plugin, object_data.title as pool_title"; + $expected = "qpl_questions.*, qpl_qst_type.type_tag, qpl_qst_type.plugin, object_data.title as pool_title, rep_robj_xqsp_qs_qst.question_index"; $actual = $method->invokeArgs($this->provider, array()); $this->assertEquals($expected, $actual); -- GitLab From 4e88cebf3d208e2d5890145276fe84f6a9979199 Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Mon, 22 Nov 2021 11:50:47 +0100 Subject: [PATCH 09/10] Remove no longer needed GraphViz php file --- lib/GraphViz/GraphViz.php | 1031 ------------------------------------- 1 file changed, 1031 deletions(-) delete mode 100644 lib/GraphViz/GraphViz.php diff --git a/lib/GraphViz/GraphViz.php b/lib/GraphViz/GraphViz.php deleted file mode 100644 index 1e69d66..0000000 --- a/lib/GraphViz/GraphViz.php +++ /dev/null @@ -1,1031 +0,0 @@ - and - * Sebastian Bergmann . All rights reserved. - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category Image - * @package Image_GraphViz - * @author Dr. Volker G�bbels - * @author Sebastian Bergmann - * @author Karsten Dambekalns - * @author Michael Lively Jr. - * @author Philippe Jausions - * @copyright 2001-2007 Dr. Volker G�bbels and Sebastian Bergmann - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: GraphViz.php 304688 2010-10-24 05:21:17Z clockwerx $ - * @link http://pear.php.net/package/Image_GraphViz - * @link http://www.graphviz.org/ - * @since File available since Release 0.1.0 - */ - -/** - * Required PEAR classes - */ -require_once 'System.php'; - -/** - * Interface to AT&T's GraphViz tools. - * - * The GraphViz class allows for the creation of and to work with directed - * and undirected graphs and their visualization with AT&T's GraphViz tools. - * - * - * addNode( - * 'Node1', - * array( - * 'URL' => 'http://link1', - * 'label' => 'This is a label', - * 'shape' => 'box' - * ) - * ); - * - * $graph->addNode( - * 'Node2', - * array( - * 'URL' => 'http://link2', - * 'fontsize' => '14' - * ) - * ); - * - * $graph->addNode( - * 'Node3', - * array( - * 'URL' => 'http://link3', - * 'fontsize' => '20' - * ) - * ); - * - * $graph->addEdge( - * array( - * 'Node1' => 'Node2' - * ), - * array( - * 'label' => 'Edge Label' - * ) - * ); - * - * $graph->addEdge( - * array( - * 'Node1' => 'Node2' - * ), - * array( - * 'color' => 'red' - * ) - * ); - * - * $graph->image(); - * ?> - * - * - * @category Image - * @package Image_GraphViz - * @author Sebastian Bergmann - * @author Dr. Volker G�bbels - * @author Karsten Dambekalns - * @author Michael Lively Jr. - * @author Philippe Jausions - * @copyright 2001-2007 Dr. Volker G�bbels and Sebastian Bergmann - * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_GraphViz - * @link http://www.graphviz.org/ - * @since Class available since Release 0.1 - */ -class Image_GraphViz -{ - /** - * Base path to GraphViz commands - * - * @var string - */ - var $binPath = ''; - - /** - * Path to GraphViz/dot command - * - * @var string - */ - var $dotCommand = 'dot'; - - /** - * Path to GraphViz/neato command - * - * @var string - */ - var $neatoCommand = 'neato'; - - /** - * Representation of the graph - * - * @var array - */ - var $graph = array('edgesFrom' => array(), - 'nodes' => array(), - 'attributes' => array(), - 'directed' => true, - 'clusters' => array(), - 'subgraphs' => array(), - 'name' => 'G', - 'strict' => true, - ); - - /** - * Whether to return PEAR_Error instance on failures instead of FALSE - * - * @var boolean - * @access protected - */ - var $_returnFalseOnError = true; - - /** - * Constructor. - * - * Setting the name of the Graph is useful for including multiple image - * maps on one page. If not set, the graph will be named 'G'. - * - * @param boolean $directed Directed (TRUE) or undirected (FALSE) graph. - * Note: You MUST pass a boolean, and not just - * an expression that evaluates to TRUE or - * FALSE (i.e. NULL, empty string, 0 will NOT - * work) - * @param array $attributes Attributes of the graph - * @param string $name Name of the Graph - * @param boolean $strict Whether to collapse multiple edges between - * same nodes - * @param boolean $returnError Set to TRUE to return PEAR_Error instances - * on failures instead of FALSE - * - * @access public - */ - function Image_GraphViz($directed = true, $attributes = array(), - $name = 'G', $strict = true, $returnError = false) - { - $this->setDirected($directed); - $this->setAttributes($attributes); - $this->graph['name'] = $name; - $this->graph['strict'] = (boolean)$strict; - - $this->_returnFalseOnError = !$returnError; - } - - /** - * Outputs image of the graph in a given format - * - * This methods send HTTP headers - * - * @param string $format Format of the output image. This may be one - * of the formats supported by GraphViz. - * @param string $command "dot" or "neato" - * - * @return boolean TRUE on success, FALSE or PEAR_Error otherwise - * @access public - */ - function image($format = 'svg', $command = null) - { - $file = $this->saveParsedGraph(); - if (!$file || PEAR::isError($file)) { - return $file; - } - - $outputfile = $file . '.' . $format; - - $rendered = $this->renderDotFile($file, $outputfile, $format, - $command); - if ($rendered !== true) { - return $rendered; - } - - $sendContentLengthHeader = true; - - switch (strtolower($format)) { - case 'gif': - case 'png': - case 'bmp': - case 'jpeg': - case 'tiff': - header('Content-Type: image/' . $format); - break; - - case 'tif': - header('Content-Type: image/tiff'); - break; - - case 'jpg': - header('Content-Type: image/jpeg'); - break; - - case 'ico': - header('Content-Type: image/x-icon'); - break; - - case 'wbmp': - header('Content-Type: image/vnd.wap.wbmp'); - break; - - case 'pdf': - header('Content-Type: application/pdf'); - break; - - case 'mif': - header('Content-Type: application/vnd.mif'); - break; - - case 'vrml': - header('Content-Type: application/x-vrml'); - break; - - case 'svg': - header('Content-Type: image/svg+xml'); - break; - - case 'plain': - case 'plain-ext': - header('Content-Type: text/plain'); - break; - - default: - header('Content-Type: application/octet-stream'); - $sendContentLengthHeader = false; - } - - if ($sendContentLengthHeader) { - header('Content-Length: ' . filesize($outputfile)); - } - - $return = true; - if (readfile($outputfile) === false) { - $return = false; - } - @unlink($outputfile); - - return $return; - } - - /** - * Returns image (data) of the graph in a given format. - * - * @param string $format Format of the output image. This may be one - * of the formats supported by GraphViz. - * @param string $command "dot" or "neato" - * - * @return string The image (data) created by GraphViz, FALSE or PEAR_Error - * on error - * @access public - * @since Method available since Release 1.1.0 - */ - function fetch($format = 'svg', $command = null) - { - $file = $this->saveParsedGraph(); - if (!$file || PEAR::isError($file)) { - return $file; - } - - $outputfile = $file . '.' . $format; - - $rendered = $this->renderDotFile($file, $outputfile, $format, - $command); - if ($rendered !== true) { - return $rendered; - } - - @unlink($file); - - $fp = fopen($outputfile, 'rb'); - - if (!$fp) { - if ($this->_returnFalseOnError) { - return false; - } - $error = PEAR::raiseError('Could not read rendered file'); - return $error; - } - - $data = fread($fp, filesize($outputfile)); - fclose($fp); - @unlink($outputfile); - - return $data; - } - - /** - * Renders a given dot file into a given format. - * - * @param string $dotfile The absolute path of the dot file to use. - * @param string $outputfile The absolute path of the file to save to. - * @param string $format Format of the output image. This may be one - * of the formats supported by GraphViz. - * @param string $command "dot" or "neato" - * - * @return boolean TRUE if the file was saved, FALSE or PEAR_Error - * otherwise. - * @access public - */ - function renderDotFile($dotfile, $outputfile, $format = 'svg', - $command = null) - { - if (!file_exists($dotfile)) { - if ($this->_returnFalseOnError) { - return false; - } - $error = PEAR::raiseError('Could not find dot file'); - return $error; - } - - $oldmtime = file_exists($outputfile) ? filemtime($outputfile) : 0; - - switch ($command) { - case 'dot': - case 'neato': - break; - default: - $command = $this->graph['directed'] ? 'dot' : 'neato'; - } - $command_orig = $command; - - $command = $this->binPath.(($command == 'dot') ? $this->dotCommand - : $this->neatoCommand); - - $command .= ' -T'.escapeshellarg($format) - .' -o'.escapeshellarg($outputfile) - .' '.escapeshellarg($dotfile) - .' 2>&1'; - exec($command, $msg, $return_val); - - clearstatcache(); - if (file_exists($outputfile) && filemtime($outputfile) > $oldmtime - && $return_val == 0) { - return true; - } elseif ($this->_returnFalseOnError) { - return false; - } - $error = PEAR::raiseError($command_orig.' command failed: ' - .implode("\n", $msg)); - return $error; - } - - /** - * Adds a cluster to the graph. - * - * A cluster is a subgraph with a rectangle around it. - * - * @param string $id ID. - * @param array $title Title. - * @param array $attributes Attributes of the cluster. - * @param string $group ID of group to nest cluster into - * - * @return void - * @access public - * @see addSubgraph() - */ - function addCluster($id, $title, $attributes = array(), $group = 'default') - { - $this->graph['clusters'][$id]['title'] = $title; - $this->graph['clusters'][$id]['attributes'] = $attributes; - $this->graph['clusters'][$id]['embedIn'] = $group; - } - - /** - * Adds a subgraph to the graph. - * - * @param string $id ID. - * @param array $title Title. - * @param array $attributes Attributes of the cluster. - * @param string $group ID of group to nest subgraph into - * - * @return void - * @access public - */ - function addSubgraph($id, $title, $attributes = array(), $group = 'default') - { - $this->graph['subgraphs'][$id]['title'] = $title; - $this->graph['subgraphs'][$id]['attributes'] = $attributes; - $this->graph['subgraphs'][$id]['embedIn'] = $group; - } - - /** - * Adds a note to the graph. - * - * @param string $name Name of the node. - * @param array $attributes Attributes of the node. - * @param string $group Group of the node. - * - * @return void - * @access public - */ - function addNode($name, $attributes = array(), $group = 'default') - { - $this->graph['nodes'][$group][$name] = $attributes; - } - - /** - * Removes a node from the graph. - * - * This method doesn't remove edges associated with the node. - * - * @param string $name Name of the node to be removed. - * @param string $group Group of the node. - * - * @return void - * @access public - */ - function removeNode($name, $group = 'default') - { - if (isset($this->graph['nodes'][$group][$name])) { - unset($this->graph['nodes'][$group][$name]); - } - } - - /** - * Adds an edge to the graph. - * - * Examples: - * - * $g->addEdge(array('node1' => 'node2')); - * $attr = array( - * 'label' => '+1', - * 'style' => 'dashed', - * ); - * $g->addEdge(array('node3' => 'node4'), $attr); - * - * // With port specification - * $g->addEdge(array('node5' => 'node6'), $attr, array('node6' => 'portA')); - * $g->addEdge(array('node7' => 'node8'), null, array('node7' => 'portC', - * 'node8' => 'portD')); - * - * - * @param array $edge Start => End node of the edge. - * @param array $attributes Attributes of the edge. - * @param array $ports Start node => port, End node => port - * - * @return integer an edge ID that can be used with {@link removeEdge()} - * @access public - */ - function addEdge($edge, $attributes = array(), $ports = array()) - { - if (!is_array($edge)) { - return; - } - - $from = key($edge); - $to = $edge[$from]; - $info = array(); - - if (is_array($ports)) { - if (array_key_exists($from, $ports)) { - $info['portFrom'] = $ports[$from]; - } - - if (array_key_exists($to, $ports)) { - $info['portTo'] = $ports[$to]; - } - } - - if (is_array($attributes)) { - $info['attributes'] = $attributes; - } - - if (!empty($this->graph['strict'])) { - if (!isset($this->graph['edgesFrom'][$from][$to][0])) { - $this->graph['edgesFrom'][$from][$to][0] = $info; - } else { - $this->graph['edgesFrom'][$from][$to][0] = array_merge($this->graph['edgesFrom'][$from][$to][0], $info); - } - } else { - $this->graph['edgesFrom'][$from][$to][] = $info; - } - - return count($this->graph['edgesFrom'][$from][$to]) - 1; - } - - /** - * Removes an edge from the graph. - * - * @param array $edge Start and End node of the edge to be removed. - * @param integer $id specific edge ID (only usefull when multiple edges - * exist between the same 2 nodes) - * - * @return void - * @access public - */ - function removeEdge($edge, $id = null) - { - if (!is_array($edge)) { - return; - } - - $from = key($edge); - $to = $edge[$from]; - - if (!is_null($id)) { - if (isset($this->graph['edgesFrom'][$from][$to][$id])) { - unset($this->graph['edgesFrom'][$from][$to][$id]); - - if (count($this->graph['edgesFrom'][$from][$to]) == 0) { - unset($this->graph['edgesFrom'][$from][$to]); - } - } - } elseif (isset($this->graph['edgesFrom'][$from][$to])) { - unset($this->graph['edgesFrom'][$from][$to]); - } - } - - /** - * Adds attributes to the graph. - * - * @param array $attributes Attributes to be added to the graph. - * - * @return void - * @access public - */ - function addAttributes($attributes) - { - if (is_array($attributes)) { - $this->graph['attributes'] = array_merge($this->graph['attributes'], $attributes); - } - } - - /** - * Sets attributes of the graph. - * - * @param array $attributes Attributes to be set for the graph. - * - * @return void - * @access public - */ - function setAttributes($attributes) - { - if (is_array($attributes)) { - $this->graph['attributes'] = $attributes; - } - } - - /** - * Escapes an (attribute) array - * - * Detects if an attribute is , contains double-quotes, etc... - * - * @param array $input input to escape - * - * @return array input escaped - * @access protected - */ - function _escapeArray($input) - { - $output = array(); - - foreach ((array)$input as $k => $v) { - switch ($k) { - case 'label': - case 'headlabel': - case 'taillabel': - $v = $this->_escape($v, true); - break; - default: - $v = $this->_escape($v); - $k = $this->_escape($k); - } - - $output[$k] = $v; - } - - return $output; - } - - /** - * Returns a safe "ID" in DOT syntax - * - * @param string $input string to use as "ID" - * @param boolean $html whether to attempt detecting HTML-like content - * - * @return string - * @access protected - */ - function _escape($input, $html = false) - { - switch (strtolower($input)) { - case 'node': - case 'edge': - case 'graph': - case 'digraph': - case 'subgraph': - case 'strict': - return '"'.$input.'"'; - } - - if (is_bool($input)) { - return ($input) ? 'true' : 'false'; - } - - if ($html && (strpos($input, '') !== false)) { - return '<'.$input.'>'; - } - - if (preg_match('/^([a-z_][a-z_0-9]*|-?(\.[0-9]+|[0-9]+(\.[0-9]*)?))$/i', - $input)) { - return $input; - } - - return '"'.str_replace(array("\r\n", "\n", "\r", '"'), - array('\n', '\n', '\n', '\"'), $input).'"'; - } - - /** - * Sets directed/undirected flag for the graph. - * - * Note: You MUST pass a boolean, and not just an expression that evaluates - * to TRUE or FALSE (i.e. NULL, empty string, 0 will not work) - * - * @param boolean $directed Directed (TRUE) or undirected (FALSE) graph. - * - * @return void - * @access public - */ - function setDirected($directed) - { - if (is_bool($directed)) { - $this->graph['directed'] = $directed; - } - } - - /** - * Loads a graph from a file in Image_GraphViz format - * - * @param string $file File to load graph from. - * - * @return void - * @access public - */ - function load($file) - { - if ($serializedGraph = implode('', @file($file))) { - $g = unserialize($serializedGraph); - - if (!is_array($g)) { - return; - } - - // Convert old storage format to new one - $defaults = array('edgesFrom' => array(), - 'nodes' => array(), - 'attributes' => array(), - 'directed' => true, - 'clusters' => array(), - 'subgraphs' => array(), - 'name' => 'G', - 'strict' => true, - ); - - $this->graph = array_merge($defaults, $g); - - if (isset($this->graph['edges'])) { - foreach ($this->graph['edges'] as $id => $nodes) { - $attr = (isset($this->graph['edgeAttributes'][$id])) - ? $this->graph['edgeAttributes'][$id] - : array(); - - $this->addEdge($nodes, $attr); - } - - unset($this->graph['edges']); - unset($this->graph['edgeAttributes']); - } - } - } - - /** - * Save graph to file in Image_GraphViz format - * - * This saves the serialized version of the instance, not the - * rendered graph. - * - * @param string $file File to save the graph to. - * - * @return string File the graph was saved to, FALSE or PEAR_Error on - * failure. - * @access public - */ - function save($file = '') - { - $serializedGraph = serialize($this->graph); - - if (empty($file)) { - $file = System::mktemp('graph_'); - } - - if ($fp = @fopen($file, 'wb')) { - @fputs($fp, $serializedGraph); - @fclose($fp); - - return $file; - } - - if ($this->_returnFalseOnError) { - return false; - } - $error = PEAR::raiseError('Could not save serialized graph instance'); - return $error; - } - - /** - * Returns a list of sub-groups for a given parent group - * - * @param string $parent Group ID - * - * @return array list of group IDs - * @access protected - */ - function _getSubgraphs($parent) - { - $subgraphs = array(); - foreach ($this->graph['clusters'] as $id => $info) { - if ($info['embedIn'] === $parent) { - $subgraphs[] = $id; - } - } - foreach ($this->graph['subgraphs'] as $id => $info) { - if ($info['embedIn'] === $parent) { - $subgraphs[] = $id; - } - } - return $subgraphs; - } - - /** - * Returns a list of cluster/subgraph IDs - * - * @return array - * @access protected - */ - function _getGroups() - { - $groups = array_merge(array_keys($this->graph['clusters']), - array_keys($this->graph['subgraphs'])); - return array_unique($groups); - } - - /** - * Returns a list of top groups - * - * @return array - * @access protected - */ - function _getTopGraphs() - { - $top = array(); - $groups = $this->_getGroups(); - - foreach ($groups as $id) { - $isTop = ($id === 'default'); - if (isset($this->graph['clusters'][$id]) - && $this->graph['clusters'][$id]['embedIn'] === 'default') { - $isTop = true; - } - if (isset($this->graph['subgraphs'][$id]) - && $this->graph['subgraphs'][$id]['embedIn'] === 'default') { - $isTop = true; - } - if ($isTop) { - $top[] = $id; - } - } - - return array_unique($top); - } - - /** - * Parses the graph into GraphViz markup. - * - * @return string GraphViz markup - * @access public - */ - function parse() - { - $parsedGraph = (empty($this->graph['strict'])) ? '' : 'strict '; - $parsedGraph .= (empty($this->graph['directed'])) ? 'graph ' : 'digraph '; - $parsedGraph .= $this->_escape($this->graph['name'])." {\n"; - - $indent = ' '; - - $attr = $this->_escapeArray($this->graph['attributes']); - - foreach ($attr as $key => $value) { - $parsedGraph .= $indent.$key.'='.$value.";\n"; - } - - $groups = $this->_getGroups(); - foreach ($this->graph['nodes'] as $group => $nodes) { - if (!in_array($group, $groups)) { - $parsedGraph .= $this->_nodes($nodes, $indent); - } - } - $tops = $this->_getTopGraphs(); - foreach ($tops as $group) { - $parsedGraph .= $this->_subgraph($group, $indent); - } - - if (!empty($this->graph['directed'])) { - $separator = ' -> '; - } else { - $separator = ' -- '; - } - - foreach ($this->graph['edgesFrom'] as $from => $toNodes) { - $from = $this->_escape($from); - - foreach ($toNodes as $to => $edges) { - $to = $this->_escape($to); - - foreach ($edges as $info) { - $f = $from; - $t = $to; - - if (array_key_exists('portFrom', $info)) { - $f .= ':'.$this->_escape($info['portFrom']); - } - - if (array_key_exists('portTo', $info)) { - $t .= ':'.$this->_escape($info['portTo']); - } - - $parsedGraph .= $indent.$f.$separator.$t; - - if (!empty($info['attributes'])) { - $attributeList = array(); - - foreach ($this->_escapeArray($info['attributes']) as $key => $value) { - switch ($key) { - case 'lhead': - case 'ltail': - if (strncasecmp($value, 'cluster', 7)) { - $value = 'cluster_'.$value; - } - break; - } - $attributeList[] = $key.'='.$value; - } - - $parsedGraph .= ' [ '.implode(',', $attributeList).' ]'; - } - - $parsedGraph .= ";\n"; - } - } - } - - return $parsedGraph . "}\n"; - } - - /** - * Output nodes - * - * @param array $nodes nodes list - * @param string $indent space indentation - * - * @return string output - * @access protected - */ - function _nodes($nodes, $indent) - { - $parsedGraph = ''; - foreach ($nodes as $node => $attributes) { - $parsedGraph .= $indent.$this->_escape($node); - - $attributeList = array(); - - foreach ($this->_escapeArray($attributes) as $key => $value) { - $attributeList[] = $key.'='.$value; - } - - if (!empty($attributeList)) { - $parsedGraph .= ' [ '.implode(',', $attributeList).' ]'; - } - - $parsedGraph .= ";\n"; - } - return $parsedGraph; - } - - /** - * Generates output for a group - * - * @return string output - * @access protected - */ - function _subgraph($group, &$indent) - { - $parsedGraph = ''; - $nodes = $this->graph['nodes'][$group]; - - if ($group !== 'default') { - $type = null; - $_group = $this->_escape($group); - - if (isset($this->graph['clusters'][$group])) { - $type = 'clusters'; - if (strncasecmp($group, 'cluster', 7)) { - $_group = $this->_escape('cluster_'.$group); - } - } elseif (isset($this->graph['subgraphs'][$group])) { - $type = 'subgraphs'; - } - $parsedGraph .= $indent.'subgraph '.$_group." {\n"; - - $indent .= ' '; - - if ($type !== null && isset($this->graph[$type][$group])) { - $cluster = $this->graph[$type][$group]; - $_attr = $this->_escapeArray($cluster['attributes']); - - $attr = array(); - foreach ($_attr as $key => $value) { - $attr[] = $key.'='.$value; - } - - if (strlen($cluster['title'])) { - $attr[] = 'label=' - .$this->_escape($cluster['title'], true); - } - - if ($attr) { - $parsedGraph .= $indent.'graph [ '.implode(',', $attr) - ." ];\n"; - } - } - } - - $parsedGraph .= $this->_nodes($nodes, $indent); - - foreach ($this->_getSubgraphs($group) as $_group) { - $parsedGraph .= $this->_subgraph($_group, $indent); - } - - if ($group !== 'default') { - $indent = substr($indent, 0, -4); - - $parsedGraph .= $indent."}\n"; - } - - return $parsedGraph; - } - - /** - * Saves GraphViz markup to file (in DOT language) - * - * @param string $file File to write the GraphViz markup to. - * - * @return string File to which the GraphViz markup was written, FALSE or - * or PEAR_Error on failure. - * @access public - */ - function saveParsedGraph($file = '') - { - $parsedGraph = $this->parse(); - - if (!empty($parsedGraph)) { - if (empty($file)) { - $file = System::mktemp('graph_'); - } - - if ($fp = @fopen($file, 'wb')) { - @fputs($fp, $parsedGraph); - @fclose($fp); - - return $file; - } - } - - if ($this->_returnFalseOnError) { - return false; - } - $error = PEAR::raiseError('Could not save graph'); - return $error; - } -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * End: - */ -?> \ No newline at end of file -- GitLab From 739f0cdc42684fa6599f4cc58d27936ff081c37d Mon Sep 17 00:00:00 2001 From: Marvin Beym Date: Thu, 25 Nov 2021 15:47:42 +0100 Subject: [PATCH 10/10] Update ILIAS version numbers in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ccf1891..0ddb0a0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # ILIAS QuestionSetPool -* For ILIAS versions: 6.0 - 6.999 +* For ILIAS versions: 7.0 - 7.999 ## Installation Instructions 1. Create the plugin path: -- GitLab