Index: lams_central/web/lams_authoring.swf =================================================================== diff -u -r7955216f858ed1e0e6a38abef06b770af3326ad3 -r0267a9238f122504943b400c11ca0fa751698aba Binary files differ Index: lams_central/web/lams_authoring_library.swf =================================================================== diff -u -r7955216f858ed1e0e6a38abef06b770af3326ad3 -r0267a9238f122504943b400c11ca0fa751698aba Binary files differ Index: lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as =================================================================== diff -u -r4ae1c2066c754555f8ae260a052cc9a706a747f4 -r0267a9238f122504943b400c11ca0fa751698aba --- lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as (.../DesignDataModel.as) (revision 4ae1c2066c754555f8ae260a052cc9a706a747f4) +++ lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/DesignDataModel.as (.../DesignDataModel.as) (revision 0267a9238f122504943b400c11ca0fa751698aba) @@ -715,7 +715,7 @@ if(classGroups.length > 0) for(var i=0; i 0){ for(var i=0; i 0) return groups; if(groupDiff >= 0) { for(var i=0; i 0) ? new Group(null, _ddm.newUIID(), "Group " + Number(groups.length + i + 1), Number(groups.length+i)) - : new Group(null, _ddm.newUIID(), "Group " + Number(i+1), i); + var group = (groups.length > 0) ? new Group(this.groupingUIID, null, _ddm.newUIID(), "Group " + Number(groups.length + i + 1), Number(groups.length+i)) + : new Group(this.groupingUIID, null, _ddm.newUIID(), "Group " + Number(i+1), i); addGroup(group); } } else { for(var i=-1; i>=groupDiff; i--) { + _ddm.removeBranchMappingsByGroupUIID(groups[groups.length+i].groupUIID); _groups.remove(groups[groups.length+i].groupUIID); } } Index: lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/br/GroupMatchingDialog.as =================================================================== diff -u -rc519cdd55a51de98ac7e09348f1eac36f5369263 -r0267a9238f122504943b400c11ca0fa751698aba --- lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/br/GroupMatchingDialog.as (.../GroupMatchingDialog.as) (revision c519cdd55a51de98ac7e09348f1eac36f5369263) +++ lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/br/GroupMatchingDialog.as (.../GroupMatchingDialog.as) (revision 0267a9238f122504943b400c11ca0fa751698aba) @@ -167,8 +167,18 @@ for(var m in mappings) { match_dgd.addItem(mappings[m]); + removeGroup(mappings[m].group); } } + + private function removeGroup(g:Group) { + var indexList:Array = new Array(); + + for(var i=0; i 0) { - - for(var i=0; i< groups_lst.selectedItems.length; i++) { + + for(var i=0; i - "+Dictionary.getValue('pi_activity_type_grouping'); - - Debugger.log('This is the grouping object:',Debugger.GEN,'populateGroupingProperties','PropertyInspector'); - ObjectUtils.printObject(g); - - //loop through combo to fins SI of our gate activity type - for (var i=0; i 0) ? true : false; - } - }else{ - if(g.maxNumberOfGroups != null){ - numGroups_stp.value = g.maxNumberOfGroups; - _group_naming_btn.enabled = (numGroups_stp.value > 0) ? true : false; - } else { - _group_naming_btn.enabled = false; - } - } - - } - /** * Shows which grouping activity is applied to this activity, * if you click the edit button, the the activity is selected, Index: lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/PropertyInspectorControls.as =================================================================== diff -u -rc519cdd55a51de98ac7e09348f1eac36f5369263 -r0267a9238f122504943b400c11ca0fa751698aba --- lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/PropertyInspectorControls.as (.../PropertyInspectorControls.as) (revision c519cdd55a51de98ac7e09348f1eac36f5369263) +++ lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/PropertyInspectorControls.as (.../PropertyInspectorControls.as) (revision 0267a9238f122504943b400c11ca0fa751698aba) @@ -534,8 +534,10 @@ * @return */ private function checkEnableGroupsOptions(e:Boolean){ - var groupingBy = rndGroup_radio.selection.data; + var groupingBy = rndGroup_radio.selection.data; + Debugger.log('groupingBy:'+groupingBy,Debugger.GEN,'checkEnableGroupsOptions','PropertyInspector'); + if(groupingBy == 'num_learners'){ numRandomGroups_stp.value = 0; numRandomGroups_stp.enabled = false; @@ -546,38 +548,100 @@ numRandomGroups_stp.enabled = (e != null) ? e : true; numLearners_stp.value = 0; numLearners_stp.enabled = false; - - _group_naming_btn.enabled = (e != null && numRandomGroups_stp.value > 0) ? e : true; + + _group_naming_btn.enabled = (e != null) ? e : true; } //this is a crazy hack to stop the steppter dissapearing after its .enabled property is set. //waits 2 frames to re-display the control ( 1 doensnt work!) MovieClipUtils.doLater(Proxy.create(this,reDrawTroublesomeSteppersLater)); - } + } public function reDrawTroublesomeSteppersLater(){ MovieClipUtils.doLater(Proxy.create(this,reDrawTroublesomeSteppers)); - } + } + + private function populateGroupingProperties(ga:GroupingActivity){ + var g = _canvasModel.getCanvas().ddm.getGroupingByUIID(ga.createGroupingUIID); + toolDisplayName_lbl.text = ""+Dictionary.getValue('pi_title')+" - "+Dictionary.getValue('pi_activity_type_grouping'); + + Debugger.log('This is the grouping object:',Debugger.GEN,'populateGroupingProperties','PropertyInspector'); + ObjectUtils.printObject(g); + + //loop through combo to fins SI of our gate activity type + for (var i=0; i