Index: lams_learning/conf/language/ApplicationResources.properties =================================================================== diff -u -rde5a963d4ae1a002658a0f777f0eeeb58f183e72 -r45d69b4410d4b912d7f5b0720e5a33bc63d572f5 --- lams_learning/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision de5a963d4ae1a002658a0f777f0eeeb58f183e72) +++ lams_learning/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 45d69b4410d4b912d7f5b0720e5a33bc63d572f5) @@ -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 =================================================================== diff -u -r997c1b7ff61674b657dd96c07f07a070b3ab91dc -r45d69b4410d4b912d7f5b0720e5a33bc63d572f5 --- lams_learning/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 997c1b7ff61674b657dd96c07f07a070b3ab91dc) +++ lams_learning/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 45d69b4410d4b912d7f5b0720e5a33bc63d572f5) @@ -2,7 +2,9 @@ - + Index: lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java =================================================================== diff -u -rf0bf73ab180670fb0051e6550d604e99ddab7520 -r45d69b4410d4b912d7f5b0720e5a33bc63d572f5 --- lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java (.../LearnerService.java) (revision f0bf73ab180670fb0051e6550d604e99ddab7520) +++ lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java (.../LearnerService.java) (revision 45d69b4410d4b912d7f5b0720e5a33bc63d572f5) @@ -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 =================================================================== diff -u -r04802eaaf2249d4faf8784f702664d28f46fdebc -r45d69b4410d4b912d7f5b0720e5a33bc63d572f5 --- lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/ActivityMapping.java (.../ActivityMapping.java) (revision 04802eaaf2249d4faf8784f702664d28f46fdebc) +++ lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/ActivityMapping.java (.../ActivityMapping.java) (revision 45d69b4410d4b912d7f5b0720e5a33bc63d572f5) @@ -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/WEB-INF/struts/struts-config.xml =================================================================== diff -u -r97049873e9f5a71cdb4e9286f82508040b597347 -r45d69b4410d4b912d7f5b0720e5a33bc63d572f5 --- lams_learning/web/WEB-INF/struts/struts-config.xml (.../struts-config.xml) (revision 97049873e9f5a71cdb4e9286f82508040b597347) +++ lams_learning/web/WEB-INF/struts/struts-config.xml (.../struts-config.xml) (revision 45d69b4410d4b912d7f5b0720e5a33bc63d572f5) @@ -44,10 +44,14 @@ - + + + @@ -66,13 +70,6 @@ unknown="false" validate="false" > - - - - - + Index: lams_learning/web/WEB-INF/struts/tiles-defs.xml =================================================================== diff -u -r042f86ebfe990323af48b7b71d44e5e6f2b26227 -r45d69b4410d4b912d7f5b0720e5a33bc63d572f5 --- lams_learning/web/WEB-INF/struts/tiles-defs.xml (.../tiles-defs.xml) (revision 042f86ebfe990323af48b7b71d44e5e6f2b26227) +++ lams_learning/web/WEB-INF/struts/tiles-defs.xml (.../tiles-defs.xml) (revision 45d69b4410d4b912d7f5b0720e5a33bc63d572f5) @@ -77,6 +77,10 @@ + + + + Index: lams_learning/web/close.jsp =================================================================== diff -u --- lams_learning/web/close.jsp (revision 0) +++ lams_learning/web/close.jsp (revision 45d69b4410d4b912d7f5b0720e5a33bc63d572f5) @@ -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" %> + + +

 

+
+ +
+ +
+ +

 

+

+ +
+ + + + +