Index: lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java,v
diff -u -r1.7 -r1.8
--- lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java 1 Nov 2006 23:51:33 -0000 1.7
+++ lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java 23 Nov 2006 06:00:19 -0000 1.8
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_notebook/web/pages/learning/notebook.jsp,v
diff -u -r1.12 -r1.13
--- lams_tool_notebook/web/pages/learning/notebook.jsp 16 Nov 2006 07:56:26 -0000 1.12
+++ lams_tool_notebook/web/pages/learning/notebook.jsp 23 Nov 2006 06:00:18 -0000 1.13
@@ -5,45 +5,43 @@
${notebookDTO.title}
-
- ${notebookDTO.instructions}
-
+ ${notebookDTO.instructions}
+