Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardConstants.java =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r0ef9aeb213cba0c607f94d4282f08b7f0a94663e --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardConstants.java (.../NoticeboardConstants.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardConstants.java (.../NoticeboardConstants.java) (revision 0ef9aeb213cba0c607f94d4282f08b7f0a94663e) @@ -56,10 +56,6 @@ public static final String AUTHOR_PAGE = "authoringContent"; - public static final String DISPLAY_MESSAGE = "displayMessage"; - public static final String DISPLAY_LEARNER_CONTENT = "displayLearnerContent"; - public static final String REFLECT_ON_ACTIVITY = "reflectOnActivity"; - public static final String MONITOR_PAGE = "monitorPage"; public static final String MONITOR_REFLECTION_PAGE = "monitorReflectionPage"; public static final String MONITOR_COMMENTS_PAGE = "monitorCommentsPage"; Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/controller/AuthoringController.java =================================================================== diff -u -rf7937adfea85b6a6976eaa98df8c68db93f9f060 -r0ef9aeb213cba0c607f94d4282f08b7f0a94663e --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/controller/AuthoringController.java (.../AuthoringController.java) (revision f7937adfea85b6a6976eaa98df8c68db93f9f060) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/controller/AuthoringController.java (.../AuthoringController.java) (revision 0ef9aeb213cba0c607f94d4282f08b7f0a94663e) @@ -84,6 +84,12 @@ @RequestMapping("/authoring") public String unspecified(@ModelAttribute NbAuthoringForm nbAuthoringForm, HttpServletRequest request, HttpServletResponse response) { + /* + * DefineLater is used in the basic screen. If defineLater is set, then in the authoring page, + * the two tabs {Advanced, Instructions} are not visible. + */ + nbAuthoringForm.setDefineLater(request.getParameter(NoticeboardConstants.DEFINE_LATER)); + ToolAccessMode mode = WebUtil.readToolAccessModeAuthorDefaulted(request); return readDatabaseData(nbAuthoringForm, request, mode); } @@ -98,6 +104,7 @@ NoticeboardContent nb = nbService.retrieveNoticeboard(contentId); nb.setDefineLater(true); nbService.saveNoticeboard(nb); + nbAuthoringForm.setDefineLater("true"); // audit log the teacher has started editing activity in monitor nbService.auditLogStartEditingActivityInMonitor(contentId); @@ -114,12 +121,6 @@ nbAuthoringForm.setToolContentID(contentId.toString()); - /* - * DefineLater is used in the basic screen. If defineLater is set, then in the authoring page, - * the two tabs {Advanced, Instructions} are not visible. - */ - nbAuthoringForm.setDefineLater(request.getParameter(NoticeboardConstants.DEFINE_LATER)); - if (!contentExists(nbService, contentId)) { // Pre-fill the form with the default content //NoticeboardContent nb = nbService.retrieveNoticeboard(NoticeboardConstants.DEFAULT_CONTENT_ID); Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/controller/LearningController.java =================================================================== diff -u -r3988dd2424a42af96cc77cb1c70b6cd59fda1f0a -r0ef9aeb213cba0c607f94d4282f08b7f0a94663e --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/controller/LearningController.java (.../LearningController.java) (revision 3988dd2424a42af96cc77cb1c70b6cd59fda1f0a) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/controller/LearningController.java (.../LearningController.java) (revision 0ef9aeb213cba0c607f94d4282f08b7f0a94663e) @@ -53,7 +53,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.ModelAttribute; @@ -182,24 +181,11 @@ request.setAttribute("allowComments", nbContent.isAllowComments()); request.setAttribute("likeAndDislike", nbContent.isCommentsLikeAndDislike()); request.setAttribute("anonymous", nbContent.isAllowAnonymous()); - Boolean userFinished = (nbUser != null && NoticeboardUser.COMPLETED.equals(nbUser.getUserStatus())); request.setAttribute("userFinished", userFinished); - request.setAttribute(AttributeNames.ATTR_IS_LAST_ACTIVITY, nbService.isLastActivity(toolSessionID)); - /* - * Checks to see if the runOffline flag is set. - * If the particular flag is set, control is forwarded to jsp page - * displaying to the user the message according to what flag is set. - */ - if (displayMessageToUser(nbContent, errorMap)) { - request.setAttribute("errorMap", errorMap); - return "message"; - } - return "learnerContent"; - } @RequestMapping("/teacher") @@ -214,7 +200,6 @@ HttpServletResponse response) throws NbApplicationException { NbLearnerForm.setMode("author"); return learner(NbLearnerForm, request, response); - } /** @@ -237,38 +222,15 @@ default: throw new NbApplicationException("Invalid flag"); } - } /** - *
- * This methods checks the defineLater and runOffline flag. If defineLater flag is set, then a message is added to - * an ActionMessages object saying that the contents have not been defined yet. If the runOffline flag is set, a - * message is added to ActionMessages saying that the contents are not being run online. This method will return - * true if any one of the defineLater or runOffline flag is set. Otherwise false will be returned. - *
- */ - private boolean displayMessageToUser(NoticeboardContent content, MultiValueMap