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.17 -r1.18 --- lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java 17 Jul 2014 18:05:50 -0000 1.17 +++ lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/web/actions/LearningAction.java 18 Feb 2015 11:21:48 -0000 1.18 @@ -145,20 +145,22 @@ learningForm.setEntryText(nbEntry.getEntry()); } - // get teacher's comment if available - request.setAttribute("teachersComment", notebookUser.getTeachersComment()); - // set readOnly flag. if (mode.equals(ToolAccessMode.TEACHER) || (notebook.isLockOnFinished() && notebookUser.isFinishedActivity())) { request.setAttribute("contentEditable", false); } else { request.setAttribute("contentEditable", true); } - request.setAttribute("finishedActivity", notebookUser.isFinishedActivity()); + + if (notebookUser != null) { + // get teacher's comment if available + request.setAttribute("teachersComment", notebookUser.getTeachersComment()); + + request.setAttribute("finishedActivity", notebookUser.isFinishedActivity()); + request.setAttribute(AttributeNames.ATTR_LEARNER_CONTENT_FOLDER, + notebookService.getLearnerContentFolder(toolSessionID, notebookUser.getUserId())); + } - request.setAttribute(AttributeNames.ATTR_LEARNER_CONTENT_FOLDER, - notebookService.getLearnerContentFolder(toolSessionID, notebookUser.getUserId())); - // date and time restriction Date submissionDeadline = notebook.getSubmissionDeadline(); if (submissionDeadline != null) {