Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as =================================================================== diff -u -r169415dee9b45b19dfea8653871d8877dcc5de90 -rde88b8b0a1b13ad6c37fb1443c838b52f9b4e5c9 --- lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (.../Activity.as) (revision 169415dee9b45b19dfea8653871d8877dcc5de90) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/Activity.as (.../Activity.as) (revision de88b8b0a1b13ad6c37fb1443c838b52f9b4e5c9) @@ -144,7 +144,8 @@ * @param libraryActivityUIImage */ function Activity(activityUIID:Number){ - //assign the values: + Debugger.log('activityUIID:'+activityUIID,Debugger.GEN,'constructor','Activity'); + //assign the values: _activityUIID = activityUIID; //set default calues @@ -164,6 +165,7 @@ */ public static function getGateActivityTypes():Array{ var types:Array = []; + //types.addItem({label: Dictionary.getValue('none_act_lbl'), data: 0}); types.addItem({label: Dictionary.getValue('synch_act_lbl'), data: SYNCH_GATE_ACTIVITY_TYPE}); types.addItem({label: Dictionary.getValue('sched_act_lbl'), data: SCHEDULE_GATE_ACTIVITY_TYPE}); types.addItem({label: Dictionary.getValue('perm_act_lbl'), data: PERMISSION_GATE_ACTIVITY_TYPE}); @@ -196,6 +198,42 @@ } } + /** + * Populates all the fields in this activity from a dto object contaning the following fields + * NB: This is not very clever, if the field in the dto is blank then the value is overwritten in the class... + *
+
+			//activity properties:
+			_activityTypeID = dto.activityTypeID;
+			_activityID = dto.activityID;
+			_activityCategoryID = dto.activityCategoryID;
+			_activityUIID = dto.activityUIID;
+			_learningLibraryID = dto.learningLibraryID;
+			_learningDesignID = dto.learningDesignID;
+			_libraryActivityID = dto.libraryActivityID;
+			_parentActivityID = dto.parentActivityID;
+			_parentUIID = dto.parentUIID
+			_orderID = dto.orderID
+			_groupingID = dto.groupingID;
+			_groupingUIID = dto.groupingUIID
+			_title = dto.title;
+			_description = dto.description;
+			_helpText =  dto.helpText;
+			_yCoord = dto.yCoord;
+			_xCoord = dto.xCoord;
+			_libraryActivityUIImage = dto.libraryActivityUIImage;
+			_applyGrouping = dto.applyGrouping;
+			_runOffline = dto.runOffline;
+			_defineLater = dto.defineLater;
+			_createDateTime = dto.createDateTime;
+			_groupingSupportType = dto.groupingSupportType;
+
+ * + * + * @usage + * @param dto //the dto containing these fields + * @return + */ public function populateFromDTO(dto:Object){ @@ -223,6 +261,7 @@ _defineLater = dto.defineLater; _createDateTime = dto.createDateTime; _groupingSupportType = dto.groupingSupportType; +