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.39.2.3 -r1.39.2.4 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java 11 May 2016 07:37:11 -0000 1.39.2.3 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java 4 Apr 2017 11:57:47 -0000 1.39.2.4 @@ -34,6 +34,7 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.util.MessageResources; import org.lamsfoundation.lams.authoring.web.AuthoringConstants; +import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.noticeboard.NbApplicationException; import org.lamsfoundation.lams.tool.noticeboard.NoticeboardConstants; import org.lamsfoundation.lams.tool.noticeboard.NoticeboardContent; @@ -47,38 +48,25 @@ import org.lamsfoundation.lams.web.util.AttributeNames; /** - * @author mtruong + *

+ * This class is a simple combination of NbAuthoringStarterAction and NbAuthoringAction. It has been created for the + * purpose of supporting the new authoring page which is done using DHTML. + *

* - *

- * This class is a simple combination of NbAuthoringStarterAction and NbAuthoringAction. - * It has been created for the purpose of supporting the new authoring page which is done using - * DHTML. - *

+ *

+ * The unspecified method, is the same as the execute method for NbAuthoringStarterAction. It will get called when the + * method parameter is not specified (that is on first entry into the authoring environment). + *

* - *

- * The unspecified method, is the same as the execute method for NbAuthoringStarterAction. - * It will get called when the method parameter is not specified (that is on first entry - * into the authoring environment). - *

- * - *

- * The save, upload and delete method is the same as that of NbAuthoringAction, to see its explanation, - * please see org.lamsfoundation.lams.tool.noticeboard.web.NbAuthoringAction - *

- * - * - * - * - * - * - * - * - * - * + *

+ * The save, upload and delete method is the same as that of NbAuthoringAction, to see its explanation, please see + * org.lamsfoundation.lams.tool.noticeboard.web.NbAuthoringAction + *

+ * + * @author mtruong */ - public class NbAuthoringAction extends LamsDispatchAction { - static Logger logger = Logger.getLogger(NbAuthoringAction.class.getName()); + private static Logger logger = Logger.getLogger(NbAuthoringAction.class.getName()); public final static String FORM = "NbAuthoringForm"; /** Get the user from the shared session */ @@ -98,6 +86,10 @@ @Override public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws NbApplicationException { + /* + * Retrieve the Service + */ + INoticeboardService nbService = NoticeboardServiceProxy.getNbService(getServlet().getServletContext()); //to ensure that we are working with a new form, not one from previous session NbAuthoringForm nbForm = new NbAuthoringForm(); @@ -113,11 +105,6 @@ */ nbForm.setDefineLater(request.getParameter(NoticeboardConstants.DEFINE_LATER)); - /* - * Retrieve the Service - */ - INoticeboardService nbService = NoticeboardServiceProxy.getNbService(getServlet().getServletContext()); - if (!contentExists(nbService, contentId)) { // Pre-fill the form with the default content //NoticeboardContent nb = nbService.retrieveNoticeboard(NoticeboardConstants.DEFAULT_CONTENT_ID); @@ -138,8 +125,8 @@ nbForm.setTitle(nb.getTitle()); nbForm.setBasicContent(nb.getContent()); - } else //content already exists on the database - { + //content already exists on the database + } else { //get the values from the database NoticeboardContent nb = nbService.retrieveNoticeboard(contentId); @@ -154,9 +141,13 @@ */ nbForm.populateFormWithNbContentValues(nb); nbForm.setContentFolderID(contentFolderId); - nb.setDefineLater(Boolean.parseBoolean(nbForm.getDefineLater())); + boolean isDefineLater = Boolean.parseBoolean(nbForm.getDefineLater()); + nb.setDefineLater(isDefineLater); nbService.saveNoticeboard(nb); + if (isDefineLater) { + request.setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER.toString()); + } } request.setAttribute(FORM, nbForm); 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.26.2.5 -r1.26.2.6 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java 11 May 2016 07:37:11 -0000 1.26.2.5 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringForm.java 4 Apr 2017 11:57:47 -0000 1.26.2.6 @@ -33,8 +33,6 @@ import org.apache.struts.action.ActionMapping; import org.lamsfoundation.lams.tool.noticeboard.NoticeboardContent; -//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.

@@ -47,17 +45,6 @@ * the maximum filesize that can be uploaded is a property that is in the UploadFileUtil.

* */ - -/** - * Creation Date: 19-05-05 - * - * - * - * - * - * - */ - public class NbAuthoringForm extends ActionForm { private static final long serialVersionUID = -8425012664714570196L; 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.32.2.4 -r1.32.2.5 --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java 11 May 2016 07:37:11 -0000 1.32.2.4 +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbMonitoringAction.java 4 Apr 2017 11:57:47 -0000 1.32.2.5 @@ -54,25 +54,10 @@ import org.lamsfoundation.lams.web.util.AttributeNames; /** - * @author mtruong - * * The buttons are a switch between tabs and will forward to a jsp and display * the appropriate page. - * - * - */ - -/** - * Creation Date: 14-07-05 * - * - * - * - * - * - * - * - * + * @author mtruong */ public class NbMonitoringAction extends LamsDispatchAction { Index: lams_tool_nb/web/monitoring/monitoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/web/monitoring/monitoring.jsp,v diff -u -r1.14.2.3 -r1.14.2.4 --- lams_tool_nb/web/monitoring/monitoring.jsp 20 Apr 2016 00:29:26 -0000 1.14.2.3 +++ lams_tool_nb/web/monitoring/monitoring.jsp 4 Apr 2017 11:57:47 -0000 1.14.2.4 @@ -1,6 +1,4 @@ - - <%@ include file="/includes/taglibs.jsp"%> <%@ page import="java.util.HashMap"%> @@ -23,7 +21,6 @@ <fmt:message key="activity.title" /> + - + + + - - - - - - - + + + - - + + - + - - - - - + + + + + - +