Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as =================================================================== diff -u -r73b2d5d701ac3db17a032c3be5a9ed6c347e6c13 -r340fd43fe1ab7effe65e14c708e501c2d1d3f55b --- lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (.../Activity.as) (revision 73b2d5d701ac3db17a032c3be5a9ed6c347e6c13) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (.../Activity.as) (revision 340fd43fe1ab7effe65e14c708e501c2d1d3f55b) @@ -58,13 +58,14 @@ private var _objectType:String; private var _activityTypeID:Number; - + private var _activityID:Number; private var _activityCategoryID:Number; private var _activityUIID:Number; - private var _learningLibraryID:Number; + private var _learningLibraryID:Number; + //TODO: This will be removed by mai this week. private var _learningDesignID:Number; private var _libraryActivityID:Number; @@ -192,7 +193,38 @@ return dto; } + public function clone():Activity{ + var n = new Activity(null); + //objectType is in the constructor + n.activityTypeID = _activityTypeID; + n.activityID = _activityID; + n.activityCategoryID = _activityCategoryID; + n.activityUIID = _activityUIID; + n.learningLibraryID = _learningLibraryID; + n.learningDesignID = _learningDesignID; + n.libraryActivityID = _libraryActivityID; + n.parentActivityID = _parentActivityID; + n.parentUIID = _parentUIID + n.orderID = _orderID + n.groupingID = _groupingID; + n.groupingUIID = _groupingUIID + n.title = _title; + n.description = _description; + n.helpText = _helpText; + n.yCoord = _yCoord; + n.xCoord = _xCoord; + n.libraryActivityUIImage = _libraryActivityUIImage; + n.applyGrouping = _applyGrouping; + n.runOffline = _runOffline; + n.offlineInstructions = _offlineInstructions; + n.defineLater = _defineLater; + n.createDateTime = _createDateTime; + n.groupingSupportType = _groupingSupportType; + + return n; + } + //getters and setters: public function set objectType(a:String):Void{ _objectType = a; Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/ToolActivity.as =================================================================== diff -u -r40009cd1c844178abd04db73f0e17a3b8c7a2fa9 -r340fd43fe1ab7effe65e14c708e501c2d1d3f55b --- lams_central/src/flash/org/lamsfoundation/lams/authoring/ToolActivity.as (.../ToolActivity.as) (revision 40009cd1c844178abd04db73f0e17a3b8c7a2fa9) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/ToolActivity.as (.../ToolActivity.as) (revision 340fd43fe1ab7effe65e14c708e501c2d1d3f55b) @@ -39,13 +39,60 @@ dto.authoringURL = (_authoringURL) ? _authoringURL : Config.STRING_NULL_VALUE; dto.toolDisplayName = (_toolDisplayName) ? _toolDisplayName: Config.STRING_NULL_VALUE; dto.toolContentID = (_toolContentID) ? _toolContentID: Config.NUMERIC_NULL_VALUE; - dto.toolContentID = (_toolID) ? _toolID: Config.NUMERIC_NULL_VALUE; + dto.toolID = (_toolID) ? _toolID: Config.NUMERIC_NULL_VALUE; dto.supportsContribute = (_supportsContribute!=null) ? _supportsContribute: Config.BOOLEAN_NULL_VALUE; dto.supportsDefineLater = (_supportsDefineLater!=null) ? _supportsDefineLater: Config.BOOLEAN_NULL_VALUE; dto.supportsModeration = (_supportsModeration!=null) ? _supportsModeration: Config.BOOLEAN_NULL_VALUE; + dto._supportsRunOffline = (_supportsRunOffline!=null) ? _supportsRunOffline: Config.BOOLEAN_NULL_VALUE; return dto; } + public function clone():ToolActivity{ + //var n:Activity = super.clone(); + + var n:ToolActivity = new ToolActivity(null); + + //parents properties: + n.objectType = _objectType; + n.activityTypeID = _activityTypeID; + n.activityID = _activityID; + n.activityCategoryID = _activityCategoryID; + n.activityUIID = _activityUIID; + n.learningLibraryID = _learningLibraryID; + n.learningDesignID = _learningDesignID; + n.libraryActivityID = _libraryActivityID; + n.parentActivityID = _parentActivityID; + n.parentUIID = _parentUIID + n.orderID = _orderID + n.groupingID = _groupingID; + n.groupingUIID = _groupingUIID + n.title = _title; + n.description = _description; + n.helpText = _helpText; + n.yCoord = _yCoord; + n.xCoord = _xCoord; + n.libraryActivityUIImage = _libraryActivityUIImage; + n.applyGrouping = _applyGrouping; + n.runOffline = _runOffline; + n.offlineInstructions = _offlineInstructions; + n.defineLater = _defineLater; + n.createDateTime = _createDateTime; + n.groupingSupportType = _groupingSupportType; + + //class props + n.authoringURL = _authoringURL; + n.toolDisplayName = _toolDisplayName; + n.toolContentID = _toolContentID; + n.toolID = _toolID; + n.supportsContribute = _supportsContribute; + n.supportsDefineLater = _supportsDefineLater; + n.supportsModeration = _supportsRunOffline; + + return n; + + + } + //GETTERS + SETTERS /**