Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java,v diff -u -r1.12 -r1.13 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java 5 Aug 2005 01:32:41 -0000 1.12 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java 11 Aug 2005 05:15:21 -0000 1.13 @@ -57,6 +57,42 @@ /** * Creation Date: 20-05-05 * Modified Date: 03-06-05 + * + *

This Action class process any actions that are made by the user.

+ *
+ *

When the following buttons are pressed:
+ * NoticeboardConstants.BUTTON_BASIC, NoticeboardConstants.BUTTON_ADVANCED, + * NoticeboardConstants.BUTTON_INSTRUCTIONS or NoticeboardConstants.BUTTON_DONE,
+ * they switch between the tabs, but before doing so, they copy the values + * in the form (only if they are not null) and place them in the + * equivalent formbean properties (session scope). This is done so because the form + * is spread across two pages (basic and instructions, in Noticeboard tool, there is + * no Advanced page). It might be strange that all buttons forward to the same path, + * but the formbean property "method" keeps a track of what button was pressed. + * So when control returns to the jsp, it will determine the value of method and + * show the appropriate page.


+ * + *

The button NoticeboardConstants.BUTTON_UPLOAD triggers an upload and will + * upload either a file of type "ONLINE" or "OFFLINE", to the content repository + * and will save the file details (filename, toolcontent id, uuid, and filetype). + * It will also conduct checks + * to see whether the same file (and same type) has been uploaded or not. + * If the same file has been uploaded (to the same noticeboard instance, ie. same + * tool content id) then, it will delete the file from the content respository + * and delete that particular entry in the table, and then it the new version + * will be uploaded to the content repository and a new entry will be saved into + * the database. It then updates the attachment map that was initially setup + * by NbAuthoringStarterAction.


+ * + *

The button NoticeboardConstants.LINK_DELETE will trigger the deleteAttachment + * action which will delete a file from the content repository, and the entry from + * the attachment table.

+ * + *

The save method persist the values of the formbean properties + * title, instructions, onlineInstructions and offlineInstructions to + * the database

+ * + * * ----------------XDoclet Tags-------------------- * * @struts:action path="/authoring" name="NbAuthoringForm" scope="session" Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java,v diff -u -r1.8 -r1.9 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java 8 Aug 2005 00:26:22 -0000 1.8 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java 11 Aug 2005 05:15:21 -0000 1.9 @@ -54,8 +54,16 @@ //import org.lamsfoundation.lams.tool.noticeboard.NoticeboardConstants; /** - * ActionForm which holds the state of the noticeboard form content in the Authoring - * environment. Stores all values in the session scope. + *

ActionForm which holds the state of the noticeboard form content in the Authoring + * environment. Stores all values in the session scope.

+ * + *

The validate method does not check whether any of the input from + * title, content, onlineInstructions, offlineInstructions are empty or not. + * This is because I have encountered a situation where even though the field is + * empty, the FCKEditor places a
tag and so the validate method doesnt work. + * However, the validate method checks the length of the file that has been uploaded, + * the maximum filesize that can be uploaded is a property that is in the UploadFileUtil.

+ * */ /** Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/Attic/NbAuthoringStarterAction.java,v diff -u -r1.11 -r1.12 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java 10 Aug 2005 06:53:14 -0000 1.11 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java 11 Aug 2005 05:15:21 -0000 1.12 @@ -60,6 +60,30 @@ /** * Creation Date: 19-05-05 + * + *

This Action servlet, sets up the authoring environment, so that on entry + * when passed in the request parameter, toolContentId, it will look up whether + * there is an existing entry in the table with this tool content id. + * + *

If no entry is found, then it will assign this toolContentId with the values + * for its title, content, onlineInstructions and offlineInstructions fields with + * values the same as that of the default tool content. Otherwise, if this + * tool content id already exists in the table, then it will load up the existing + * values for its title, content, onlineInstructions and offlineInstructions. + * These values are placed in their respestive formbean properties in the session.

+ * + *

Also, it will initialise the attachment map, which is a map containing the + * online or offline files that have been uploaded along with this tool content id. + * It is then stored in the session.

+ * + *

If the request parameter "defineLater" exists, and set to true, then it denotes + * that this is the defineLater mode and which will only show the basic tab in + * the authoring environment. If the defineLater is set to true, then the respestive + * formbean property defineLater is also set.

+ * + *

This action is only called when first entering the authoring environment. + * For more information on how authoring works, + * see org.lamsfoundation.lams.tool.noticeboard.web.NbAuthoringAction.

* * ----------------XDoclet Tags-------------------- * @@ -77,7 +101,6 @@ * @struts:action-forward name="authoringContent" path=".authoringContent" * ----------------XDoclet Tags-------------------- */ - public class NbAuthoringStarterAction extends LamsAction { static Logger logger = Logger.getLogger(NbAuthoringAction.class.getName()); Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportAction.java,v diff -u -r1.2 -r1.3 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportAction.java 29 Jul 2005 05:13:40 -0000 1.2 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportAction.java 11 Aug 2005 05:15:21 -0000 1.3 @@ -1,8 +1,5 @@ /* * Created on Jul 25, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates */ package org.lamsfoundation.lams.tool.noticeboard.web; @@ -28,8 +25,11 @@ /** * @author mtruong * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates + * Export Portfolio functionality. + * + * With this noticeboard tool, + * both the learner and teacher will export the contents of the noticeboard. + * */ /** Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportForm.java,v diff -u -r1.1 -r1.2 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportForm.java 25 Jul 2005 07:04:25 -0000 1.1 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportForm.java 11 Aug 2005 05:15:21 -0000 1.2 @@ -12,7 +12,7 @@ /** * @author mtruong - * + * * ----------------XDoclet Tags-------------------- * * @struts:form name="NbExportForm" type="org.lamsfoundation.lams.tool.noticeboard.web.NbExportForm" Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerAction.java,v diff -u -r1.5 -r1.6 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerAction.java 10 Aug 2005 06:53:50 -0000 1.5 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerAction.java 11 Aug 2005 05:15:21 -0000 1.6 @@ -59,6 +59,14 @@ /** * Creation Date: 29-06-05 * + * This class has been created so that when a learner finishes an activity, + * leaveToolSession() will be called to inform the progress engine + * that the user has completed this activity. + * + * A note: at the time of writing (11-08-05) a null pointer exception + * occurs when making a call to leaveToolSession(). Will have to wait until + * the learner side of things is tested first. + * * ----------------XDoclet Tags-------------------- * * @struts:action path="/learner" name="NbLearnerForm" scope="session" type="org.lamsfoundation.lams.tool.noticeboard.web.NbLearnerAction" Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java,v diff -u -r1.8 -r1.9 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java 2 Aug 2005 06:35:13 -0000 1.8 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java 11 Aug 2005 05:15:21 -0000 1.9 @@ -61,7 +61,21 @@ import org.apache.struts.action.ActionMessage; /** * Creation Date: 27-06-05 + * + * The learner url can be of three modes learner, teacher or author. Depending on + * what mode was set, it will trigger the corresponding action. If the mode parameter + * is missing or a key is not found in the keymap, it will call the unspecified method + * which defaults to the learner action. * + *

The learner action, checks the defineLater and runOffline flags, and if required + * it will show the learner the message screen indicating a reason why they cant see + * the contents of the noticeboard. + * If none of the flags are set, then the learner is able to see the noticeboard. + *

+ *

The difference between author mode (which is basically the preview) + * is that if the defineLater flag is set, it will not be able to see the noticeboard screen + *

+ * * ----------------XDoclet Tags-------------------- * * @struts:action path="/starter/learner" name="NbLearnerForm" scope="session" type="org.lamsfoundation.lams.tool.noticeboard.web.NbLearnerStarterAction" Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java,v diff -u -r1.11 -r1.12 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java 8 Aug 2005 00:29:39 -0000 1.11 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java 11 Aug 2005 05:15:21 -0000 1.12 @@ -49,6 +49,10 @@ /** * @author mtruong + * + * The buttons are a switch between tabs and will forward to a jsp and display + * the appropriate page. + * * */ @@ -84,7 +88,10 @@ return map; } - + /** + * If no method parameter, or an unknown key, it will default to displaying + * the summary page. + */ public ActionForward unspecified( ActionMapping mapping, ActionForm form, @@ -93,8 +100,14 @@ { return summary(mapping, form, request, response); } - /** - * + + /** + * Will forward to the jsp + * and will display the edit activity page, which shows the content of the noticeboard + * and will show an edit button which allows an author to modify the noticeboard content. + * When this edit button is clicked, it appends defineLater=true to the authoring URL. + * However, if the contents is not editable (ie. the contents are in use which means a learner + * already reached the activity) it will display a message saying so. * @param mapping * @param form * @param request @@ -134,7 +147,12 @@ } /** - * + * Will forward to the jsp + * and will display the instructions page, which will just show the online and + * offline instructions and also the files that have been uploaded (view only mode). + * The attachment map is setup again in case there were changes made from the + * first time the monitoring url was called. + * * @param mapping * @param form * @param request @@ -172,7 +190,10 @@ } /** - * + * Will forward to the jsp + * and will display the summary page, which will show the contents of + * noticeboard. + * * @param mapping * @param form * @param request @@ -192,8 +213,11 @@ } /** - * - * @param mapping + * Will forward to the jsp + * and will display the statistics page which shows the number of users that + * have viewed this noticeboard. If grouping is applied, then the number of learners + * will also be sorted into groups. + * @param mapping * @param form * @param request * @param response