Index: lams_common/conf/language/ApplicationResources.properties =================================================================== diff -u -r39da9c80d124aedcc3200d71fde095cbc37eb4e2 -r38effe66e5029282ee8cd4ef25c3a72c53d02611 --- lams_common/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 39da9c80d124aedcc3200d71fde095cbc37eb4e2) +++ lams_common/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 38effe66e5029282ee8cd4ef25c3a72c53d02611) @@ -35,6 +35,6 @@ error.import.matching.tool.not.found =The activity with signature {0} is skipped because a matching tool cannot be found. error.import.tool.service.fail =Unable to import tool content for tool {0}. Caused by {1}. error.no.valid.tool =No valid tools in this learning design. +import.shareresources.warning=The sequence contains one or more Share Resources activities. Please check these activities as any file or uploaded websites in the activity will be invalid and will cause an error for the learners. Links to external websites should not cause any errors. - #======= End labels: Exported 29 labels for en AU ===== Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/service/LD102Importer.java =================================================================== diff -u -r7ac564c94fbee27c841b34aa11612d0d57b7fd62 -r38effe66e5029282ee8cd4ef25c3a72c53d02611 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/service/LD102Importer.java (.../LD102Importer.java) (revision 7ac564c94fbee27c841b34aa11612d0d57b7fd62) +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/service/LD102Importer.java (.../LD102Importer.java) (revision 38effe66e5029282ee8cd4ef25c3a72c53d02611) @@ -85,6 +85,7 @@ private static final String MSG_KEY_PERM_GATE = "imported.permission.gate.title"; private static final String MSG_KEY_SYNC_GATE = "imported.synchronise.gate.title"; + private static final String MSG_KEY_SR_WARNING = "import.shareresources.warning"; private static final String MSG_KEY_VALIDATION_ERROR = "error.import.validation"; private Logger log = Logger.getLogger(LD102Importer.class); @@ -106,6 +107,7 @@ private Date createDate = new Date(); private User importer = null; private UserDTO importerDTO = null; // pass the dto to tools, rather than the real user object + private boolean needShareResourcesWarning = false; /** * Store relationship between an activity and its grouping for processing after all the activities have been process. @@ -405,6 +407,9 @@ throw new ImportToolContentException("Invalid packet format - it is not a learning design packet. See log for details."); } + if (needShareResourcesWarning) { + toolsErrorMsgs.add(messageService.getMessage(MSG_KEY_SR_WARNING)); + } return(ldInProgress != null ? ldInProgress.getLearningDesignId() : null); } @@ -1032,6 +1037,9 @@ return null; } + if ( WDDXTAGS102.TOOL_TYPE_URL_CONTENT.equals(toolType) ) { + needShareResourcesWarning = true; + } activity.setTitle( overrideTitle != null ? overrideTitle : toolTitle); activity.setDescription( overrideDescription != null ? overrideDescription : toolDescription); Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/service/WDDXTAGS102.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r38effe66e5029282ee8cd4ef25c3a72c53d02611 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/service/WDDXTAGS102.java (.../WDDXTAGS102.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/service/WDDXTAGS102.java (.../WDDXTAGS102.java) (revision 38effe66e5029282ee8cd4ef25c3a72c53d02611) @@ -129,6 +129,7 @@ public static final String CONTENT_URL_RUNTIME_LEARNER_SUBMIT_FILE = "runtimeSubmissionLearnerFile"; public static final String CONTENT_URL_URLS = "urls"; + public static final String TOOL_TYPE_URL_CONTENT = "urlcontent"; public static final String CONTENT_URL_URL_SHOWBUTTONS = "showbuttons"; public static final String CONTENT_URL_URL_VIEW_ORDER = "order"; public static final String CONTENT_URL_URL_TITLE = "title";