From 1a18f89e34f5d0c8c4122eb167ce345ee9bd500f Mon Sep 17 00:00:00 2001 From: Stella Lie Date: Mon, 4 Jul 2016 18:08:35 +1000 Subject: [PATCH] Fixed the composer json to now have fixed version of the QTI lib --- composer.json | 2 +- composer.lock | 129 +++++++++--------- .../QtiV2/Out/QuestionTypes/HotspotMapper.php | 3 +- .../In/Fixtures/HotspotInteractionBuilder.php | 4 +- .../Interactions/HotspotInteractionTest.php | 2 +- 5 files changed, 69 insertions(+), 71 deletions(-) diff --git a/composer.json b/composer.json index 505a1a54..db03b02e 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "symfony/dependency-injection": "v2.6.8", "jms/aop-bundle": "1.0.1", "jms/di-extra-bundle": "1.5.0", - "qtism/qtism": "dev-master" + "qtism/qtism": "3.2.3" }, "require-dev": { "phpunit/phpunit": "4.8.4" diff --git a/composer.lock b/composer.lock index 9177111e..011a34d3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "d57cc5b348062cc7c191d6da6c89ab06", - "content-hash": "35810f8459dbbeca39d36a684a97a584", + "hash": "73ec6819cd6a6ab284fc9ffecb2db34d", + "content-hash": "bcb2cf4e09c0d4b326ae9d44c24cd120", "packages": [ { "name": "doctrine/annotations", @@ -469,16 +469,16 @@ }, { "name": "qtism/qtism", - "version": "dev-master", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/oat-sa/qti-sdk.git", - "reference": "0e55ce02f501ec923aa1f825bbc1204e440746b2" + "reference": "ba25bee79f055c762716c632c1b7e5a85c9b3013" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/oat-sa/qti-sdk/zipball/0e55ce02f501ec923aa1f825bbc1204e440746b2", - "reference": "0e55ce02f501ec923aa1f825bbc1204e440746b2", + "url": "https://api.github.com/repos/oat-sa/qti-sdk/zipball/ba25bee79f055c762716c632c1b7e5a85c9b3013", + "reference": "ba25bee79f055c762716c632c1b7e5a85c9b3013", "shasum": "" }, "require": { @@ -530,7 +530,7 @@ "QTI", "TAO" ], - "time": "2016-06-22 15:50:45" + "time": "2016-05-09 10:51:41" }, { "name": "symfony/config", @@ -585,16 +585,16 @@ }, { "name": "symfony/debug", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "c7d6d8a599e4609a1abc76351d6234a2997e16ed" + "reference": "2477199ad1dd1c43fe18a84d7907fffa025eff10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/c7d6d8a599e4609a1abc76351d6234a2997e16ed", - "reference": "c7d6d8a599e4609a1abc76351d6234a2997e16ed", + "url": "https://api.github.com/repos/symfony/debug/zipball/2477199ad1dd1c43fe18a84d7907fffa025eff10", + "reference": "2477199ad1dd1c43fe18a84d7907fffa025eff10", "shasum": "" }, "require": { @@ -638,7 +638,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-06-06 15:06:25" + "time": "2016-06-29 05:29:29" }, { "name": "symfony/dependency-injection", @@ -703,16 +703,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "2a6b8713f8bdb582058cfda463527f195b066110" + "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2a6b8713f8bdb582058cfda463527f195b066110", - "reference": "2a6b8713f8bdb582058cfda463527f195b066110", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b180b70439dca70049b6b9b7e21d75e6e5d7aca9", + "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9", "shasum": "" }, "require": { @@ -759,20 +759,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:11:27" + "time": "2016-06-29 05:29:29" }, { "name": "symfony/filesystem", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "dee379131dceed90a429e951546b33edfe7dccbb" + "reference": "7258ddd6f987053f21fa43d03430580ba54e6096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/dee379131dceed90a429e951546b33edfe7dccbb", - "reference": "dee379131dceed90a429e951546b33edfe7dccbb", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7258ddd6f987053f21fa43d03430580ba54e6096", + "reference": "7258ddd6f987053f21fa43d03430580ba54e6096", "shasum": "" }, "require": { @@ -808,7 +808,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-04-12 18:01:21" + "time": "2016-06-29 05:31:50" }, { "name": "symfony/finder", @@ -945,16 +945,16 @@ }, { "name": "symfony/http-foundation", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "744dae663ffcfa21d8a111fb63541954199acbb2" + "reference": "7a55440a2bebd37b8bd06f99f5def1ddf0aa9249" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/744dae663ffcfa21d8a111fb63541954199acbb2", - "reference": "744dae663ffcfa21d8a111fb63541954199acbb2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7a55440a2bebd37b8bd06f99f5def1ddf0aa9249", + "reference": "7a55440a2bebd37b8bd06f99f5def1ddf0aa9249", "shasum": "" }, "require": { @@ -996,7 +996,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:11:27" + "time": "2016-06-29 07:02:14" }, { "name": "symfony/http-kernel", @@ -1418,16 +1418,16 @@ }, { "name": "symfony/process", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c" + "reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/115347d00c342198cdc52a7bd8bc15b5ab43500c", - "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c", + "url": "https://api.github.com/repos/symfony/process/zipball/89f33c16796415ccfd8bb3cf8d520cbb79899bfe", + "reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe", "shasum": "" }, "require": { @@ -1463,7 +1463,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:11:27" + "time": "2016-06-29 05:29:29" }, { "name": "symfony/routing", @@ -1536,16 +1536,16 @@ }, { "name": "symfony/security-core", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "2e9c6248735ef5a6746299a611346283dbcfd041" + "reference": "885f98ee7c4d136db2672a4f02ccb412f15d8921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/2e9c6248735ef5a6746299a611346283dbcfd041", - "reference": "2e9c6248735ef5a6746299a611346283dbcfd041", + "url": "https://api.github.com/repos/symfony/security-core/zipball/885f98ee7c4d136db2672a4f02ccb412f15d8921", + "reference": "885f98ee7c4d136db2672a4f02ccb412f15d8921", "shasum": "" }, "require": { @@ -1600,11 +1600,11 @@ ], "description": "Symfony Security Component - Core Library", "homepage": "https://symfony.com", - "time": "2016-05-09 19:34:47" + "time": "2016-06-29 05:29:29" }, { "name": "symfony/security-csrf", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/security-csrf.git", @@ -1662,16 +1662,16 @@ }, { "name": "symfony/stopwatch", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5e628055488bcc42dbace3af65be435d094e37e4" + "reference": "35bae476693150728b0eb51647faac82faf9aaca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5e628055488bcc42dbace3af65be435d094e37e4", - "reference": "5e628055488bcc42dbace3af65be435d094e37e4", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/35bae476693150728b0eb51647faac82faf9aaca", + "reference": "35bae476693150728b0eb51647faac82faf9aaca", "shasum": "" }, "require": { @@ -1707,11 +1707,11 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:11:27" + "time": "2016-06-29 05:29:29" }, { "name": "symfony/templating", - "version": "v2.8.7", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/templating.git", @@ -2144,22 +2144,22 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61" + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", - "reference": "45ada3e3fd09789fbfbd6d65b3f0901f0030dc61", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", "shasum": "" }, "require": { "php": ">=5.5", "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.1.5", + "phpdocumentor/type-resolver": "^0.2.0", "webmozart/assert": "^1.0" }, "require-dev": { @@ -2185,20 +2185,20 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-06-06 06:44:13" + "time": "2016-06-10 09:48:41" }, { "name": "phpdocumentor/type-resolver", - "version": "0.1.8", + "version": "0.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9891754231e55d42f0d16988ffb799af39f31a12" + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9891754231e55d42f0d16988ffb799af39f31a12", - "reference": "9891754231e55d42f0d16988ffb799af39f31a12", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", "shasum": "" }, "require": { @@ -2207,7 +2207,7 @@ }, "require-dev": { "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2" + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { @@ -2232,7 +2232,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-03-28 10:02:29" + "time": "2016-06-10 07:14:17" }, { "name": "phpspec/prophecy", @@ -2835,16 +2835,16 @@ }, { "name": "sebastian/exporter", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -2852,12 +2852,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -2897,7 +2898,7 @@ "export", "exporter" ], - "time": "2015-06-21 07:55:53" + "time": "2016-06-17 09:04:28" }, { "name": "sebastian/global-state", @@ -3090,9 +3091,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "qtism/qtism": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Processors/QtiV2/Out/QuestionTypes/HotspotMapper.php b/src/Processors/QtiV2/Out/QuestionTypes/HotspotMapper.php index cc67e64f..b09c4ab0 100644 --- a/src/Processors/QtiV2/Out/QuestionTypes/HotspotMapper.php +++ b/src/Processors/QtiV2/Out/QuestionTypes/HotspotMapper.php @@ -45,8 +45,7 @@ public function convert(BaseQuestionType $questionType, $interactionIdentifier, $imageObject = $this->buildMainImageObject($question->get_image()); $hasMultiResponses = !empty($question->get_multiple_responses()) && $question->get_multiple_responses(); $maxChoices = $hasMultiResponses ? $choicesCollection->count() : 1; - $interaction = new HotspotInteraction($interactionIdentifier, $imageObject, $choicesCollection); - $interaction->setMaxChoices($maxChoices); + $interaction = new HotspotInteraction($interactionIdentifier, $imageObject, $maxChoices, $choicesCollection); // Set min choices are 0 because we allow no responses $interaction->setMinChoices(0); diff --git a/tests/Unit/Processors/QtiV2/In/Fixtures/HotspotInteractionBuilder.php b/tests/Unit/Processors/QtiV2/In/Fixtures/HotspotInteractionBuilder.php index 44168554..9ea002fc 100644 --- a/tests/Unit/Processors/QtiV2/In/Fixtures/HotspotInteractionBuilder.php +++ b/tests/Unit/Processors/QtiV2/In/Fixtures/HotspotInteractionBuilder.php @@ -17,7 +17,7 @@ public static function buildWithRectShapesChoices($responseIdentifier) $imageObject->setWidth(131); $imageObject->setHeight(37); $collection = self::buildRectShapesChoices(); - return new HotspotInteraction($responseIdentifier, $imageObject, $collection); + return new HotspotInteraction($responseIdentifier, $imageObject, 0, $collection); } public static function buildWithCircleShapesChoices($responseIdentifier) @@ -31,7 +31,7 @@ public static function buildWithCircleShapesChoices($responseIdentifier) $collection->attach(new HotspotChoice('B', QtiShape::CIRCLE, new QtiCoords(QtiShape::CIRCLE, [118, 184, 8]))); $collection->attach(new HotspotChoice('C', QtiShape::CIRCLE, new QtiCoords(QtiShape::CIRCLE, [150, 235, 8]))); $collection->attach(new HotspotChoice('D', QtiShape::CIRCLE, new QtiCoords(QtiShape::CIRCLE, [96, 114, 8]))); - return new HotspotInteraction($responseIdentifier, $imageObject, $collection); + return new HotspotInteraction($responseIdentifier, $imageObject, 0, $collection); } public static function buildWithPolyShapesChoices($responseIdentifier) diff --git a/tests/Unit/Processors/QtiV2/In/Interactions/HotspotInteractionTest.php b/tests/Unit/Processors/QtiV2/In/Interactions/HotspotInteractionTest.php index 805bc1a4..a04428da 100644 --- a/tests/Unit/Processors/QtiV2/In/Interactions/HotspotInteractionTest.php +++ b/tests/Unit/Processors/QtiV2/In/Interactions/HotspotInteractionTest.php @@ -17,7 +17,7 @@ public function testImageWithoutWidth() $imageObject = new Object('http://anyurl.com', 'image/png'); $collection = HotspotInteractionBuilder::buildRectShapesChoices(); - $interaction = new HotspotInteraction('thisJustWontWork', $imageObject, $collection); + $interaction = new HotspotInteraction('thisJustWontWork', $imageObject, 0, $collection); $responseProcessingTemplate = ResponseProcessingTemplate::matchCorrect(); $responseDeclaration = ResponseDeclarationBuilder::buildWithCorrectResponse('thisJustWontWork', ['A']);