Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/util/NbToolContentHandler.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/util/NbToolContentHandler.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/util/NbToolContentHandler.java 2 Aug 2005 06:31:09 -0000 1.1 @@ -0,0 +1,63 @@ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +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 +*/ +package org.lamsfoundation.lams.tool.noticeboard.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + * + */ +public class NbToolContentHandler extends ToolContentHandler { + + private static String repositoryWorkspaceName = "nbworkspace"; + private static String repositoryUser = "noticeboard"; + private static char[] repositoryId = {'l','a','m','s','-','n','b'}; + + /** + * + */ + public NbToolContentHandler() { + super(); + } + + /* (non-Javadoc) + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryWorkspaceName() + */ + public String getRepositoryWorkspaceName() { + return repositoryWorkspaceName; + } + + /* (non-Javadoc) + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryUser() + */ + public String getRepositoryUser() { + return repositoryUser; + } + + /* (non-Javadoc) + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryId() + */ + public char[] getRepositoryId() { + return repositoryId; + } + +} Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/util/NbWebUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/util/NbWebUtil.java,v diff -u -r1.2 -r1.3 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/util/NbWebUtil.java 22 Jul 2005 07:00:02 -0000 1.2 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/util/NbWebUtil.java 2 Aug 2005 06:31:09 -0000 1.3 @@ -28,7 +28,10 @@ */ package org.lamsfoundation.lams.tool.noticeboard.util; - +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.lamsfoundation.lams.tool.noticeboard.NbApplicationException; @@ -66,6 +69,7 @@ public static void cleanAuthoringSession(HttpServletRequest request) { request.getSession().removeAttribute(NoticeboardConstants.TOOL_CONTENT_ID); + request.getSession().removeAttribute(NoticeboardConstants.ATTACHMENT_LIST); } public static void cleanLearnerSession(HttpServletRequest request) @@ -119,4 +123,11 @@ request.getSession().setAttribute(NoticeboardConstants.ONLINE_INSTRUCTIONS, content.getOnlineInstructions()); request.getSession().setAttribute(NoticeboardConstants.OFFLINE_INSTRUCTIONS, content.getOfflineInstructions()); } + + public static void addUploadsToSession(HttpServletRequest request, Map map) + { + Collection entries = map.values(); + List attachmentList = new ArrayList(entries); + request.getSession().setAttribute(NoticeboardConstants.ATTACHMENT_LIST, attachmentList); + } } Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/Attic/ApplicationResources.properties,v diff -u -r1.8 -r1.9 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/ApplicationResources.properties 25 Jul 2005 07:05:19 -0000 1.8 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/ApplicationResources.properties 2 Aug 2005 06:35:23 -0000 1.9 @@ -6,6 +6,7 @@ button.basic=Basic button.advanced=Advanced button.instructions=Instructions +button.upload=Upload # Basic Page basic.title=Title: @@ -14,9 +15,18 @@ #Instructions Page instructions.onlineInstructions=Online Instructions: instructions.offlineInstructions=Offline Instructions: -instructions.uploadOnlineInstr=Upload Online Instructions: -instructions.uploadOfflineInstr=Upload Offline Instructions: +instructions.uploadOnlineInstr=Online Instructions File: +instructions.uploadOfflineInstr=Offline Instructions File: +instructions.type.online=Online +instructions.type.offline=Offline +label.filename=Filename +label.type=Type +label.view=View +label.download=Download +label.delete=Delete +label.attachments=Attachments + # ========== Learner Page ========== message.defineLaterSet=Please wait for the teacher to complete the contents of this activity message.runOfflineSet=This activity is not being done on the computer. Please see your instructor for details @@ -57,6 +67,6 @@ # --- AUTHORING --- # - +error.mandatoryField={0} field is mandatory. error.missingParam=Unable to continue. {0} is missing. error.exception.NbApplication=An internal error has occured with the Noticeboard Tool. If reporting this error, please report:
{0} \ No newline at end of file Index: lams_tool_nb/web/WEB-INF/struts-config.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/web/WEB-INF/Attic/struts-config.xml,v diff -u -r1.7 -r1.8 --- lams_tool_nb/web/WEB-INF/struts-config.xml 25 Jul 2005 07:06:18 -0000 1.7 +++ lams_tool_nb/web/WEB-INF/struts-config.xml 2 Aug 2005 06:38:56 -0000 1.8 @@ -55,7 +55,6 @@ type="org.lamsfoundation.lams.tool.noticeboard.web.NbLearnerStarterAction" name="NbLearnerForm" scope="session" - input=".learnerStarter" parameter="mode" unknown="false" validate="false" @@ -216,7 +215,6 @@ type="org.lamsfoundation.lams.tool.noticeboard.web.NbMonitoringStarterAction" name="NbMonitoringForm" scope="session" - input=".monitoringStarter" unknown="false" validate="false" >