Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== diff -u -re622da94925ca9580044a24d57ee128eb6386012 -r3ec6da7502650e268117d0291b4c13ab71d47d4d --- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision e622da94925ca9580044a24d57ee128eb6386012) +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 3ec6da7502650e268117d0291b4c13ab71d47d4d) @@ -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 ); }