Skip to content

Commit

Permalink
Merge branch 'release-48.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 6, 2023
2 parents 1a43d17 + 2e0a70e commit 45e87f2
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 26 deletions.
4 changes: 4 additions & 0 deletions models/classes/export/AbstractQtiTestExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ protected function preProcessing(): void
/** Export the test definition and all its dependencies (media, items, ...) into the related ZIP archive. */
public function export(array $options = []): Report
{
if ($options['manifest']) {
$this->setManifest($options['manifest']);
}

$this->preProcessing();

// 1. Export the items bound to the test.
Expand Down
6 changes: 4 additions & 2 deletions models/classes/export/AbstractTestExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ public function export($formValues, $destination): Report
throw new common_Exception(sprintf('Unable to create ZIP archive for QTI Test at location "%s".', $path));
}

$manifest = $this->getServiceManager()->get(QtiTestUtils::SERVICE_ID)->emptyImsManifest(static::VERSION);

foreach ($instances as $instance) {
$subReport = $this->getTestExporter($this->getResource($instance))->export();
$subReport = $this->getTestExporter($this->getResource($instance))->export(['manifest' => $manifest]);
if (
$report->getType() !== ReportInterface::TYPE_ERROR &&
($subReport->containsError() || $subReport->getType() === ReportInterface::TYPE_ERROR)
Expand Down Expand Up @@ -151,7 +153,7 @@ protected function getExportingFileName(string $userDefinedName): string
return sprintf('%s_%d.zip', $userDefinedName, time());
}

protected function getManifest()
protected function getEmptyManifest()
{
return $this->getServiceManager()->get(QtiTestUtils::SERVICE_ID)->emptyImsManifest(static::VERSION);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function getFormTitle(): string
*/
protected function getTestExporter(Resource $test): QtiTestExporterInterface
{
return new QtiTestExporter($test, $this->getZip(), $this->getManifest());
return new QtiTestExporter($test, $this->getZip(), $this->getEmptyManifest());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function getFormTitle(): string
*/
protected function getTestExporter(Resource $test): QtiTestExporterInterface
{
return new QtiTestExporter($test, $this->getZip(), $this->getManifest());
return new QtiTestExporter($test, $this->getZip(), $this->getEmptyManifest());
}
}

Expand Down
2 changes: 1 addition & 1 deletion views/css/new-test-runner.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/css/new-test-runner.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/css/test-runner.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/css/test-runner.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiTest.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiTest.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiTestRunner.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiTestRunner.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/testPlugins.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/testPlugins.min.js.map

Large diffs are not rendered by default.

35 changes: 25 additions & 10 deletions views/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions views/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "GPL-2.0",
"dependencies": {
"@oat-sa/tao-test-runner": "^0.9.1",
"@oat-sa/tao-test-runner-qti": "^3.0.0"
"@oat-sa/tao-test-runner": "^1.0.0",
"@oat-sa/tao-test-runner-qti": "^4.0.0"
}
}

0 comments on commit 45e87f2

Please sign in to comment.