Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java,v diff -u -r1.6 -r1.7 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 15 Jan 2006 16:40:11 -0000 1.6 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 15 Jan 2006 20:43:46 -0000 1.7 @@ -146,18 +146,26 @@ /* ends here. */ - /* this section is related to Stats tab. Starts here. */ + /* it is possible that no users has ever logged in for the activity yet*/ int countAllUsers=mcService.getTotalNumberOfUsers(); logger.debug("countAllUsers: " + countAllUsers); if (countAllUsers == 0) { logger.debug("error: countAllUsers is 0"); - persistError(request,"error.noStudentActivity"); - request.setAttribute(USER_EXCEPTION_NO_STUDENT_ACTIVITY, new Boolean(true)); - return (mapping.findForward(ERROR_LIST)); + request.getSession().setAttribute(USER_EXCEPTION_NO_STUDENT_ACTIVITY, new Boolean(true)); } - + + /* it is possible that no users has ever attempted the activity yet*/ + int totalAttemptCount=MonitoringUtil.getTotalAttemptCount(request); + logger.debug("totalAttemptCount: " + totalAttemptCount); + if (totalAttemptCount == 0) + { + logger.debug("error: totalAttemptCount is 0"); + request.getSession().setAttribute(USER_EXCEPTION_NO_STUDENT_ACTIVITY, new Boolean(true)); + } + + /* this section is related to Stats tab. Starts here. */ int countSessionComplete=mcService.countSessionComplete(); logger.debug("countSessionComplete: " + countSessionComplete);