Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/util/SurveyWebUtils.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/util/SurveyWebUtils.java,v diff -u -r1.2 -r1.3 --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/util/SurveyWebUtils.java 21 Sep 2006 07:46:41 -0000 1.2 +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/util/SurveyWebUtils.java 22 Sep 2006 00:57:21 -0000 1.3 @@ -54,6 +54,9 @@ public static String getChoicesStr(String[] choiceList) { String choices = ""; + if(choiceList == null) + return choices; + for(String c: choiceList) choices = choices + c + "&"; return choices; Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/LearningAction.java,v diff -u -r1.4 -r1.5 --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/LearningAction.java 21 Sep 2006 07:46:41 -0000 1.4 +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/LearningAction.java 22 Sep 2006 00:57:21 -0000 1.5 @@ -406,7 +406,7 @@ question.setAnswer(answer); //for mandatory questions, answer can not be null. if(!question.isOptional() && answer == null){ - errors.add(SurveyConstants.ERROR_MSG_KEY,new ActionMessage(SurveyConstants.ERROR_MSG_MANDATORY_QUESTION)); + errors.add(SurveyConstants.ERROR_MSG_KEY+ question.getUid(),new ActionMessage(SurveyConstants.ERROR_MSG_MANDATORY_QUESTION)); addErrors(request, errors); } @@ -430,7 +430,7 @@ question.setAnswer(answer); //for mandatory questions, answer can not be null. if(!question.isOptional() && answer == null){ - errors.add(SurveyConstants.ERROR_MSG_KEY,new ActionMessage(SurveyConstants.ERROR_MSG_MANDATORY_QUESTION)); + errors.add(SurveyConstants.ERROR_MSG_KEY + question.getUid(),new ActionMessage(SurveyConstants.ERROR_MSG_MANDATORY_QUESTION)); addErrors(request, errors); } } @@ -442,7 +442,7 @@ String[] choiceList = request.getParameterValues(SurveyConstants.PREFIX_QUESTION_CHOICE+question.getUid()); String textEntry = request.getParameter(SurveyConstants.PREFIX_QUESTION_TEXT+question.getUid()); - if(choiceList == null && textEntry == null) + if(choiceList == null && StringUtils.isBlank(textEntry)) return null; Index: lams_tool_survey/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_survey/web/pages/learning/learning.jsp,v diff -u -r1.3 -r1.4 --- lams_tool_survey/web/pages/learning/learning.jsp 21 Sep 2006 07:46:41 -0000 1.3 +++ lams_tool_survey/web/pages/learning/learning.jsp 22 Sep 2006 00:57:21 -0000 1.4 @@ -45,55 +45,56 @@ ${sessionMap.instructions}

- <%@ include file="/common/messages.jsp"%> - <%-- Show on one page or when learner does not choose edit one question --%> - - - - <%@ include file="/pages/learning/question.jsp"%> - + + + + <%@ include file="/pages/learning/question.jsp"%> + - <%@ include file="/pages/learning/question.jsp"%>
<%-- Display button according to different situation --%> - -
- - + + +
- - - - - - - -    - - - - - +
+
+ + + + + + + + + + + + + + + + + + - - - + + + - -
-
- <%-- end mode != teacher --%> -
+ + + Index: lams_tool_survey/web/pages/learning/question.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_survey/web/pages/learning/question.jsp,v diff -u -r1.1 -r1.2 --- lams_tool_survey/web/pages/learning/question.jsp 21 Sep 2006 07:46:41 -0000 1.1 +++ lams_tool_survey/web/pages/learning/question.jsp 22 Sep 2006 00:57:21 -0000 1.2 @@ -6,6 +6,13 @@ * + +

+ +
+
+

+