Index: lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java
===================================================================
diff -u -rda54b82e5ef860fe9f8872b75f2b1718cfb7de32 -r6384417b366772b66b92f64b43f7609e583efc8b
--- lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java (.../LearningAction.java) (revision da54b82e5ef860fe9f8872b75f2b1718cfb7de32)
+++ lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java (.../LearningAction.java) (revision 6384417b366772b66b92f64b43f7609e583efc8b)
@@ -129,9 +129,15 @@
if (notebook.isRunOffline()) {
return mapping.findForward("runOffline");
}
-
- NotebookUser notebookUser = getCurrentUser(toolSessionID);
+ NotebookUser notebookUser;
+ if (mode.equals(ToolAccessMode.TEACHER)) {
+ Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false);
+ notebookUser = notebookService.getUserByUserIdAndSessionId(userID, toolSessionID);
+ } else {
+ notebookUser = getCurrentUser(toolSessionID);
+ }
+
// get any existing notebook entry
NotebookEntry nbEntry = notebookService.getEntry(notebookUser
.getEntryUID());
@@ -140,7 +146,7 @@
}
// set readOnly flag.
- if (notebook.isLockOnFinished() && notebookUser.isFinishedActivity()) {
+ if (mode.equals(ToolAccessMode.TEACHER) || (notebook.isLockOnFinished() && notebookUser.isFinishedActivity())) {
request.setAttribute("contentEditable", false);
} else {
request.setAttribute("contentEditable", true);
Index: lams_tool_notebook/web/pages/learning/notebook.jsp
===================================================================
diff -u -rfc79bbd0ac6d17b167882ca736c30ee3bdb4984d -r6384417b366772b66b92f64b43f7609e583efc8b
--- lams_tool_notebook/web/pages/learning/notebook.jsp (.../notebook.jsp) (revision fc79bbd0ac6d17b167882ca736c30ee3bdb4984d)
+++ lams_tool_notebook/web/pages/learning/notebook.jsp (.../notebook.jsp) (revision 6384417b366772b66b92f64b43f7609e583efc8b)
@@ -5,45 +5,43 @@
${notebookDTO.title}
-
- ${notebookDTO.instructions}
-
+ ${notebookDTO.instructions}
+