Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== diff -u -r15ef8d2626176017e80348a3f2280d6d2eef8e53 -r06c23b644b04fb1b9cad5b7e2b4ef1b957afb937 --- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 15ef8d2626176017e80348a3f2280d6d2eef8e53) +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 06c23b644b04fb1b9cad5b7e2b4ef1b957afb937) @@ -852,8 +852,27 @@ null, activity.uiid, activity.learningLibraryID, 0, 0, activity.title ); } else if (activity instanceof frameActivityDefs.ToolActivity) { + // copy tool content + var toolContentID = null; + // tool content ID can be null if the activity had the default content, i.e. was not edited yet + if (activity.toolContentID) { + $.ajax({ + cache : false, + async : false, + url : LAMS_URL + "authoring/author.do", + data : { + 'method' : 'copyToolContentPlain', + 'toolContentID' : activity.toolContentID + }, + dataType : 'text', + success : function(response) { + toolContentID = response; + } + }); + } + addActivity = new ActivityDefs.ToolActivity( - null, activity.uiid, null, activity.toolID, activity.learningLibraryID, null, 0, 0, activity.title + null, activity.uiid, toolContentID, activity.toolID, activity.learningLibraryID, null, 0, 0, activity.title ); }