Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as =================================================================== diff -u -r5608418b0d7e40ae08f6034ece0dc57da347ba9c -r372281ebe679dbfa9d187b8324dab163a7018878 --- lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (.../Activity.as) (revision 5608418b0d7e40ae08f6034ece0dc57da347ba9c) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (.../Activity.as) (revision 372281ebe679dbfa9d187b8324dab163a7018878) @@ -1,5 +1,7 @@ import org.lamsfoundation.lams.authoring.*; import org.lamsfoundation.lams.common.dict.* +import org.lamsfoundation.lams.common.* +import org.lamsfoundation.lams.common.util.* /* * * @author DC @@ -168,7 +170,37 @@ } } + public function toData(){ + var dto:Object = new Object(); + dto.objectType = (_objectType) ? _objectType : Config.STRING_NULL_VALUE; + dto.activityTypeID = (_activityTypeID) ? _activityTypeID : Config.NUMERIC_NULL_VALUE; + dto.activityID = (_activityID) ? _activityID : Config.NUMERIC_NULL_VALUE; + dto.activityCategoryID = (_activityCategoryID) ? _activityCategoryID : Config.NUMERIC_NULL_VALUE; + dto.activityUIID = (_activityUIID) ? _activityUIID : Config.NUMERIC_NULL_VALUE; + dto.learningLibraryID = (_learningLibraryID) ? _learningLibraryID : Config.NUMERIC_NULL_VALUE; + dto.learningDesignID = (_learningDesignID) ? _learningDesignID : Config.NUMERIC_NULL_VALUE; + dto.libraryActivityID = (_libraryActivityID) ? _libraryActivityID : Config.NUMERIC_NULL_VALUE; + dto.parentActivityID = (_parentActivityID) ? _parentActivityID : Config.NUMERIC_NULL_VALUE; + dto.parentUIID = (_parentUIID) ? _parentUIID : Config.NUMERIC_NULL_VALUE; + dto.orderID = (_orderID) ? _orderID : Config.NUMERIC_NULL_VALUE; + dto.groupingID = (_groupingID) ? _groupingID : Config.NUMERIC_NULL_VALUE; + dto.groupingUIID = (_groupingUIID) ? _groupingUIID : Config.NUMERIC_NULL_VALUE; + dto.title = (_title) ? _title : Config.STRING_NULL_VALUE; + dto.description = (_description) ? _description : Config.STRING_NULL_VALUE; + dto.helpText = (_helpText) ? _helpText : Config.STRING_NULL_VALUE; + dto.yCoord = (_yCoord) ? _yCoord : Config.NUMERIC_NULL_VALUE; + dto.xCoord = (_xCoord) ? _xCoord : Config.NUMERIC_NULL_VALUE; + dto.libraryActivityUIImage = (_libraryActivityUIImage) ? _libraryActivityUIImage : Config.STRING_NULL_VALUE; + dto.applyGrouping= (_applyGrouping) ? _applyGrouping : Config.BOOLEAN_NULL_VALUE; + dto.runOffline= (_runOffline) ? _runOffline : Config.BOOLEAN_NULL_VALUE; + dto.offlineInstructions = (_offlineInstructions) ? _offlineInstructions : Config.STRING_NULL_VALUE; + dto.defineLater= (_defineLater) ? _defineLater : Config.BOOLEAN_NULL_VALUE; + dto.createDateTime= (_createDateTime) ? _createDateTime : Config.DATE_NULL_VALUE; + dto.groupingSupportType = (_groupingSupportType) ? _groupingSupportType : Config.NUMERIC_NULL_VALUE; + return dto; + } + //getters and setters: public function set objectType(a:String):Void{ _objectType = a; Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as =================================================================== diff -u -r137ecdd8cdaf69c5794357fcc2c852afb16ddde8 -r372281ebe679dbfa9d187b8324dab163a7018878 --- lams_central/src/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as (.../DesignDataModel.as) (revision 137ecdd8cdaf69c5794357fcc2c852afb16ddde8) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as (.../DesignDataModel.as) (revision 372281ebe679dbfa9d187b8324dab163a7018878) @@ -1,5 +1,6 @@ import org.lamsfoundation.lams.authoring.*; import org.lamsfoundation.lams.common.util.*; +import org.lamsfoundation.lams.common.*; /* * * @author DC @@ -182,24 +183,52 @@ } public function toData():Object{ - var design = {}; - design.objectType = _objectType; - design.learningDesignID = _learningDesignID; - design.uiID = _uiID; - design.title = _title; - design.description = _description; - design.helpText = _helpText; - design.version = _version; - design.userID = _userID; - design.workspaceFolderID = objectType; - design.createDateTime = _createDateTime; - design.readOnlyFlag = _readOnlyFlag; - design.validDesignFlag = _validDesignFlag; - design.maxID = _maxID; - design.firstID = _firstID; - design.activities = _activities.values(); - design.transitions = _transitions.values(); - design.groupings = _groupings.values(); + var design:Object = new Object(); + + + design.objectType = (_objectType) ? _objectType : Config.STRING_NULL_VALUE; + design.learningDesignID = (_learningDesignID) ? _learningDesignID : Config.NUMERIC_NULL_VALUE; + design.uiID = (_uiID) ? _uiID: Config.NUMERIC_NULL_VALUE; + design.title = _title ? _title : Config.STRING_NULL_VALUE; + design.description = (_description) ? _description : Config.STRING_NULL_VALUE; + design.helpText = (_helpText) ? _helpText : Config.STRING_NULL_VALUE; + design.version = (_version) ? _version : Config.NUMERIC_NULL_VALUE; + design.userID = (_userID) ? _userID : Config.NUMERIC_NULL_VALUE; + design.workspaceFolderID = (_workspaceFolderID) ? _workspaceFolderID : Config.NUMERIC_NULL_VALUE; + design.createDateTime = (_createDateTime) ? _createDateTime : Config.DATE_NULL_VALUE; + design.readOnlyFlag = (_readOnlyFlag) ? _readOnlyFlag : Config.BOOLEAN_NULL_VALUE; + design.validDesignFlag = _validDesignFlag ? _validDesignFlag : Config.BOOLEAN_NULL_VALUE; + design.maxID = (_maxID) ? _maxID : Config.NUMERIC_NULL_VALUE; + design.firstID = (_firstID) ? _firstID : Config.NUMERIC_NULL_VALUE; + + + + var classActs:Array = _activities.values(); + if(classActs.length > 0){ + design.activities = new Array(); + for(var i=0; i 0){ + design.transitions = new Array(); + for(var i=0; i 0){ + design.groupings = new Array(); + for(var i=0; i