Index: lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/actions/AuthoringAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -ra1523835943285424159f4719d51af2794f94846 --- lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision a1523835943285424159f4719d51af2794f94846) @@ -99,6 +99,8 @@ String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, "mode", true); + // set up chatService if (chatService == null) { chatService = ChatServiceProxy.getChatService(this.getServlet() @@ -121,12 +123,14 @@ request).getMessage("error.content.locked")); return mapping.findForward("message_page"); } + + if (mode != null && mode.isTeacher()) { + // Set the defineLater flag so that learners cannot use content while we + // are editing. This flag is released when updateContent is called. + chat.setDefineLater(true); + chatService.saveOrUpdateChat(chat); + } - // Set the defineLater flag so that learners cannot use content while we - // are editing. This flag is released when updateContent is called. - chat.setDefineLater(true); - chatService.saveOrUpdateChat(chat); - // Set up the authForm. AuthoringForm authForm = (AuthoringForm) form; updateAuthForm(authForm, chat); Index: lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/AuthoringAction.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -ra1523835943285424159f4719d51af2794f94846 --- lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision a1523835943285424159f4719d51af2794f94846) @@ -99,6 +99,8 @@ String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, "mode", true); + // set up notebookService if (notebookService == null) { notebookService = NotebookServiceProxy.getNotebookService(this @@ -122,12 +124,14 @@ request).getMessage("error.content.locked")); return mapping.findForward("message_page"); } + + if (mode != null && mode.isTeacher() ) { + // Set the defineLater flag so that learners cannot use content while we + // are editing. This flag is released when updateContent is called. + notebook.setDefineLater(true); + notebookService.saveOrUpdateNotebook(notebook); + } - // Set the defineLater flag so that learners cannot use content while we - // are editing. This flag is released when updateContent is called. - notebook.setDefineLater(true); - notebookService.saveOrUpdateNotebook(notebook); - // Set up the authForm. AuthoringForm authForm = (AuthoringForm) form; updateAuthForm(authForm, notebook); Index: lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/web/actions/AuthoringAction.java =================================================================== diff -u -r84283f3449a27ed45130e07c53d2cefc451ba537 -ra1523835943285424159f4719d51af2794f94846 --- lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 84283f3449a27ed45130e07c53d2cefc451ba537) +++ lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision a1523835943285424159f4719d51af2794f94846) @@ -111,13 +111,16 @@ String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - + + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, "mode", true); + // set up scribeService if (scribeService == null) { scribeService = ScribeServiceProxy.getScribeService(this .getServlet().getServletContext()); } - + + // retrieving Scribe with given toolContentID Scribe scribe = scribeService.getScribeByContentId(toolContentID); if (scribe == null) { @@ -134,12 +137,14 @@ request).getMessage("error.content.locked")); return mapping.findForward("message_page"); } + + if (mode != null && mode.isTeacher()) { + // Set the defineLater flag so that learners cannot use content while we + // are editing. This flag is released when updateContent is called. + scribe.setDefineLater(true); + scribeService.saveOrUpdateScribe(scribe); + } - // Set the defineLater flag so that learners cannot use content while we - // are editing. This flag is released when updateContent is called. - scribe.setDefineLater(true); - scribeService.saveOrUpdateScribe(scribe); - // Set up the authForm. AuthoringForm authForm = (AuthoringForm) form; updateAuthForm(authForm, scribe);