Index: lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java =================================================================== diff -u -rf3de7ac12162d8c33e8de55c3ca868b05600b7d4 -r0a14356a02bd1eafd448340a569b0504c09264fb --- lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java (.../ObjectExtractor.java) (revision f3de7ac12162d8c33e8de55c3ca868b05600b7d4) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java (.../ObjectExtractor.java) (revision 0a14356a02bd1eafd448340a569b0504c09264fb) @@ -1931,7 +1931,7 @@ } private Integer getCoord(JSONObject details, String tag) throws JSONException { - Integer coord = (Integer) JsonUtil.opt(details, tag); + Integer coord = ((Number) JsonUtil.opt(details, tag)).intValue(); return (coord == null) || (coord >= 0) ? coord : ObjectExtractor.DEFAULT_COORD; } Index: lams_central/web/includes/javascript/authoring/authoringActivity.js =================================================================== diff -u -r95ad3400767c4353eb510ce059e15e85df069c32 -r0a14356a02bd1eafd448340a569b0504c09264fb --- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 95ad3400767c4353eb510ce059e15e85df069c32) +++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 0a14356a02bd1eafd448340a569b0504c09264fb) @@ -463,11 +463,13 @@ * Draws a Parallel (double) Activity container */ parallelActivity : function(x, y) { - if (x == undefined || y == undefined) { - // if no new coordinates are given, just redraw the activity - x = this.items.shape.getBBox().x; - y = this.items.shape.getBBox().y; + // if no new coordinates are given, just redraw the activity or give default value + if (x == undefined) { + x = this.items ? this.items.shape.getBBox().x : 0; } + if (y == undefined) { + y = this.items ? this.items.shape.getBBox().y : 0; + } if (this.childActivities && this.childActivities.length > 0) { // draw one by one, vertically @@ -1484,4 +1486,4 @@ branchingActivity.longestBranchLength = longestBranchLength; } -}; +}; \ No newline at end of file