Skip to content

Commit

Permalink
Merge branch 'release-3.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Apr 15, 2021
2 parents fb54f7f + 17d0165 commit 4a0e44e
Show file tree
Hide file tree
Showing 39 changed files with 918 additions and 246 deletions.
47 changes: 47 additions & 0 deletions migrations/Version202103160949554106_pciSamples.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

declare(strict_types=1);

namespace oat\pciSamples\migrations;

use Doctrine\DBAL\Schema\Schema;
use oat\tao\scripts\tools\migrations\AbstractMigration;
use Doctrine\Migrations\Exception\IrreversibleMigration;
use oat\qtiItemPci\model\PciModel;
use oat\pciSamples\scripts\install\RegisterPciTextReader;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version202103160949554106_pciSamples extends AbstractMigration
{

public function getDescription(): string
{
return 'Convert Text Reader interaction to IMS compliant';
}

public function up(Schema $schema): void
{
$registry = (new PciModel())->getRegistry();
if ($registry->has('textReaderInteraction')) {
/** @noinspection PhpUnhandledExceptionInspection */
$registry->removeAllVersions('textReaderInteraction');
}

$this->addReport(
$this->propagate(
new RegisterPciTextReader()
)(
['1.0.0']
)
);
}

public function down(Schema $schema): void
{
throw new IrreversibleMigration(
'In order to undo this migration, please revert the client-side changes and run ' . RegisterPciTextReader::class
);
}
}
4 changes: 2 additions & 2 deletions scripts/install/RegisterPciTextReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2016 (original work) Open Assessment Technologies SA;
* Copyright (c) 2016-2021 (original work) Open Assessment Technologies SA;
*
* */

Expand All @@ -26,6 +26,6 @@ class RegisterPciTextReader extends RegisterPortableElement
{
protected function getSourceDirectory(){
$viewDir = \common_ext_ExtensionsManager::singleton()->getExtensionById('pciSamples')->getConstant('DIR_VIEWS');
return $viewDir.implode(DIRECTORY_SEPARATOR, ['js', 'pciCreator', 'dev', 'textReaderInteraction']);
return $viewDir.implode(DIRECTORY_SEPARATOR, ['js', 'pciCreator', 'ims', 'textReaderInteraction']);
}
}
6 changes: 3 additions & 3 deletions views/build/grunt/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ module.exports = function (grunt) {
options : {},
files : {}
};
sass.pcisamples.files[root + 'js/pciCreator/dev/textReaderInteraction/creator/css/textReaderInteraction.css'] = root + 'js/pciCreator/dev/textReaderInteraction/creator/scss/textReaderInteraction.scss';
sass.pcisamples.files[root + 'js/pciCreator/dev/textReaderInteraction/runtime/css/textReaderInteraction.css'] = root + 'js/pciCreator/dev/textReaderInteraction/runtime/scss/textReaderInteraction.scss';
sass.pcisamples.files[root + 'js/pciCreator/ims/textReaderInteraction/creator/css/textReaderInteraction.css'] = root + 'js/pciCreator/ims/textReaderInteraction/creator/scss/textReaderInteraction.scss';
sass.pcisamples.files[root + 'js/pciCreator/ims/textReaderInteraction/runtime/css/textReaderInteraction.css'] = root + 'js/pciCreator/ims/textReaderInteraction/runtime/scss/textReaderInteraction.scss';

watch.pcisamplessass = {
files : [
root + 'scss/**/*.scss',
root + 'js/pciCreator/dev/**/*.scss'
root + 'js/pciCreator/ims/**/*.scss'
],
tasks : ['sass:pcisamples', 'notify:pcisamplessass'],
options : {
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4a0e44e

Please sign in to comment.