Index: lams_central/web/author2.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/Attic/author2.jsp,v diff -u -r1.11 -r1.12 --- lams_central/web/author2.jsp 18 Nov 2013 17:57:14 -0000 1.11 +++ lams_central/web/author2.jsp 19 Nov 2013 16:56:23 -0000 1.12 @@ -16,7 +16,9 @@ - + @@ -44,6 +46,15 @@
Open
+
+ Copy +
+
+ Paste +
+
+ Transition +
@@ -52,8 +63,8 @@
 
@@ -62,12 +73,7 @@
Arrange
-
- Copy -
-
- Paste -
+
@@ -199,15 +205,15 @@ - + - + @@ -250,5 +256,51 @@
Equal group sizes?
View learners before selection?
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ Title: + + +
+ Branching type: + + +
+ Grouping: + + +
+ Input (Tool): + + +
+
Match Groups to Branches
+
+
\ No newline at end of file Index: lams_central/web/css/authoring.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/authoring.css,v diff -u -r1.8 -r1.9 --- lams_central/web/css/authoring.css 18 Nov 2013 17:57:14 -0000 1.8 +++ lams_central/web/css/authoring.css 19 Nov 2013 16:56:23 -0000 1.9 @@ -41,6 +41,10 @@ width: 40px; } +input.propertiesContentFieldTitle { + width: 98%; +} + input.groupName { margin-bottom: 5px; width: 98%; @@ -120,9 +124,10 @@ padding: 0 5px 5px 5px; font-size: 11px; color: #2E6E9E; + z-index: 1003; } -div#toolbar .split-ui-button + ul li div { +div#toolbar .split-ui-button + ul li { padding-top: 5px; cursor: pointer; } Index: lams_central/web/includes/javascript/authoring/authoringActivity.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringActivity.js,v diff -u -r1.6 -r1.7 --- lams_central/web/includes/javascript/authoring/authoringActivity.js 18 Nov 2013 17:57:14 -0000 1.6 +++ lams_central/web/includes/javascript/authoring/authoringActivity.js 19 Nov 2013 16:56:23 -0000 1.7 @@ -7,11 +7,12 @@ /** * Constructor for a Tool Activity. */ - ToolActivity: function(id, toolID, x, y, title) { + ToolActivity: function(id, toolID, x, y, title, supportsOutputs) { this.id = id; + this.type = 'tool'; this.toolID = toolID; this.title = title; - this.type = 'tool'; + this.supportsOutputs = supportsOutputs; this.transitions = { 'from' : [], 'to' : [] @@ -72,7 +73,7 @@ /** * Either branching or converge point. */ - BranchingEdgeActivity : function(id, x, y, branchingActivity) { + BranchingEdgeActivity : function(id, x, y, title, branchingType, branchingActivity) { this.type = 'branchingEdge'; this.transitions = { 'from' : [], @@ -87,9 +88,13 @@ // this is the branching point this.isStart = true; branchingActivity = new ActivityLib.BranchingActivity(id, this); + branchingActivity.branchingType = branchingType || 'chosen'; + branchingActivity.title = title || 'Branching'; } this.branchingActivity = branchingActivity; + this.loadPropertiesDialogContent = ActivityLib.loadPropertiesDialogContent.branching; + this.draw = ActivityLib.draw.branching; this.draw(x, y); }, @@ -122,6 +127,7 @@ draw : { tool : function(x, y) { if (x == undefined || y == undefined) { + // just redraw the activity x = this.items.shape.getBBox().x; y = this.items.shape.getBBox().y; } @@ -155,6 +161,7 @@ grouping : function(x, y) { if (x == undefined || y == undefined) { + // just redraw the activity x = this.items.shape.getBBox().x; y = this.items.shape.getBBox().y; } @@ -213,6 +220,7 @@ branching : function(x, y) { if (x == undefined || y == undefined) { + // just redraw the activity x = this.items.shape.getBBox().x; y = this.items.shape.getBBox().y; } @@ -225,14 +233,15 @@ paper.setStart(); var shape = paper.path(Raphael.format('M {0} {1}' + (this.isStart ? layout.defs.branchingEdgeStart : layout.defs.branchingEdgeEnd), - x, y)) + x, y + 8)) .attr({ 'fill' : this.isStart ? layout.colors.branchingEdgeStart : layout.colors.branchingEdgeEnd }); - - paper.text(x, y + 14, this.isStart ? 'Branching point' - : 'Converge point') + + var title = this.branchingActivity.title; + paper.text(x + 8, y + 27, title + (this.isStart ? '\nstart' + : '\nend')) .attr({ 'font-size' : 9, 'font' : 'sans-serif' @@ -255,26 +264,29 @@ content = activity.propertiesContent; if (!content) { // first run, create the content - content = activity.propertiesContent = $('#propertiesContentTool').clone().attr('id', null).show(); + content = activity.propertiesContent = $('#propertiesContentTool').clone().attr('id', null) + .show().data('activity', activity); $('.propertiesContentFieldTitle', content).val(activity.title); $('input, select', content).change(function(){ // extract changed properties and redraw the activity - var redrawNeeded = false, - newTitle = $('.propertiesContentFieldTitle', activity.propertiesContent).val(); + var content = $(this).closest('.dialogContainer'), + activity = content.data('activity'), + redrawNeeded = false, + newTitle = $('.propertiesContentFieldTitle', content).val(); if (newTitle != activity.title) { activity.title = newTitle; redrawNeeded = true; } - var newGroupingValue = $('.propertiesContentFieldGrouping option:selected', activity.propertiesContent) + var newGroupingValue = $('.propertiesContentFieldGrouping option:selected', content) .data('grouping'); if (newGroupingValue != activity.grouping) { activity.grouping = newGroupingValue; redrawNeeded = true; } - activity.defineInMonitor = $('.propertiesContentFieldDefineMonitor', activity.propertiesContent) + activity.defineInMonitor = $('.propertiesContentFieldDefineMonitor', content) .is(':checked'); - var newOfflineValue = $('.propertiesContentFieldOffline', activity.propertiesContent) + var newOfflineValue = $('.propertiesContentFieldOffline', content) .is(':checked'); if (newOfflineValue != activity.offline) { activity.offline = newOfflineValue; @@ -287,24 +299,7 @@ }); } - // find all groupings on canvas and fill dropdown menu with their titles - var emptyOption = $('