isVersion('0.0.0')) { $registry = $this->getServiceManager()->get(ItemPreviewerService::SERVICE_ID); $registry->registerAdapter( DynamicModule::fromArray( [ 'id' => 'qtiItem', 'name' => 'QTI Item Previewer', 'module' => 'taoQtiTestPreviewer/previewer/adapter/item/qtiItem', 'bundle' => 'taoQtiTestPreviewer/loader/qtiPreviewer.min', 'description' => 'QTI implementation of the item previewer', 'category' => 'previewer', 'active' => true, 'tags' => [ 'core', 'qti', 'previewer' ] ] ) ); $service = $this->getServiceManager()->get(ResultsViewerService::SERVICE_ID); $service->setDefaultItemType('qtiItem'); $this->getServiceManager()->register(ResultsViewerService::SERVICE_ID, $service); $this->setVersion('0.1.0'); } $this->skip('0.1.0', '0.1.1'); if ($this->isVersion('0.1.1')) { AclProxy::revokeRule(new AccessRule( AccessRule::GRANT, 'http://www.tao.lu/Ontologies/TAOTest.rdf#TaoQtiManagerRole', ['ext' => 'taoQtiTestPreviewer', 'mod' => 'Previewer'] )); AclProxy::revokeRule(new AccessRule( AccessRule::GRANT, 'http://www.tao.lu/Ontologies/TAOTest.rdf#TestsManagerRole', ['ext' => 'taoQtiTestPreviewer', 'mod' => 'Previewer'] )); AclProxy::applyRule(new AccessRule( AccessRule::GRANT, 'http://www.tao.lu/Ontologies/TAOTest.rdf#TaoQtiTestPreviewerRole', ['ext' => 'taoQtiTestPreviewer', 'mod' => 'Previewer'] )); OntologyUpdater::syncModels(); $this->setVersion('0.2.0'); } $this->skip('0.2.0', '2.14.1'); //Updater files are deprecated. Please use migrations. //See: https://github.com/oat-sa/generis/wiki/Tao-Update-Process $this->setVersion($this->getExtension()->getManifest()->getVersion()); } }