Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookAction.java =================================================================== diff -u -r1699f7ed4fd338ac614126e4d68739f417997c4d -rdf7043ae91ddb5337979f1fb0b2b72aa0199b3e4 --- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookAction.java (.../GradebookAction.java) (revision 1699f7ed4fd338ac614126e4d68739f417997c4d) +++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookAction.java (.../GradebookAction.java) (revision df7043ae91ddb5337979f1fb0b2b72aa0199b3e4) @@ -177,8 +177,10 @@ JSONArray cellJSON = new JSONArray(); cellJSON.put(gradebookActivityDTO.getRowName()); cellJSON.put(gradebookActivityDTO.getStatus()); - cellJSON.put(GradebookUtil.niceFormatting(gradebookActivityDTO.getAverageMark())); - cellJSON.put(GradebookUtil.niceFormatting(gradebookActivityDTO.getMark())); + cellJSON.put(gradebookActivityDTO.getAverageMark() == null ? GradebookConstants.CELL_EMPTY + : GradebookUtil.niceFormatting(gradebookActivityDTO.getAverageMark())); + cellJSON.put(gradebookActivityDTO.getMark() == null ? GradebookConstants.CELL_EMPTY + : GradebookUtil.niceFormatting(gradebookActivityDTO.getMark())); rowJSON.put(GradebookConstants.ELEMENT_CELL, cellJSON); rowsJSON.put(rowJSON); @@ -187,9 +189,11 @@ boolean isWeighted = getGradebookService().isWeightedMarks(lessonId); Double learnerLessonMark = getGradebookService().getGradebookUserLesson(lessonId, userId).getMark(); - resultJSON.put("learnerLessonMark", GradebookUtil.niceFormatting(learnerLessonMark, isWeighted)); + resultJSON.put("learnerLessonMark", learnerLessonMark == null ? GradebookConstants.CELL_EMPTY + : GradebookUtil.niceFormatting(learnerLessonMark, isWeighted)); Double averageLessonMark = getGradebookService().getAverageMarkForLesson(lessonId); - resultJSON.put("averageLessonMark", GradebookUtil.niceFormatting(averageLessonMark, isWeighted)); + resultJSON.put("averageLessonMark", averageLessonMark == null ? GradebookConstants.CELL_EMPTY + : GradebookUtil.niceFormatting(averageLessonMark, isWeighted)); response.setContentType("application/json;charset=utf-8"); response.getWriter().print(resultJSON.toString());