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"%>
-
+
+