Index: lams_central/.classpath
===================================================================
diff -u -rb7aef118db71bf93f74bf91c76fbd4e59de37dff -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/.classpath (.../.classpath) (revision b7aef118db71bf93f74bf91c76fbd4e59de37dff)
+++ lams_central/.classpath (.../.classpath) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -42,6 +42,6 @@
-
+
Index: lams_central/src/java/org/lamsfoundation/lams/authoring/web/LamsAuthoringFinishAction.java
===================================================================
diff -u -r792f30e164500b758d9eeac2dcf19853be4dfd9f -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/src/java/org/lamsfoundation/lams/authoring/web/LamsAuthoringFinishAction.java (.../LamsAuthoringFinishAction.java) (revision 792f30e164500b758d9eeac2dcf19853be4dfd9f)
+++ lams_central/src/java/org/lamsfoundation/lams/authoring/web/LamsAuthoringFinishAction.java (.../LamsAuthoringFinishAction.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -1,195 +1,195 @@
-/****************************************************************
- * 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.0
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-
-package org.lamsfoundation.lams.authoring.web;
-
-import java.io.IOException;
-import java.net.URLEncoder;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.apache.struts.action.Action;
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-import org.lamsfoundation.lams.logevent.service.ILogEventService;
-import org.lamsfoundation.lams.tool.IToolVO;
-import org.lamsfoundation.lams.tool.ToolAccessMode;
-import org.lamsfoundation.lams.tool.ToolContentManager;
-import org.lamsfoundation.lams.tool.service.ILamsToolService;
-import org.lamsfoundation.lams.util.Configuration;
-import org.lamsfoundation.lams.util.ConfigurationKeys;
-import org.lamsfoundation.lams.util.WebUtil;
-import org.lamsfoundation.lams.web.util.AttributeNames;
-import org.springframework.beans.factory.NoSuchBeanDefinitionException;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-/**
- * This action class does some process when author try to save/cancel/close authoring tool pages. If author try to save
- * tool page, this action will redirct tool page to confirm page and execute clearSession() method. If author try to
- * cancel/close window, this action will execute clearSession().
- *
- * @author Steve.Ni
- */
-public abstract class LamsAuthoringFinishAction extends Action {
- private static Logger log = Logger.getLogger(LamsAuthoringFinishAction.class);
-
- private static final String ACTION_NAME = "action";
- private static final String ACTION_MODE = "mode";
- private static final String CUSTOMISE_SESSION_ID = "customiseSessionID";
- private static final String TOOL_SIGNATURE = "signature";
-
- private static final String CONFIRM_ACTION = "confirm";
- private static final String CANCEL_ACTION = "cancel";
- private static final String DEFINE_LATER_ACTION = "defineLater";
-
- private static final String RE_EDIT_URL = "reEditUrl";
-
- private static ILogEventService logEventService;
-
- /**
- * Action method, will handle save/cancel action.
- */
- @Override
- public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws IOException, ServletException {
- String action = request.getParameter(ACTION_NAME);
- ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, ACTION_MODE, false);
- String cSessionID = request.getParameter(CUSTOMISE_SESSION_ID);
- String notifyCloseURL = (String) request.getSession().getAttribute(AttributeNames.PARAM_NOTIFY_CLOSE_URL);
- Long toolContentId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID));
-
- // clear session according to the ToolAccessMode.
- clearSession(cSessionID, request.getSession(), mode);
-
- //CONFIRM_ACTION got fired only for general authoring and not for define later one
- if (StringUtils.equals(action, CONFIRM_ACTION)) {
- String nextUrl = getLamsUrl() + "authoringConfirm.jsp";
- String signature = request.getParameter(TOOL_SIGNATURE);
-
- String contentFolderID = "TODO_remove-change_optional_to_false";
- contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID, true);
-
- // check whether it use on define it later page
- IToolVO tool = getToolService().getToolBySignature(signature);
-
- //add reeditUrl parameter
- String reeditUrl = WebUtil.appendParameterToURL(getLamsUrl() + tool.getAuthorUrl(),
- AttributeNames.PARAM_TOOL_CONTENT_ID, toolContentId.toString());
- reeditUrl = WebUtil.appendParameterToURL(reeditUrl, AttributeNames.PARAM_CONTENT_FOLDER_ID,
- contentFolderID);
- if ( notifyCloseURL != null && notifyCloseURL.length() > 0 )
- reeditUrl = WebUtil.appendParameterToURL(reeditUrl, AttributeNames.PARAM_NOTIFY_CLOSE_URL, notifyCloseURL);
- nextUrl = WebUtil.appendParameterToURL(nextUrl, RE_EDIT_URL, URLEncoder.encode(reeditUrl, "UTF-8"));
-
- if (!StringUtils.isBlank(notifyCloseURL)) {
- nextUrl = WebUtil.appendParameterToURL(nextUrl, AttributeNames.PARAM_NOTIFY_CLOSE_URL, notifyCloseURL);
- }
- response.sendRedirect(nextUrl);
- }
-
- //audit log content has been finished being edited
- if (StringUtils.equals(action, DEFINE_LATER_ACTION)) {
- getLogEventService().logFinishEditingActivityInMonitor(toolContentId);
- }
-
- //reset defineLater task
- if (StringUtils.equals(action, CANCEL_ACTION) && mode.isTeacher()) {
- String signature = request.getParameter(TOOL_SIGNATURE);
-
- ToolContentManager contentManager = (ToolContentManager) findToolService(signature);
- contentManager.resetDefineLater(toolContentId);
-
- getLogEventService().logCancelEditingActivityInMonitor(toolContentId);
- }
-
- return null;
- }
-
- /**
- * All subclass will implements this method and execute clear HttpSession
action to remove obsolete
- * session values.
- *
- * @param customiseSessionID
- * customised session ID.
- * @param session
- * @param mode
- * ToolAccessMode to decide which role's session will be clear.
- */
- abstract public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode);
-
- // ---------------------------------------------------------------------
- // Helper Methods
- // ---------------------------------------------------------------------
-
- private String getLamsUrl() {
- String serverURL = Configuration.get(ConfigurationKeys.SERVER_URL);
-
- if (StringUtils.isBlank(serverURL)) {
- log.warn("ServerURLTag unable to write out server URL as it is missing from the configuration file.");
- }
-
- return serverURL;
- }
-
- public ILamsToolService getToolService() {
- WebApplicationContext webContext = WebApplicationContextUtils
- .getRequiredWebApplicationContext(this.getServlet().getServletContext());
- return (ILamsToolService) webContext.getBean(AuthoringConstants.TOOL_SERVICE_BEAN_NAME);
- }
-
- /**
- * Get LogEventService bean
- */
- private ILogEventService getLogEventService() {
- if (logEventService == null) {
- WebApplicationContext ctx = WebApplicationContextUtils
- .getRequiredWebApplicationContext(getServlet().getServletContext());
- logEventService = (ILogEventService) ctx.getBean("logEventService");
- }
- return logEventService;
- }
-
- /**
- * Find a tool's service registered inside lams.
- *
- * @param signature
- * the tool signature.
- * @return the service object from tool.
- * @throws NoSuchBeanDefinitionException
- * if the tool is not the classpath or the supplied service name is wrong.
- */
- public Object findToolService(String signature) throws NoSuchBeanDefinitionException {
- IToolVO tool = getToolService().getToolBySignature(signature);
- WebApplicationContext webContext = WebApplicationContextUtils
- .getRequiredWebApplicationContext(this.getServlet().getServletContext());
- return webContext.getBean(tool.getServiceName());
- }
-}
+///****************************************************************
+// * 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.0
+// * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+// * USA
+// *
+// * http://www.gnu.org/licenses/gpl.txt
+// * ****************************************************************
+// */
+//
+//
+//package org.lamsfoundation.lams.authoring.web;
+//
+//import java.io.IOException;
+//import java.net.URLEncoder;
+//
+//import javax.servlet.ServletException;
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//import javax.servlet.http.HttpSession;
+//
+//import org.apache.commons.lang.StringUtils;
+//import org.apache.log4j.Logger;
+//import org.apache.struts.action.Action;
+//import org.apache.struts.action.ActionForm;
+//import org.apache.struts.action.ActionForward;
+//import org.apache.struts.action.ActionMapping;
+//import org.lamsfoundation.lams.logevent.service.ILogEventService;
+//import org.lamsfoundation.lams.tool.IToolVO;
+//import org.lamsfoundation.lams.tool.ToolAccessMode;
+//import org.lamsfoundation.lams.tool.ToolContentManager;
+//import org.lamsfoundation.lams.tool.service.ILamsToolService;
+//import org.lamsfoundation.lams.util.Configuration;
+//import org.lamsfoundation.lams.util.ConfigurationKeys;
+//import org.lamsfoundation.lams.util.WebUtil;
+//import org.lamsfoundation.lams.web.util.AttributeNames;
+//import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+//import org.springframework.web.context.WebApplicationContext;
+//import org.springframework.web.context.support.WebApplicationContextUtils;
+//
+///**
+// * This action class does some process when author try to save/cancel/close authoring tool pages. If author try to save
+// * tool page, this action will redirct tool page to confirm page and execute clearSession() method. If author try to
+// * cancel/close window, this action will execute clearSession().
+// *
+// * @author Steve.Ni
+// */
+//public abstract class LamsAuthoringFinishAction extends Action {
+// private static Logger log = Logger.getLogger(LamsAuthoringFinishAction.class);
+//
+// private static final String ACTION_NAME = "action";
+// private static final String ACTION_MODE = "mode";
+// private static final String CUSTOMISE_SESSION_ID = "customiseSessionID";
+// private static final String TOOL_SIGNATURE = "signature";
+//
+// private static final String CONFIRM_ACTION = "confirm";
+// private static final String CANCEL_ACTION = "cancel";
+// private static final String DEFINE_LATER_ACTION = "defineLater";
+//
+// private static final String RE_EDIT_URL = "reEditUrl";
+//
+// private static ILogEventService logEventService;
+//
+// /**
+// * Action method, will handle save/cancel action.
+// */
+// @Override
+// public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+// HttpServletResponse response) throws IOException, ServletException {
+// String action = request.getParameter(ACTION_NAME);
+// ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, ACTION_MODE, false);
+// String cSessionID = request.getParameter(CUSTOMISE_SESSION_ID);
+// String notifyCloseURL = (String) request.getSession().getAttribute(AttributeNames.PARAM_NOTIFY_CLOSE_URL);
+// Long toolContentId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID));
+//
+// // clear session according to the ToolAccessMode.
+// clearSession(cSessionID, request.getSession(), mode);
+//
+// //CONFIRM_ACTION got fired only for general authoring and not for define later one
+// if (StringUtils.equals(action, CONFIRM_ACTION)) {
+// String nextUrl = getLamsUrl() + "authoringConfirm.jsp";
+// String signature = request.getParameter(TOOL_SIGNATURE);
+//
+// String contentFolderID = "TODO_remove-change_optional_to_false";
+// contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID, true);
+//
+// // check whether it use on define it later page
+// IToolVO tool = getToolService().getToolBySignature(signature);
+//
+// //add reeditUrl parameter
+// String reeditUrl = WebUtil.appendParameterToURL(getLamsUrl() + tool.getAuthorUrl(),
+// AttributeNames.PARAM_TOOL_CONTENT_ID, toolContentId.toString());
+// reeditUrl = WebUtil.appendParameterToURL(reeditUrl, AttributeNames.PARAM_CONTENT_FOLDER_ID,
+// contentFolderID);
+// if ( notifyCloseURL != null && notifyCloseURL.length() > 0 )
+// reeditUrl = WebUtil.appendParameterToURL(reeditUrl, AttributeNames.PARAM_NOTIFY_CLOSE_URL, notifyCloseURL);
+// nextUrl = WebUtil.appendParameterToURL(nextUrl, RE_EDIT_URL, URLEncoder.encode(reeditUrl, "UTF-8"));
+//
+// if (!StringUtils.isBlank(notifyCloseURL)) {
+// nextUrl = WebUtil.appendParameterToURL(nextUrl, AttributeNames.PARAM_NOTIFY_CLOSE_URL, notifyCloseURL);
+// }
+// response.sendRedirect(nextUrl);
+// }
+//
+// //audit log content has been finished being edited
+// if (StringUtils.equals(action, DEFINE_LATER_ACTION)) {
+// getLogEventService().logFinishEditingActivityInMonitor(toolContentId);
+// }
+//
+// //reset defineLater task
+// if (StringUtils.equals(action, CANCEL_ACTION) && mode.isTeacher()) {
+// String signature = request.getParameter(TOOL_SIGNATURE);
+//
+// ToolContentManager contentManager = (ToolContentManager) findToolService(signature);
+// contentManager.resetDefineLater(toolContentId);
+//
+// getLogEventService().logCancelEditingActivityInMonitor(toolContentId);
+// }
+//
+// return null;
+// }
+//
+// /**
+// * All subclass will implements this method and execute clear HttpSession
action to remove obsolete
+// * session values.
+// *
+// * @param customiseSessionID
+// * customised session ID.
+// * @param session
+// * @param mode
+// * ToolAccessMode to decide which role's session will be clear.
+// */
+// abstract public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode);
+//
+// // ---------------------------------------------------------------------
+// // Helper Methods
+// // ---------------------------------------------------------------------
+//
+// private String getLamsUrl() {
+// String serverURL = Configuration.get(ConfigurationKeys.SERVER_URL);
+//
+// if (StringUtils.isBlank(serverURL)) {
+// log.warn("ServerURLTag unable to write out server URL as it is missing from the configuration file.");
+// }
+//
+// return serverURL;
+// }
+//
+// public ILamsToolService getToolService() {
+// WebApplicationContext webContext = WebApplicationContextUtils
+// .getRequiredWebApplicationContext(this.getServlet().getServletContext());
+// return (ILamsToolService) webContext.getBean(AuthoringConstants.TOOL_SERVICE_BEAN_NAME);
+// }
+//
+// /**
+// * Get LogEventService bean
+// */
+// private ILogEventService getLogEventService() {
+// if (logEventService == null) {
+// WebApplicationContext ctx = WebApplicationContextUtils
+// .getRequiredWebApplicationContext(getServlet().getServletContext());
+// logEventService = (ILogEventService) ctx.getBean("logEventService");
+// }
+// return logEventService;
+// }
+//
+// /**
+// * Find a tool's service registered inside lams.
+// *
+// * @param signature
+// * the tool signature.
+// * @return the service object from tool.
+// * @throws NoSuchBeanDefinitionException
+// * if the tool is not the classpath or the supplied service name is wrong.
+// */
+// public Object findToolService(String signature) throws NoSuchBeanDefinitionException {
+// IToolVO tool = getToolService().getToolBySignature(signature);
+// WebApplicationContext webContext = WebApplicationContextUtils
+// .getRequiredWebApplicationContext(this.getServlet().getServletContext());
+// return webContext.getBean(tool.getServiceName());
+// }
+//}
Index: lams_central/src/java/org/lamsfoundation/lams/web/LAMSUploadServlet.java
===================================================================
diff -u -r1c001afed4496daabc08f0b83a4118458d400e5a -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/src/java/org/lamsfoundation/lams/web/LAMSUploadServlet.java (.../LAMSUploadServlet.java) (revision 1c001afed4496daabc08f0b83a4118458d400e5a)
+++ lams_central/src/java/org/lamsfoundation/lams/web/LAMSUploadServlet.java (.../LAMSUploadServlet.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -21,12 +21,10 @@
import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import org.apache.log4j.Logger;
-import org.apache.struts.action.ActionMessage;
import org.lamsfoundation.lams.util.Configuration;
import org.lamsfoundation.lams.util.ConfigurationKeys;
import org.lamsfoundation.lams.util.FileUtil;
import org.lamsfoundation.lams.util.FileValidatorSpringUtil;
-import org.lamsfoundation.lams.util.FileValidatorUtil;
import org.lamsfoundation.lams.util.MessageService;
import org.lamsfoundation.lams.util.UploadFileUtil;
import org.springframework.web.context.WebApplicationContext;
@@ -51,9 +49,10 @@
private static final long serialVersionUID = 7839808388592495717L;
private static final Logger log = Logger.getLogger(LAMSUploadServlet.class);
-
+
private static MessageService messageService;
-
+
+ @Override
public void init() {
WebApplicationContext ctx = WebApplicationContextUtils
.getRequiredWebApplicationContext(this.getServletContext());
@@ -92,7 +91,7 @@
DiskFileUpload upload = new DiskFileUpload();
try {
List items = upload.parseRequest(request);
- Map fields = new HashMap();
+ Map fields = new HashMap<>();
Iterator iter = items.iterator();
while (iter.hasNext()) {
@@ -118,12 +117,12 @@
boolean maxFilesizeExceededMessage = FileValidatorSpringUtil.validateFileSize(uplFile, true);
if (!maxFilesizeExceededMessage) {
fileName = messageService.getMessage("errors.maxfilesize",
- new Object[] { Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE) });
+ new Object[] { Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE) });
- // validate file extension
- } else if (!FileUtil.isExtensionAllowed(fileType, fileName)) {
+ // validate file extension
+ } else if (!FileUtil.isExtensionAllowed(fileType, fileName)) {
returnMessage = "Invalid file type";
-
+
} else {
File uploadDir = UploadFileUtil.getUploadDir(currentFolderStr, fileType);
fileName = UploadFileUtil.getUploadFileName(uploadDir, fileName);
Index: lams_central/src/java/org/lamsfoundation/lams/web/PortraitSaveController.java
===================================================================
diff -u -ra127989b08183726fcbb9956721eff6553c4a0eb -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/src/java/org/lamsfoundation/lams/web/PortraitSaveController.java (.../PortraitSaveController.java) (revision a127989b08183726fcbb9956721eff6553c4a0eb)
+++ lams_central/src/java/org/lamsfoundation/lams/web/PortraitSaveController.java (.../PortraitSaveController.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -90,7 +90,7 @@
MultiValueMap errorMap = new LinkedMultiValueMap<>();
MultipartFile file = portraitForm.getFile();
- String fileName = file.getName();
+ String fileName = file.getOriginalFilename();
log.debug("got file: " + fileName + " of type: " + file.getContentType() + " with size: " + file.getSize());
User user = service.getUserByLogin(request.getRemoteUser());
Index: lams_central/src/java/org/lamsfoundation/lams/web/ProfileController.java
===================================================================
diff -u -r0e9eca8da006863730e793b75a47803bc6142c67 -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/src/java/org/lamsfoundation/lams/web/ProfileController.java (.../ProfileController.java) (revision 0e9eca8da006863730e793b75a47803bc6142c67)
+++ lams_central/src/java/org/lamsfoundation/lams/web/ProfileController.java (.../ProfileController.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -217,6 +217,9 @@
locale = LanguageUtil.getDefaultLocale();
}
userForm.setLocaleId(locale.getLocaleId());
+ if (locales == null) {
+ locales = service.findAll(SupportedLocale.class);
+ }
request.setAttribute("locales", locales);
// Get all the css themes
Index: lams_central/src/java/org/lamsfoundation/lams/web/TextSearchActionForm.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/src/java/org/lamsfoundation/lams/web/TextSearchActionForm.java (.../TextSearchActionForm.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_central/src/java/org/lamsfoundation/lams/web/TextSearchActionForm.java (.../TextSearchActionForm.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -1,100 +1,100 @@
-/****************************************************************
- * 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.0
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-package org.lamsfoundation.lams.web;
-
-import org.apache.struts.action.ActionForm;
-import org.lamsfoundation.lams.learningdesign.TextSearchCondition;
-
-/**
- * The form that contains all the fields provided in lams:TextSearch
tag.
- *
- * @author Marcin Cieslak
- *
- *
- */
-public class TextSearchActionForm extends ActionForm {
-
- public static final String formName = "TextSearchActionForm";
- private String allWords;
- private String phrase;
- private String anyWords;
- private String excludedWords;
- private String sessionMapID;
-
- public TextSearchActionForm() {
- }
-
- /**
- * Fills the form with data provided by condition.
- *
- * @param condition
- * condition to read the data from
- */
- public void populateForm(TextSearchCondition condition) {
- allWords = condition.getAllWords();
- phrase = condition.getPhrase();
- anyWords = condition.getAnyWords();
- excludedWords = condition.getExcludedWords();
- }
-
- public String getAllWords() {
- return allWords;
- }
-
- public void setAllWords(String allWords) {
- this.allWords = allWords;
- }
-
- public String getPhrase() {
- return phrase;
- }
-
- public void setPhrase(String phrase) {
- this.phrase = phrase;
- }
-
- public String getAnyWords() {
- return anyWords;
- }
-
- public void setAnyWords(String anyWords) {
- this.anyWords = anyWords;
- }
-
- public String getExcludedWords() {
- return excludedWords;
- }
-
- public void setExcludedWords(String excludedWords) {
- this.excludedWords = excludedWords;
- }
-
- public String getSessionMapID() {
- return sessionMapID;
- }
-
- public void setSessionMapID(String sessionMapID) {
- this.sessionMapID = sessionMapID;
- }
-}
\ No newline at end of file
+///****************************************************************
+// * 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.0
+// * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+// * USA
+// *
+// * http://www.gnu.org/licenses/gpl.txt
+// * ****************************************************************
+// */
+//
+//package org.lamsfoundation.lams.web;
+//
+//import org.apache.struts.action.ActionForm;
+//import org.lamsfoundation.lams.learningdesign.TextSearchCondition;
+//
+///**
+// * The form that contains all the fields provided in lams:TextSearch
tag.
+// *
+// * @author Marcin Cieslak
+// *
+// *
+// */
+//public class TextSearchActionForm extends ActionForm {
+//
+// public static final String formName = "TextSearchActionForm";
+// private String allWords;
+// private String phrase;
+// private String anyWords;
+// private String excludedWords;
+// private String sessionMapID;
+//
+// public TextSearchActionForm() {
+// }
+//
+// /**
+// * Fills the form with data provided by condition.
+// *
+// * @param condition
+// * condition to read the data from
+// */
+// public void populateForm(TextSearchCondition condition) {
+// allWords = condition.getAllWords();
+// phrase = condition.getPhrase();
+// anyWords = condition.getAnyWords();
+// excludedWords = condition.getExcludedWords();
+// }
+//
+// public String getAllWords() {
+// return allWords;
+// }
+//
+// public void setAllWords(String allWords) {
+// this.allWords = allWords;
+// }
+//
+// public String getPhrase() {
+// return phrase;
+// }
+//
+// public void setPhrase(String phrase) {
+// this.phrase = phrase;
+// }
+//
+// public String getAnyWords() {
+// return anyWords;
+// }
+//
+// public void setAnyWords(String anyWords) {
+// this.anyWords = anyWords;
+// }
+//
+// public String getExcludedWords() {
+// return excludedWords;
+// }
+//
+// public void setExcludedWords(String excludedWords) {
+// this.excludedWords = excludedWords;
+// }
+//
+// public String getSessionMapID() {
+// return sessionMapID;
+// }
+//
+// public void setSessionMapID(String sessionMapID) {
+// this.sessionMapID = sessionMapID;
+// }
+//}
\ No newline at end of file
Index: lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerActivityForm.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerActivityForm.java (.../PedagogicalPlannerActivityForm.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerActivityForm.java (.../PedagogicalPlannerActivityForm.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -1,114 +1,114 @@
-/****************************************************************
- * 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.0
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-package org.lamsfoundation.lams.web.planner;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionMessages;
-
-/**
- * The base for any Pedagogical Planner Action Forms that other activities. All Java forms need to inherit from this
- * class and forms on JSP pages need to have these properties declared as hidden elements.
- *
- * @author Marcin Cieslak
- *
- */
-public abstract class PedagogicalPlannerActivityForm extends ActionForm {
- /**
- * Set when opening a Learning Design.
- */
- private Integer activityOrderNumber;
- private Long toolContentID;
- /**
- * Set in {@link #validate()} method.
- */
- private Boolean valid = true;
- /**
- * Set when submitting form in base.jsp page.
- */
- private Integer callID;
-
- /**
- * Only to save. It is loaded straight from the tool.
- */
- private String editingAdvice;
-
- public Long getToolContentID() {
- return toolContentID;
- }
-
- public void setToolContentID(Long toolContentID) {
- this.toolContentID = toolContentID;
- }
-
- public Boolean getValid() {
- return valid;
- }
-
- public void setValid(Boolean valid) {
- this.valid = valid;
- }
-
- public Integer getCallID() {
- return callID;
- }
-
- public void setCallID(Integer callID) {
- this.callID = callID;
- }
-
- @Override
- public void reset(ActionMapping mapping, HttpServletRequest request) {
- super.reset(mapping, request);
- setValid(true);
- }
-
- /**
- * Validates form. Must set {@link #valid} property. Can be overriden by inheriting classes, although call to this
- * method is only in activities themselves (and not on a higher level like lams_central).
- *
- * @return
- */
- public ActionMessages validate() {
- setValid(true);
- return new ActionMessages();
- }
-
- public Integer getActivityOrderNumber() {
- return activityOrderNumber;
- }
-
- public void setActivityOrderNumber(Integer activityOrderNumber) {
- this.activityOrderNumber = activityOrderNumber;
- }
-
- public String getEditingAdvice() {
- return editingAdvice;
- }
-
- public void setEditingAdvice(String editingAdvice) {
- this.editingAdvice = editingAdvice;
- }
-}
\ No newline at end of file
+///****************************************************************
+// * 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.0
+// * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA
+// *
+// * http://www.gnu.org/licenses/gpl.txt
+// * ****************************************************************
+// */
+//
+//package org.lamsfoundation.lams.web.planner;
+//
+//import javax.servlet.http.HttpServletRequest;
+//
+//import org.apache.struts.action.ActionForm;
+//import org.apache.struts.action.ActionMapping;
+//import org.apache.struts.action.ActionMessages;
+//
+///**
+// * The base for any Pedagogical Planner Action Forms that other activities. All Java forms need to inherit from this
+// * class and forms on JSP pages need to have these properties declared as hidden elements.
+// *
+// * @author Marcin Cieslak
+// *
+// */
+//public abstract class PedagogicalPlannerActivityForm extends ActionForm {
+// /**
+// * Set when opening a Learning Design.
+// */
+// private Integer activityOrderNumber;
+// private Long toolContentID;
+// /**
+// * Set in {@link #validate()} method.
+// */
+// private Boolean valid = true;
+// /**
+// * Set when submitting form in base.jsp page.
+// */
+// private Integer callID;
+//
+// /**
+// * Only to save. It is loaded straight from the tool.
+// */
+// private String editingAdvice;
+//
+// public Long getToolContentID() {
+// return toolContentID;
+// }
+//
+// public void setToolContentID(Long toolContentID) {
+// this.toolContentID = toolContentID;
+// }
+//
+// public Boolean getValid() {
+// return valid;
+// }
+//
+// public void setValid(Boolean valid) {
+// this.valid = valid;
+// }
+//
+// public Integer getCallID() {
+// return callID;
+// }
+//
+// public void setCallID(Integer callID) {
+// this.callID = callID;
+// }
+//
+// @Override
+// public void reset(ActionMapping mapping, HttpServletRequest request) {
+// super.reset(mapping, request);
+// setValid(true);
+// }
+//
+// /**
+// * Validates form. Must set {@link #valid} property. Can be overriden by inheriting classes, although call to this
+// * method is only in activities themselves (and not on a higher level like lams_central).
+// *
+// * @return
+// */
+// public ActionMessages validate() {
+// setValid(true);
+// return new ActionMessages();
+// }
+//
+// public Integer getActivityOrderNumber() {
+// return activityOrderNumber;
+// }
+//
+// public void setActivityOrderNumber(Integer activityOrderNumber) {
+// this.activityOrderNumber = activityOrderNumber;
+// }
+//
+// public String getEditingAdvice() {
+// return editingAdvice;
+// }
+//
+// public void setEditingAdvice(String editingAdvice) {
+// this.editingAdvice = editingAdvice;
+// }
+//}
\ No newline at end of file
Index: lams_central/src/java/org/lamsfoundation/lams/web/tag/HtmlTag.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_central/src/java/org/lamsfoundation/lams/web/tag/HtmlTag.java (.../HtmlTag.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_central/src/java/org/lamsfoundation/lams/web/tag/HtmlTag.java (.../HtmlTag.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -21,7 +21,6 @@
* ****************************************************************
*/
-
package org.lamsfoundation.lams.web.tag;
import java.io.IOException;
@@ -35,7 +34,6 @@
import javax.servlet.jsp.tagext.TagSupport;
import org.apache.log4j.Logger;
-import org.apache.struts.Globals;
import org.lamsfoundation.lams.web.filter.LocaleFilter;
/**
@@ -96,7 +94,6 @@
if (this.xhtml) {
// for struts compatibility
- this.pageContext.setAttribute(Globals.XHTML_KEY, "true", PageContext.PAGE_SCOPE);
sb.append(" xmlns=\"http://www.w3.org/1999/xhtml\"");
}
Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/TextSearchCondition.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_common/src/java/org/lamsfoundation/lams/learningdesign/TextSearchCondition.java (.../TextSearchCondition.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/TextSearchCondition.java (.../TextSearchCondition.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -20,7 +20,6 @@
* ****************************************************************
*/
-
package org.lamsfoundation.lams.learningdesign;
import java.util.ArrayList;
@@ -32,7 +31,7 @@
import org.apache.log4j.Logger;
import org.lamsfoundation.lams.learningdesign.dto.TextSearchConditionDTO;
import org.lamsfoundation.lams.tool.ToolOutput;
-import org.lamsfoundation.lams.web.TextSearchActionForm;
+import org.lamsfoundation.lams.web.TextSearchForm;
/**
* Condition that is based on text search. Several properties set what needs to be found in a tool output. Based on the
@@ -88,7 +87,7 @@
/**
* Property {@link #allWords} divided into words.
*/
- protected List allWordsCondition = new ArrayList();
+ protected List allWordsCondition = new ArrayList<>();
/**
* Property {@link #phrase} divided into words. Although we are looking for the whole phrase, spaces between words
* should be divided into something more regex'y.
@@ -97,11 +96,11 @@
/**
* Property {@link #anyWords} divided into words.
*/
- protected List anyWordsCondition = new ArrayList();
+ protected List anyWordsCondition = new ArrayList<>();
/**
* Property {@link #excludedWords} divided into words.
*/
- protected List excludedWordsCondition = new ArrayList();
+ protected List excludedWordsCondition = new ArrayList<>();
public TextSearchCondition() {
super();
@@ -287,7 +286,7 @@
* @param textSearchActionForm
* form to parse
*/
- public void parseConditionStrings(TextSearchActionForm textSearchActionForm) {
+ public void parseConditionStrings(TextSearchForm textSearchActionForm) {
parseConditionStrings(textSearchActionForm.getAllWords(), textSearchActionForm.getPhrase(),
textSearchActionForm.getAnyWords(), textSearchActionForm.getExcludedWords());
}
@@ -347,7 +346,7 @@
List list = null;
if (!StringUtils.isEmpty(sentence)) {
String[] splitted = sentence.trim().split(regex);
- list = new ArrayList(splitted.length);
+ list = new ArrayList<>(splitted.length);
// we don't need empty words
for (String word : splitted) {
if (!StringUtils.isEmpty(word)) {
Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/ClearSessionAction.java
===================================================================
diff -u -r792f30e164500b758d9eeac2dcf19853be4dfd9f -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/ClearSessionAction.java (.../ClearSessionAction.java) (revision 792f30e164500b758d9eeac2dcf19853be4dfd9f)
+++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/ClearSessionAction.java (.../ClearSessionAction.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -1,45 +1,45 @@
-/****************************************************************
- * 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.0
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-package org.lamsfoundation.lams.tool.assessment.web.action;
-
-import javax.servlet.http.HttpSession;
-
-import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
-import org.lamsfoundation.lams.tool.ToolAccessMode;
-
-/**
- * This class give a chance to clear HttpSession when user save/close authoring page.
- *
- * @author Steve.Ni
- *
- * @version $Revision$
- */
-public class ClearSessionAction extends LamsAuthoringFinishAction {
-
- @Override
- public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
- session.removeAttribute(customiseSessionID);
- }
-
-}
+///****************************************************************
+// * 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.0
+// * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+// * USA
+// *
+// * http://www.gnu.org/licenses/gpl.txt
+// * ****************************************************************
+// */
+//
+//package org.lamsfoundation.lams.tool.assessment.web.action;
+//
+//import javax.servlet.http.HttpSession;
+//
+//import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+//import org.lamsfoundation.lams.tool.ToolAccessMode;
+//
+///**
+// * This class give a chance to clear HttpSession when user save/close authoring page.
+// *
+// * @author Steve.Ni
+// *
+// * @version $Revision$
+// */
+//public class ClearSessionAction extends LamsAuthoringFinishAction {
+//
+// @Override
+// public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
+// session.removeAttribute(customiseSessionID);
+// }
+//
+//}
Index: lams_tool_bbb/src/java/org/lamsfoundation/lams/tool/bbb/web/actions/ClearSessionAction.java
===================================================================
diff -u -r792f30e164500b758d9eeac2dcf19853be4dfd9f -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_tool_bbb/src/java/org/lamsfoundation/lams/tool/bbb/web/actions/ClearSessionAction.java (.../ClearSessionAction.java) (revision 792f30e164500b758d9eeac2dcf19853be4dfd9f)
+++ lams_tool_bbb/src/java/org/lamsfoundation/lams/tool/bbb/web/actions/ClearSessionAction.java (.../ClearSessionAction.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -1,51 +1,51 @@
-/****************************************************************
- * 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.0
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-package org.lamsfoundation.lams.tool.bbb.web.actions;
-
-import javax.servlet.http.HttpSession;
-
-import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
-import org.lamsfoundation.lams.tool.ToolAccessMode;
-
-/**
- * This class give a chance to clear HttpSession when user save/close authoring page.
- *
- * @author Steve.Ni
- *
- *
- *
- *
- *
- * @version $Revision$
- */
-public class ClearSessionAction extends LamsAuthoringFinishAction {
-
- @Override
- public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
- if (mode.isAuthor()) {
- session.removeAttribute(customiseSessionID);
- }
- }
-
-}
+///****************************************************************
+// * 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.0
+// * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+// * USA
+// *
+// * http://www.gnu.org/licenses/gpl.txt
+// * ****************************************************************
+// */
+//
+//package org.lamsfoundation.lams.tool.bbb.web.actions;
+//
+//import javax.servlet.http.HttpSession;
+//
+//import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+//import org.lamsfoundation.lams.tool.ToolAccessMode;
+//
+///**
+// * This class give a chance to clear HttpSession when user save/close authoring page.
+// *
+// * @author Steve.Ni
+// *
+// *
+// *
+// *
+// *
+// * @version $Revision$
+// */
+//public class ClearSessionAction extends LamsAuthoringFinishAction {
+//
+// @Override
+// public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
+// if (mode.isAuthor()) {
+// session.removeAttribute(customiseSessionID);
+// }
+// }
+//
+//}
Index: lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/actions/ClearSessionAction.java
===================================================================
diff -u -r792f30e164500b758d9eeac2dcf19853be4dfd9f -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/actions/ClearSessionAction.java (.../ClearSessionAction.java) (revision 792f30e164500b758d9eeac2dcf19853be4dfd9f)
+++ lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/actions/ClearSessionAction.java (.../ClearSessionAction.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -1,55 +1,55 @@
-/****************************************************************
- * Copyright (C) 2008 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.0
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-package org.lamsfoundation.lams.tool.gmap.web.actions;
-
-import javax.servlet.http.HttpSession;
-
-import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
-import org.lamsfoundation.lams.tool.ToolAccessMode;
-
-/**
- * This class give a chance to clear HttpSession when user save/close authoring page.
- *
- * @author lfoxton
- *
- *
- *
- *
- * @version $Revision$
- */
-public class ClearSessionAction extends LamsAuthoringFinishAction {
-
- @Override
- public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
-
- if (mode.isAuthor()) {
- session.removeAttribute(customiseSessionID);
- }
-
- if (mode.isTeacher()) {
-
- }
- }
-
-}
+///****************************************************************
+// * Copyright (C) 2008 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.0
+// * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+// * USA
+// *
+// * http://www.gnu.org/licenses/gpl.txt
+// * ****************************************************************
+// */
+//
+//package org.lamsfoundation.lams.tool.gmap.web.actions;
+//
+//import javax.servlet.http.HttpSession;
+//
+//import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+//import org.lamsfoundation.lams.tool.ToolAccessMode;
+//
+///**
+// * This class give a chance to clear HttpSession when user save/close authoring page.
+// *
+// * @author lfoxton
+// *
+// *
+// *
+// *
+// * @version $Revision$
+// */
+//public class ClearSessionAction extends LamsAuthoringFinishAction {
+//
+// @Override
+// public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
+//
+// if (mode.isAuthor()) {
+// session.removeAttribute(customiseSessionID);
+// }
+//
+// if (mode.isTeacher()) {
+//
+// }
+// }
+//
+//}
Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/ClearSessionAction.java
===================================================================
diff -u -r792f30e164500b758d9eeac2dcf19853be4dfd9f -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/ClearSessionAction.java (.../ClearSessionAction.java) (revision 792f30e164500b758d9eeac2dcf19853be4dfd9f)
+++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/ClearSessionAction.java (.../ClearSessionAction.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -1,45 +1,45 @@
-/****************************************************************
- * 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.0
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-package org.lamsfoundation.lams.tool.peerreview.web.action;
-
-import javax.servlet.http.HttpSession;
-
-import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
-import org.lamsfoundation.lams.tool.ToolAccessMode;
-
-/**
- * This class give a chance to clear HttpSession when user save/close authoring page.
- *
- * @author Steve.Ni
- */
-public class ClearSessionAction extends LamsAuthoringFinishAction {
-
- @Override
- public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
- if (mode.isAuthor()) {
- session.removeAttribute(customiseSessionID);
- }
- }
-
-}
+///****************************************************************
+// * 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.0
+// * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+// * USA
+// *
+// * http://www.gnu.org/licenses/gpl.txt
+// * ****************************************************************
+// */
+//
+//package org.lamsfoundation.lams.tool.peerreview.web.action;
+//
+//import javax.servlet.http.HttpSession;
+//
+//import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+//import org.lamsfoundation.lams.tool.ToolAccessMode;
+//
+///**
+// * This class give a chance to clear HttpSession when user save/close authoring page.
+// *
+// * @author Steve.Ni
+// */
+//public class ClearSessionAction extends LamsAuthoringFinishAction {
+//
+// @Override
+// public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) {
+// if (mode.isAuthor()) {
+// session.removeAttribute(customiseSessionID);
+// }
+// }
+//
+//}
Index: lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/form/SubmitFilesPedagogicalPlannerForm.java
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r0ba7efc96c3f73335301e3e9fbde3129867efd3d
--- lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/form/SubmitFilesPedagogicalPlannerForm.java (.../SubmitFilesPedagogicalPlannerForm.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/form/SubmitFilesPedagogicalPlannerForm.java (.../SubmitFilesPedagogicalPlannerForm.java) (revision 0ba7efc96c3f73335301e3e9fbde3129867efd3d)
@@ -20,11 +20,9 @@
* ****************************************************************
*/
-
package org.lamsfoundation.lams.tool.sbmt.web.form;
import org.lamsfoundation.lams.tool.sbmt.SubmitFilesContent;
-import org.lamsfoundation.lams.web.planner.PedagogicalPlannerActivityForm;
import org.lamsfoundation.lams.web.planner.PedagogicalPlannerActivitySpringForm;
/**