Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java,v
diff -u -r1.111.2.4 -r1.111.2.5
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 10 Dec 2014 11:01:36 -0000 1.111.2.4
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 13 Feb 2015 23:55:03 -0000 1.111.2.5
@@ -894,25 +894,29 @@
final String NEW_LINE_CHARACTER = "
";
HttpSession ss = SessionManager.getSession();
- UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER);
- Long userId = new Long(toolUser.getUserID().longValue());
+ UserDTO userDto = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ Long userId = new Long(userDto.getUserID().longValue());
QaQueUsr user = getUserByIdAndSession(userId, new Long(sessionId));
-
String fullName = user.getFullname();
- String message = NEW_LINE_CHARACTER + NEW_LINE_CHARACTER
- + messageService.getMessage("label.user.has.answered.questions", new Object[] { fullName });
-
+ //add question-answer pairs to email message
List responses = qaUsrRespDAO.getResponsesByUserUid(user.getUid());
+ Date attemptTime = new Date();
+ String message = new String();
for (QaUsrResp response : responses) {
String question = response.getQaQuestion().getQuestion();
String answer = response.getAnswer();
- message += NEW_LINE_CHARACTER + NEW_LINE_CHARACTER + question + answer;
+ message += NEW_LINE_CHARACTER + NEW_LINE_CHARACTER + question + " " + answer;
+ attemptTime = response.getAttemptTime();
}
+
+ message = NEW_LINE_CHARACTER
+ + NEW_LINE_CHARACTER
+ + messageService
+ .getMessage("label.user.has.answered.questions", new Object[] { fullName, attemptTime })
+ + message + NEW_LINE_CHARACTER + NEW_LINE_CHARACTER;
- message += NEW_LINE_CHARACTER + NEW_LINE_CHARACTER;
-
eventNotificationService.notifyLessonMonitors(sessionId, message, true);
}