Skip to content
Snippets Groups Projects
Commit 3e45a177 authored by srosse's avatar srosse
Browse files

OO-2648: path to the attachments of an assessmentItem are relative to it and...

OO-2648: path to the attachments of an assessmentItem are relative to it and not the storage folder (imsmanifest.xml) created by the question pool
parent 408a93c4
No related branches found
No related tags found
No related merge requests found
...@@ -255,7 +255,7 @@ public class AssessmentItemMetadata { ...@@ -255,7 +255,7 @@ public class AssessmentItemMetadata {
} }
//qti metadata //qti metadata
QTIMetadataType qtiMetadata = metadata.getQtiMetadata(false); QTIMetadataType qtiMetadata = metadata.getQtiMetadata(true);
if(qtiMetadata.getToolName() != null) { if(qtiMetadata.getToolName() != null) {
editor = qtiMetadata.getToolName(); editor = qtiMetadata.getToolName();
} }
......
...@@ -155,6 +155,9 @@ public class QTI21ImportProcessor { ...@@ -155,6 +155,9 @@ public class QTI21ImportProcessor {
//storage //storage
File itemStorage = qpoolFileStorage.getDirectory(dir); File itemStorage = qpoolFileStorage.getDirectory(dir);
File outputFile = new File(itemStorage, href); File outputFile = new File(itemStorage, href);
if(!outputFile.getParentFile().exists()) {
outputFile.getParentFile().mkdirs();
}
convertXmlFile(assessmentItemPath, outputFile.toPath()); convertXmlFile(assessmentItemPath, outputFile.toPath());
QtiXmlReader qtiXmlReader = new QtiXmlReader(qtiService.jqtiExtensionManager()); QtiXmlReader qtiXmlReader = new QtiXmlReader(qtiService.jqtiExtensionManager());
...@@ -194,7 +197,7 @@ public class QTI21ImportProcessor { ...@@ -194,7 +197,7 @@ public class QTI21ImportProcessor {
for(String material:materials) { for(String material:materials) {
if(material.indexOf("://") < 0) {// material can be an external URL if(material.indexOf("://") < 0) {// material can be an external URL
Path materialFile = assessmentItemPath.getParent().resolve(material); Path materialFile = assessmentItemPath.getParent().resolve(material);
PathUtils.copyFileToDir(materialFile, itemStorage, material); PathUtils.copyFileToDir(materialFile, outputFile.getParentFile(), material);
} }
} }
return qitem; return qitem;
......
...@@ -36,8 +36,10 @@ ...@@ -36,8 +36,10 @@
jQuery(function() { jQuery(function() {
var map = jQuery('#${containerId}_img').maphilight({ var map = jQuery('#${containerId}_img').maphilight({
fillColor: '888888', fillColor: '888888',
strokeColor: '0000ff', strokeColor: '333333',
strokeWidth: 3 strokeOpacity: 0.5,
strokeWidth: 3,
alwaysOn: true
}); });
jQuery('#${containerId}').graphicGapInteraction({ jQuery('#${containerId}').graphicGapInteraction({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment