-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
1,770 additions
and
926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace oat\taoQtiItem\install\scripts; | ||
|
||
use oat\oatbox\service\ServiceManager; | ||
use oat\taoQtiItem\model\ValidationService; | ||
|
||
class addValidationSettings extends \common_ext_action_InstallAction | ||
{ | ||
public function __invoke($params) | ||
{ | ||
|
||
$this->setServiceLocator(ServiceManager::getServiceManager()); | ||
$serviceManager = $this->getServiceManager(); | ||
|
||
$ext = \common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiItem'); | ||
if($ext->hasConfig('contentValidation')){ | ||
$ext->unsetConfig('contentValidation'); | ||
} | ||
|
||
if($ext->hasConfig('manifestValidation')){ | ||
$ext->unsetConfig('manifestValidation'); | ||
} | ||
|
||
//Set Validation service | ||
$validationService = new ValidationService(); | ||
$validationService->setServiceManager($serviceManager); | ||
$serviceManager->register(ValidationService::SERVICE_ID, $validationService); | ||
|
||
return new \common_report_Report(\common_report_Report::TYPE_SUCCESS, 'Validation service has been successfully set up'); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.