diff --git a/modules/issue_tracker/php/issuerowprovisioner.class.inc b/modules/issue_tracker/php/issuerowprovisioner.class.inc index f4c1ee1e6a2..6e1b0403d86 100644 --- a/modules/issue_tracker/php/issuerowprovisioner.class.inc +++ b/modules/issue_tracker/php/issuerowprovisioner.class.inc @@ -106,7 +106,7 @@ class IssueRowProvisioner extends \LORIS\Data\Provisioners\DBRowProvisioner $module = new \NullModule($this->lorisinstance); if (!empty($mname)) { if (!isset($modules[$mname])) { - $modules[$mname] = \Module::factory($this->lorisinstance, $mname); + $modules[$mname] = $this->lorisinstance->getModule($mname); } $module = &$modules[$mname]; } diff --git a/modules/module_manager/php/modulerow.class.inc b/modules/module_manager/php/modulerow.class.inc index b58140f41b0..c2ffde552b9 100644 --- a/modules/module_manager/php/modulerow.class.inc +++ b/modules/module_manager/php/modulerow.class.inc @@ -46,7 +46,7 @@ class ModuleRow implements \LORIS\Data\DataInstance public function __construct(\LORIS\LorisInstance $loris, array $row) { $this->lorisinstance = $loris; - $this->Module = \Module::factory($loris, $row['name']); + $this->Module = $loris->getModule($row['name']); $this->Active = $row['active']; } diff --git a/php/libraries/NDB_BVL_Instrument.class.inc b/php/libraries/NDB_BVL_Instrument.class.inc index cef149c5d41..75d27ff58b0 100644 --- a/php/libraries/NDB_BVL_Instrument.class.inc +++ b/php/libraries/NDB_BVL_Instrument.class.inc @@ -253,7 +253,7 @@ abstract class NDB_BVL_Instrument extends NDB_Page // since it isn't a real module, but it's required for the page // constructor. $loris, - Module::factory($loris, "instruments"), + $loris->getModule("instruments"), $page, $commentID, $commentID, @@ -272,7 +272,7 @@ abstract class NDB_BVL_Instrument extends NDB_Page // Now go ahead and instantiate it $obj = new $class( $loris, - Module::factory($loris, "instruments"), + $loris->getModule("instruments"), $page, $commentID, $commentID, diff --git a/src/Router/BaseRouter.php b/src/Router/BaseRouter.php index 4528fd9674a..ea17b8d8b9f 100644 --- a/src/Router/BaseRouter.php +++ b/src/Router/BaseRouter.php @@ -120,7 +120,7 @@ public function handle(ServerRequestInterface $request) : ResponseInterface $factory->setBaseURL($baseurl); - $module = \Module::factory($this->lorisinstance, $modulename); + $module = $this->lorisinstance->getModule($modulename); $mr = new ModuleRouter($module); $request = $request->withURI($suburi); return $ehandler->process($request, $mr); @@ -136,7 +136,7 @@ public function handle(ServerRequestInterface $request) : ResponseInterface $request = $request ->withAttribute("baseurl", $baseurl->__toString()) ->withAttribute("CandID", $components[0]); - $module = \Module::factory($this->lorisinstance, "timepoint_list"); + $module = $this->lorisinstance->getModule("timepoint_list"); $mr = new ModuleRouter($module); return $ehandler->process($request, $mr); }