Index: lams_build/lib/lams/lams.jar =================================================================== diff -u -r87806866f673458de317c4d1c6656b3bf5a81039 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 Binary files differ Index: lams_central/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r1aff6aeac19473c0089c0f3ff578a183beb92555 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 1aff6aeac19473c0089c0f3ff578a183beb92555) +++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -756,5 +756,6 @@ error.groups.upload.locked=Cannot update groups as the groups are now in use. error.branching.upload.must.use.existing.groups=Cannot update branching. Must use the existing names: {0}. +label.print=Print #======= End labels: Exported 732 labels for en AU ===== Index: lams_central/web/css/orgGroup.scss =================================================================== diff -u -r6c440a2765211f34a997d010eee1c4a5b5a1d9c2 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_central/web/css/orgGroup.scss (.../orgGroup.scss) (revision 6c440a2765211f34a997d010eee1c4a5b5a1d9c2) +++ lams_central/web/css/orgGroup.scss (.../orgGroup.scss) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -133,6 +133,11 @@ -webkit-overflow-scrolling: touch !important; overflow: auto; } + +#print-button { + color: $text-color +} + // override values from dialog.scss .dialogContainer .modal-body { height : 100%; Index: lams_central/web/includes/javascript/orgGroup.js =================================================================== diff -u -r1aff6aeac19473c0089c0f3ff578a183beb92555 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_central/web/includes/javascript/orgGroup.js (.../orgGroup.js) (revision 1aff6aeac19473c0089c0f3ff578a183beb92555) +++ lams_central/web/includes/javascript/orgGroup.js (.../orgGroup.js) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -529,6 +529,21 @@ $('#accordionUploadGroupFile').css("display","none"); } +/** + * Show a printable version of the groups. Open the same size as the current window + */ +function showPrintPage() { + var url = LAMS_URL + '/monitoring/grouping.do?method=printGrouping'; + if ( groupingActivityId ) + url += '&activityID='+groupingActivityId; + if ( lessonId ) + url += '&lessonID='+lessonId; + if ( grouping.groupingId ) + url += '&groupingId='+grouping.groupingId; + var height = Math.min(550, $(window).height()), + width = Math.max(1093, $(window).width()); + var wd = window.open(url,LABELS.GROUP_PREFIX_LABEL,'height='+height+',width='+width+',resizable,scrollbars').focus(); +} /** * *************** Import groups from a spreadsheet *************** */ Index: lams_central/web/includes/javascript/orgGrouping.js =================================================================== diff -u -r2d50303390a6ea1ec157a3a1390ecf3833c0339c -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_central/web/includes/javascript/orgGrouping.js (.../orgGrouping.js) (revision 2d50303390a6ea1ec157a3a1390ecf3833c0339c) +++ lams_central/web/includes/javascript/orgGrouping.js (.../orgGrouping.js) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -8,6 +8,7 @@ } function viewGroups(groupingId, force) { + debugger; var url = LAMS_URL + 'OrganisationGroup.do?method=viewGroups&organisationID=' + organisationId; if (lessonId) { url += '&lessonID=' + lessonId; Index: lams_central/web/orgGroup.jsp =================================================================== diff -u -r6c440a2765211f34a997d010eee1c4a5b5a1d9c2 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_central/web/orgGroup.jsp (.../orgGroup.jsp) (revision 6c440a2765211f34a997d010eee1c4a5b5a1d9c2) +++ lams_central/web/orgGroup.jsp (.../orgGroup.jsp) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -130,6 +130,7 @@ + "> Index: lams_common/src/java/org/lamsfoundation/lams/web/util/AttributeNames.java =================================================================== diff -u -r51fb2a37254f24bb2a805d4ffd54482c779f43fa -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_common/src/java/org/lamsfoundation/lams/web/util/AttributeNames.java (.../AttributeNames.java) (revision 51fb2a37254f24bb2a805d4ffd54482c779f43fa) +++ lams_common/src/java/org/lamsfoundation/lams/web/util/AttributeNames.java (.../AttributeNames.java) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -53,6 +53,7 @@ public static final String PARAM_ACTIVITY_ID = "activityID"; public static final String PARAM_CONTENT_FOLDER_ID = "contentFolderID"; public static final String PARAM_TITLE = "title"; + public static final String PARAM_PRINT_VIEW = "printView"; public static final String PARAM_COURSE_ID = "courseID"; public static final String PARAM_CLASS_ID = "classID"; Index: lams_monitoring/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r001b71e1b6da336c4adb6376c31ba95d4ace7b28 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_monitoring/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 001b71e1b6da336c4adb6376c31ba95d4ace7b28) +++ lams_monitoring/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -416,6 +416,6 @@ audit.lesson.status.changed =Lesson "{0}" ({1}) status changed from "{2}" to "{3}" tour.gradebook.show.weight =Show Weights tour.gradebook.show.weight.content =Show/hide the activity weights used for marking this lesson. +label.no.learners=No learners in group. - #======= End labels: Exported 401 labels for en AU ===== Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GroupingAJAXAction.java =================================================================== diff -u -ra0bea10c9022cc2146b3067858932029ca721683 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GroupingAJAXAction.java (.../GroupingAJAXAction.java) (revision a0bea10c9022cc2146b3067858932029ca721683) +++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/GroupingAJAXAction.java (.../GroupingAJAXAction.java) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -103,7 +103,13 @@ @SuppressWarnings("unchecked") public ActionForward startGrouping(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - + + return startGrouping(mapping, form, request, response, false); + } + + private ActionForward startGrouping(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response, boolean forcePrintView) throws IOException, ServletException { + Long activityID = WebUtil.readLongParam(request, AttributeNames.PARAM_ACTIVITY_ID); Long lessonId = WebUtil.readLongParam(request, AttributeNames.PARAM_LESSON_ID); IMonitoringService monitoringService = MonitoringServiceProxy @@ -123,7 +129,7 @@ request.setAttribute(GroupingAJAXAction.PARAM_ACTIVITY_TITLE, activity.getTitle()); request.setAttribute(GroupingAJAXAction.PARAM_ACTIVITY_DESCRIPTION, activity.getDescription()); - if (grouping.isChosenGrouping()) { + if ( !forcePrintView && grouping.isChosenGrouping()) { // can I remove groups/users - can't if tool sessions have been created Set groups = grouping.getGroups(); Iterator iter = groups.iterator(); @@ -162,7 +168,46 @@ // go to a view only screen for random grouping return mapping.findForward(GroupingAJAXAction.VIEW_GROUPS_SCREEN); } + + /** + * Called by the chosen grouping / course grouping screen to show a print version of the grouping. + */ + public ActionForward printGrouping(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + Long activityID = WebUtil.readLongParam(request, AttributeNames.PARAM_ACTIVITY_ID, true); + if ( activityID != null ) { + // normal activity based processing, startGrouping can handle it as it supports the normal view screen in monitoring + return startGrouping(mapping, form, request, response, true); + } + + // Not activity? Then it must be the course grouping print view request + Long orgGroupingId = WebUtil.readLongParam(request, "groupingId", true); + OrganisationGrouping orgGrouping = null; + if (orgGroupingId != null) { + IUserManagementService userManagementService = MonitoringServiceProxy + .getUserManagementService(getServlet().getServletContext()); + orgGrouping = (OrganisationGrouping) userManagementService.findById(OrganisationGrouping.class, + orgGroupingId); + } + SortedSet groups = new TreeSet(); + if ( orgGrouping != null ) { + groups.addAll(orgGrouping.getGroups()); + + // sort users with first, then last name, then login + Comparator userComparator = new FirstNameAlphabeticComparator(); + for (OrganisationGroup group : groups) { + Set sortedUsers = new TreeSet(userComparator); + sortedUsers.addAll(group.getUsers()); + group.setUsers(sortedUsers); + } + } + + request.setAttribute(GroupingAction.GROUPS, groups); + request.setAttribute("isCourseGrouping", true); // flag to page it is a course grouping so use the field names for OrganisationGroup + return mapping.findForward(GroupingAJAXAction.VIEW_GROUPS_SCREEN); + } /** * Moves users between groups, removing them from previous group and creating a new one, if needed. */ Index: lams_monitoring/web/css/_monitorLesson_base.scss =================================================================== diff -u -rb3c871874679a1d784db0d7dfac2fdabe65baf83 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_monitoring/web/css/_monitorLesson_base.scss (.../_monitorLesson_base.scss) (revision b3c871874679a1d784db0d7dfac2fdabe65baf83) +++ lams_monitoring/web/css/_monitorLesson_base.scss (.../_monitorLesson_base.scss) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -387,3 +387,11 @@ margin-left: 25px; } + +/***** Group View Page **/ +.group-table>tbody>tr:nth-of-type(odd){ + background-color:$brand-primary-light; +} +.group-table>tbody>tr>td, .table>tfoot>tr>td { + border-top: none; +} \ No newline at end of file Index: lams_monitoring/web/grouping/viewGroups.jsp =================================================================== diff -u -rb3c871874679a1d784db0d7dfac2fdabe65baf83 -r092ede3b8b3828ffa688c4db18c5d535e3364b98 --- lams_monitoring/web/grouping/viewGroups.jsp (.../viewGroups.jsp) (revision b3c871874679a1d784db0d7dfac2fdabe65baf83) +++ lams_monitoring/web/grouping/viewGroups.jsp (.../viewGroups.jsp) (revision 092ede3b8b3828ffa688c4db18c5d535e3364b98) @@ -24,29 +24,57 @@ <%@ taglib uri="tags-logic" prefix="logic"%> <%@ taglib uri="tags-core" prefix="c"%> <%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-function" prefix="fn" %> <%@ taglib uri="tags-lams" prefix="lams"%> - + - -
-
- - - - - - -
-
-   -
-
-
- + +
+ + + + + + + + + + + col-xs-12 + + + col-xs-6 + + + col-xs-4 + + + col-md-3 + + + + +
+
+

+ + + + + + + + + +
+
+
+
+
+
+
+
+
\ No newline at end of file