Index: lams_learning/conf/language/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_learning/conf/language/Attic/ApplicationResources.properties,v diff -u -r1.12 -r1.13 --- lams_learning/conf/language/ApplicationResources.properties 13 Jul 2006 00:07:50 -0000 1.12 +++ lams_learning/conf/language/ApplicationResources.properties 11 Aug 2006 02:03:36 -0000 1.13 @@ -26,6 +26,9 @@ # Text for all "Finish" buttons in learning. label.finish.button=Finish +# Message displayed in a closing window +message.window.closing=Please close this open window. + # Message displayed in a parallel activity window when one activity is finished but the other one isn't finished. message.activity.parallel.partialComplete=You have to complete the other task before progressing to the next activity.... # Message displayed in a parallel activity window if the user's browser can't support frames. Index: lams_learning/conf/xdoclet/struts-actions.xml =================================================================== RCS file: /usr/local/cvsroot/lams_learning/conf/xdoclet/struts-actions.xml,v diff -u -r1.9 -r1.10 --- lams_learning/conf/xdoclet/struts-actions.xml 13 Jul 2006 22:40:43 -0000 1.9 +++ lams_learning/conf/xdoclet/struts-actions.xml 11 Aug 2006 02:03:36 -0000 1.10 @@ -2,7 +2,9 @@ - + Index: lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java,v diff -u -r1.53 -r1.54 --- lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java 25 Jul 2006 01:22:48 -0000 1.53 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java 11 Aug 2006 02:03:36 -0000 1.54 @@ -392,11 +392,18 @@ // being available in the context. Hence it is defined in the ILearnerService interface, not the IFullLearnerService // interface. If it calls any other methods then it mustn't use anything on the ICoreLearnerService interface. - ToolSession toolSession = lamsCoreToolService.getToolSessionById(toolSessionId); + ToolSession toolSession = lamsCoreToolService.getToolSessionById(toolSessionId); toolSession.setToolSessionStateId(ToolSession.ENDED_STATE); lamsCoreToolService.updateToolSession(toolSession); + + LearnerProgress currentProgress = getProgress(new Integer(learnerId.intValue()), toolSession.getLesson().getLessonId()); - return completeActivity(new Integer(learnerId.intValue()), toolSession.getToolActivity()); + if (currentProgress.getCompletedActivities().contains(toolSession.getToolActivity())) + // return close window url + return ActivityMapping.getCloseURL(); + else + return completeActivity(new Integer(learnerId.intValue()), toolSession.getToolActivity()); + } /** Index: lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/ActivityMapping.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/ActivityMapping.java,v diff -u -r1.26 -r1.27 --- lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/ActivityMapping.java 12 Jul 2006 04:47:57 -0000 1.26 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/ActivityMapping.java 11 Aug 2006 02:03:36 -0000 1.27 @@ -358,5 +358,12 @@ { this.activityMappingStrategy = activityMappingStrategy; } + + public static String getCloseURL() { + String lamsUrl = Configuration.get(ConfigurationKeys.SERVER_URL) + LEARNING; + String closeUrl = lamsUrl + "/close.do"; + + return closeUrl; + } } \ No newline at end of file Index: lams_learning/web/close.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/close.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_learning/web/close.jsp 11 Aug 2006 02:03:36 -0000 1.1 @@ -0,0 +1,43 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA + + http://www.gnu.org/licenses/gpl.txt +--%> + +<%@ taglib uri="tags-fmt" prefix="fmt" %> + + +

 

+
+ +
+ +
+ +

 

+

+ +
+ + + + + Index: lams_learning/web/WEB-INF/struts/struts-config.xml =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/struts/Attic/struts-config.xml,v diff -u -r1.31 -r1.32 --- lams_learning/web/WEB-INF/struts/struts-config.xml 25 Jul 2006 06:01:51 -0000 1.31 +++ lams_learning/web/WEB-INF/struts/struts-config.xml 11 Aug 2006 02:03:36 -0000 1.32 @@ -44,10 +44,14 @@ - + + + @@ -66,13 +70,6 @@ unknown="false" validate="false" > - - - - - + Index: lams_learning/web/WEB-INF/struts/tiles-defs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/struts/Attic/tiles-defs.xml,v diff -u -r1.20 -r1.21 --- lams_learning/web/WEB-INF/struts/tiles-defs.xml 3 Jul 2006 06:25:48 -0000 1.20 +++ lams_learning/web/WEB-INF/struts/tiles-defs.xml 11 Aug 2006 02:03:36 -0000 1.21 @@ -77,6 +77,10 @@ + + + +