Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java =================================================================== diff -u -ra3373207133535e1504e5cb32bf10903e39355bd -r44fb29e757244f745bbb10f3feb2f4808f56ba5a --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java (.../McMonitoringStarterAction.java) (revision a3373207133535e1504e5cb32bf10903e39355bd) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java (.../McMonitoringStarterAction.java) (revision 44fb29e757244f745bbb10f3feb2f4808f56ba5a) @@ -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);