Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java =================================================================== diff -u -r921d5ae728a6028102ef819609c1317740e1b655 -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java (.../NbAuthoringAction.java) (revision 921d5ae728a6028102ef819609c1317740e1b655) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java (.../NbAuthoringAction.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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 =================================================================== diff -u -r6764496fb69cd36d5dfc21a71c8fd149d597bdfc -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java (.../NbAuthoringForm.java) (revision 6764496fb69cd36d5dfc21a71c8fd149d597bdfc) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java (.../NbAuthoringForm.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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 =================================================================== diff -u -re4d4a2acc7422eac6d9c5a77e766b0e01baead3e -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java (.../NbAuthoringStarterAction.java) (revision e4d4a2acc7422eac6d9c5a77e766b0e01baead3e) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringStarterAction.java (.../NbAuthoringStarterAction.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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 =================================================================== diff -u -rec20894931b8570225f034b05cb2b138d15ad9ca -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportAction.java (.../NbExportAction.java) (revision ec20894931b8570225f034b05cb2b138d15ad9ca) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportAction.java (.../NbExportAction.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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 =================================================================== diff -u -r9a7348df6727fa4722c80d0a5bc8c9ac5f2b4bbf -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportForm.java (.../NbExportForm.java) (revision 9a7348df6727fa4722c80d0a5bc8c9ac5f2b4bbf) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbExportForm.java (.../NbExportForm.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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 =================================================================== diff -u -r11a60fd5a77586f460e73d8a3a868a2b37a46da9 -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerAction.java (.../NbLearnerAction.java) (revision 11a60fd5a77586f460e73d8a3a868a2b37a46da9) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerAction.java (.../NbLearnerAction.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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 =================================================================== diff -u -r164eca9ad1cf2d9a3618f49a276f234973ca149f -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java (.../NbLearnerStarterAction.java) (revision 164eca9ad1cf2d9a3618f49a276f234973ca149f) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbLearnerStarterAction.java (.../NbLearnerStarterAction.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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 =================================================================== diff -u -rd7c610c5b91e34e8df72128ee715cdb49f45c047 -r1566cb0a7fb8f469bbe803d4a3f86e01069ed50b --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java (.../NbMonitoringAction.java) (revision d7c610c5b91e34e8df72128ee715cdb49f45c047) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java (.../NbMonitoringAction.java) (revision 1566cb0a7fb8f469bbe803d4a3f86e01069ed50b) @@ -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