Index: lams_central/web/groups.jsp =================================================================== diff -u -r50ce17b539bba75dc92c9799db20a66fa118e788 -re0dbd6beaeea905447bd9a87cd23272c4cfee853 --- lams_central/web/groups.jsp (.../groups.jsp) (revision 50ce17b539bba75dc92c9799db20a66fa118e788) +++ lams_central/web/groups.jsp (.../groups.jsp) (revision e0dbd6beaeea905447bd9a87cd23272c4cfee853) @@ -113,8 +113,8 @@ - - + +   Index: lams_central/web/includes/javascript/orgGrouping.js =================================================================== diff -u -ra778e45c1bc4216c14c4c0f3f7485da58049940f -re0dbd6beaeea905447bd9a87cd23272c4cfee853 --- lams_central/web/includes/javascript/orgGrouping.js (.../orgGrouping.js) (revision a778e45c1bc4216c14c4c0f3f7485da58049940f) +++ lams_central/web/includes/javascript/orgGrouping.js (.../orgGrouping.js) (revision e0dbd6beaeea905447bd9a87cd23272c4cfee853) @@ -2,33 +2,33 @@ if (!lessonMode && confirm(LABELS.REMOVE_GROUPING_CONFIRM_LABEL)) { //dynamically create a form and submit it var form = $('
'); - - var hiddenField = $(''); - form.append(hiddenField); - - hiddenField = $(''); - form.append(hiddenField); - hiddenField = $(''); - form.append(hiddenField); + var hiddenField = $(''); + form.append(hiddenField); - // The form needs to be a part of the document in order to be submitted - $(document.body).append(form); - form.submit(); + hiddenField = $(''); + form.append(hiddenField); + + hiddenField = $(''); + form.append(hiddenField); + + // The form needs to be a part of the document in order to be submitted + $(document.body).append(form); + form.submit(); } } function viewGroups(groupingId, force) { var url = LAMS_URL + 'grouping/viewGroups.do?organisationID=' + organisationId - + '&targetOrganisationID=' + targetOrganisationId; + + '&targetOrganisationID=' + targetOrganisationId; if (lessonId) { url += '&lessonID=' + lessonId; } // no grouping ID means we open a brand new grouping if (groupingId) { url += '&groupingId=' + groupingId; } - + if (lessonMode) { var executeShow = true; if (groupingId && !force) { @@ -38,7 +38,8 @@ } if (executeShow) { // load to current iframe - document.location.href = url + '&activityID=' + groupingActivityId; + url += '&activityID=' + groupingActivityId; + document.location.href = url; } } else { document.location.href = url; @@ -52,18 +53,18 @@ * 1) it was taken from Authoring dialog for groups-to-branches mapping * 2) two types of groups: course and branching could easily get mixed */ - + let gtbDialog = $('#groupMappingDialogContents').clone().attr('id', 'groupMappingDialog'); $('#branchMappingOKButton', gtbDialog).click(function(){ var dialog = $(this).closest('.modal'), groupsToBranches = []; - + // fill JSON with group pairs $('.branchMappingBoundItemCell div, .branchMappingFreeItemCell div', dialog).each(function(){ var groupID = $(this).attr('id'), boundItem = $(this).data('boundItem'), branchID = boundItem ? boundItem.attr('id') : null; - + // add the mapping if (branchID) { groupsToBranches.push({ @@ -72,12 +73,12 @@ }); } }); - + var data = { 'mapping' : JSON.stringify(groupsToBranches) }; data[csrfTokenName] = csrfTokenValue; - + // save the mapping $.ajax({ url : LAMS_URL + 'grouping/saveGroupMappings.do', @@ -92,7 +93,7 @@ } }); }); - + // initialise the dialog buttons $('.branchMappingAddButton', gtbDialog).click(function(){ addGroupMapping(); @@ -105,10 +106,10 @@ branchesCell = $('.branchMappingFreeBranchCell', gtbDialog), groupCell = $('.branchMappingBoundItemCell', gtbDialog), branchCell = $('.branchMappingBoundBranchCell', gtbDialog); - + // clear out previous entries $('.branchMappingListCell', gtbDialog).empty(); - + // fetch course and branching groups $.ajax({ url : LAMS_URL + 'grouping/getGroupsForMapping.do', @@ -122,22 +123,22 @@ $.each(response.groups, function(){ var group = this, groupElem = $('
').click(selectGroupMappingListItem) - .text(group.name).attr('id', group.id); - + .text(group.name).attr('id', group.id); + $.each(response.branches, function() { // check if a branching group alread exists with the same name as a course group if (this.name == group.name) { var branchElem = $('
').click(selectGroupMappingListItem) - .appendTo(branchCell) - .text(this.name) - .attr('id', this.id) - .data('boundItem', groupElem); + .appendTo(branchCell) + .text(this.name) + .attr('id', this.id) + .data('boundItem', groupElem); groupElem.appendTo(groupCell).data('boundItem', branchElem); groupElem = null; return false; } }); - + if (groupElem) { // no existing mapping was found, make the group available for mapping groupElem.appendTo(groupsCell); @@ -146,12 +147,12 @@ // fill in branch groups $.each(response.branches, function(){ $('
').click(selectGroupMappingListItem).appendTo(branchesCell) - .text(this.name).attr('id', this.id); + .text(this.name).attr('id', this.id); }); } }); - - + + gtbDialog.modal('show'); }; @@ -162,11 +163,11 @@ var dialog = $('#groupMappingDialog'), selectedItem = $('.branchMappingFreeItemCell .selected', dialog), selectedBranch = $('.branchMappingFreeBranchCell .selected', dialog); - + if (selectedItem.length != 1 || selectedBranch.length != 1) { return; } - + // original branch stays in its list selectedBranch = selectedBranch.clone().click(selectGroupMappingListItem); // add info about the pair for later reference @@ -189,7 +190,7 @@ if (selectedItem.length != 1 || selectedBranch.length != 1) { return; } - + selectedItem.removeData('boundItem'); selectedBranch.remove(); $('.branchMappingFreeItemCell', dialog).append(selectedItem); @@ -201,10 +202,10 @@ function selectGroupMappingListItem(){ var item = $(this), boundItem = item.data('boundItem'); - + item.siblings().removeClass('selected'); item.addClass('selected'); - + if (boundItem) { boundItem.siblings().removeClass('selected'); boundItem.addClass('selected'); Index: lams_central/web/orgGrouping.jsp =================================================================== diff -u -r54a3c302d29d64b55efa18189083dadd13c51708 -re0dbd6beaeea905447bd9a87cd23272c4cfee853 --- lams_central/web/orgGrouping.jsp (.../orgGrouping.jsp) (revision 54a3c302d29d64b55efa18189083dadd13c51708) +++ lams_central/web/orgGrouping.jsp (.../orgGrouping.jsp) (revision e0dbd6beaeea905447bd9a87cd23272c4cfee853) @@ -13,151 +13,161 @@ - + - - <c:out value="${title}" /> + + <c:out value="${title}" /> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - -
-
-
-
- -
+ +
+ +
+
+ + +
+
+
+
+
-
+
- - -
-
-
    - - <%-- In lesson mode do not show groupings with zero groups --%> - -
  • -
    -
    - -
    -
    +
    + + +
    +
    +
      + + <%-- In lesson mode do not show groupings with zero groups --%> + +
    • +
      +
      + +
      +
      - ${grouping.groupCount} + ${grouping.groupCount} -
      -
      - - - -
      -
    • -
      -
      -
    -
    +
    + + + +
    +
    +
  • +
    +
    +
- -
-
-
+
+ +
+
+
- - - - - + - + + + + + \ No newline at end of file Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GroupingController.java =================================================================== diff -u -r76a9b6401f527e6b1701261cebe945a9658c22a7 -re0dbd6beaeea905447bd9a87cd23272c4cfee853 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GroupingController.java (.../GroupingController.java) (revision 76a9b6401f527e6b1701261cebe945a9658c22a7) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GroupingController.java (.../GroupingController.java) (revision e0dbd6beaeea905447bd9a87cd23272c4cfee853) @@ -114,8 +114,6 @@ Long activityID = WebUtil.readLongParam(request, AttributeNames.PARAM_ACTIVITY_ID); Long lessonId = WebUtil.readLongParam(request, AttributeNames.PARAM_LESSON_ID); - boolean displayReturnToMonitoringLink = WebUtil.readBooleanParam(request, "displayReturnToMonitoringLink", - false); Activity activity = monitoringService.getActivityById(activityID); Grouping grouping = null; @@ -128,8 +126,7 @@ if (!forcePrintView) { return "redirect:" + Configuration.get(ConfigurationKeys.SERVER_URL) + "grouping/viewGroupings.do?lessonID=" - + lessonId + "&activityID=" + activityID + "&displayReturnToMonitoringLink=" - + displayReturnToMonitoringLink; + + lessonId + "&activityID=" + activityID; } request.setAttribute(AttributeNames.PARAM_ACTIVITY_ID, activityID); Index: lams_monitoring/web/includes/javascript/monitorLesson.js =================================================================== diff -u -r7c8f41bcabfe29e1a435207eb06e98a9cb36df67 -re0dbd6beaeea905447bd9a87cd23272c4cfee853 --- lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision 7c8f41bcabfe29e1a435207eb06e98a9cb36df67) +++ lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision e0dbd6beaeea905447bd9a87cd23272c4cfee853) @@ -1179,7 +1179,7 @@ } break; - case 6 : entryContent += '' + LABELS.CONTRIBUTE_BUTTON + ''; break; default : entryContent += '