Index: lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java =================================================================== diff -u -r99bad81dae364803715e125f14aedb605196b30c -r9989381a793053838a3fdf7d96203b8397bdb733 --- lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java (.../ObjectExtractor.java) (revision 99bad81dae364803715e125f14aedb605196b30c) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java (.../ObjectExtractor.java) (revision 9989381a793053838a3fdf7d96203b8397bdb733) @@ -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 -rd3a385feec7bc1de8bb274dd23d7e99c4e431e92 -r9989381a793053838a3fdf7d96203b8397bdb733 --- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision d3a385feec7bc1de8bb274dd23d7e99c4e431e92) +++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 9989381a793053838a3fdf7d96203b8397bdb733) @@ -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