Index: lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/servlets/ExportServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/servlets/ExportServlet.java,v diff -u -r1.10 -r1.11 --- lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/servlets/ExportServlet.java 14 Jul 2008 01:27:53 -0000 1.10 +++ lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/servlets/ExportServlet.java 29 Jul 2008 04:53:21 -0000 1.11 @@ -32,6 +32,8 @@ import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.gmap.dto.GmapDTO; import org.lamsfoundation.lams.tool.gmap.dto.GmapSessionDTO; import org.lamsfoundation.lams.tool.gmap.dto.GmapUserDTO; @@ -148,26 +150,40 @@ } GmapSession gmapSession = gmapService.getSessionBySessionId(toolSessionID); - + Gmap gmap = gmapSession.getGmap(); UserDTO lamsUserDTO = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); GmapUser gmapUser = gmapService.getUserByUserIdAndSessionId(new Long(lamsUserDTO.getUserID()),toolSessionID); GmapUserDTO gmapUserDTO = new GmapUserDTO(gmapUser); - request.getSession().setAttribute("gmapUserDTO", gmapUserDTO); - // construct dto's GmapDTO gmapDTO = new GmapDTO(gmap); gmapDTO.setGmapMarkers(gmapService.getGmapMarkersBySessionId(toolSessionID)); GmapSessionDTO sessionDTO = new GmapSessionDTO(gmapSession); - request.getSession().setAttribute("sessionDTO", sessionDTO); + // if reflectOnActivity is enabled add userDTO. + if (gmap.isReflectOnActivity()) { + + // get the entry. + NotebookEntry entry = gmapService.getEntry(toolSessionID, + CoreNotebookConstants.NOTEBOOK_TOOL, + GmapConstants.TOOL_SIGNATURE, gmapUser.getUserId().intValue()); + + if (entry != null) { + gmapUserDTO.finishedReflection = true; + gmapUserDTO.notebookEntry = entry.getEntry(); + } else { + gmapUserDTO.finishedReflection = false; + } + sessionDTO.getUserDTOs().add(gmapUserDTO); + } + request.getSession().setAttribute("gmapUserDTO", gmapUserDTO); + request.getSession().setAttribute("sessionDTO", sessionDTO); gmapDTO.getSessionDTOs().add(sessionDTO); - request.getSession().setAttribute("gmapDTO", gmapDTO); } @@ -193,6 +209,26 @@ for (GmapSessionDTO gmapSessionDTO : gmapDTO.getSessionDTOs() ) { gmapSessionDTO.setMarkerDTOs(gmapService.getGmapMarkersBySessionId(gmapSessionDTO.getSessionID())); + + // if reflectOnActivity is enabled add all userDTO. + if (gmap.isReflectOnActivity()) { + + for (GmapUserDTO gmapUserDTO : gmapSessionDTO.getUserDTOs()) + { + // get the entry. + NotebookEntry entry = gmapService.getEntry(gmapSessionDTO.getSessionID(), + CoreNotebookConstants.NOTEBOOK_TOOL, + GmapConstants.TOOL_SIGNATURE, gmapUserDTO.getUserId() + .intValue()); + if (entry != null) { + gmapUserDTO.finishedReflection = true; + gmapUserDTO.notebookEntry = entry.getEntry(); + } else { + gmapUserDTO.finishedReflection = false; + } + gmapSessionDTO.getUserDTOs().add(gmapUserDTO); + } + } } request.getSession().setAttribute("gmapDTO", gmapDTO); Index: lams_tool_gmap/web/pages/export/exportPortfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/pages/export/exportPortfolio.jsp,v diff -u -r1.9 -r1.10 --- lams_tool_gmap/web/pages/export/exportPortfolio.jsp 21 Jul 2008 06:04:38 -0000 1.9 +++ lams_tool_gmap/web/pages/export/exportPortfolio.jsp 29 Jul 2008 04:53:21 -0000 1.10 @@ -115,7 +115,7 @@ - ${session.sessionName} + ${session.sessionName} ${session.numberOfLearners} @@ -154,8 +154,49 @@ + + + + + + + + + ${session.sessionName} + + + + + + ${user.firstName} ${user.lastName} + + + + ${user.notebookEntry} + + + + + + + + + + + + + + + ${gmapUserDTO.firstName} + ${gmapUserDTO.lastName} + + + + + + + - @@ -199,6 +240,7 @@ clearMap(); addUsersForSession${session.sessionID}(); addMarkersForSession${session.sessionID}(); + makeReflectionDivVisible('reflectionDiv${session.sessionID}'); @@ -229,6 +271,18 @@ + function makeReflectionDivVisible(id) + { + var i; + if (document.getElementById(id) != null) + { + + document.getElementById("reflectionDiv${session.sessionID}").style.display = "none"; + + document.getElementById(id).style.display = "block"; + } + } + //-->
+ ${gmapUserDTO.firstName} + ${gmapUserDTO.lastName} + + +