Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobasco99 committed Jun 26, 2024
1 parent d5475c5 commit 928f4e1
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ public Response calculateNextAction(String intent, String message, String messag
// check if participant has completed the survey
boolean participantDone = this.completedsurvey;
if (participantDone){
System.out.println("participant done");
JSONArray interactiveElements = new JSONArray();
JSONObject button = new JSONObject();
button.put("intent", "Fertig");
Expand All @@ -302,7 +303,6 @@ public Response calculateNextAction(String intent, String message, String messag
response.put("message", completedSurvey);
response.put("closeContext", true);
response.put("channel", channel);
Context.get().monitorEvent(MonitoringEvent.RESPONSE_SENDING.toString());
return Response.ok().entity(response).build();
}

Expand Down Expand Up @@ -383,9 +383,6 @@ private Response AskNextQuestion(String surveyDoneString, boolean firstMessage){
else{
if(SurveyHandlerService.messenger.equals(Messenger.RESTFUL)) {
String msg = messageText;
if(firstMessage){
msg = "Super, danke für das Teilnehmen an der Umfrage! Hier kommt deine erste Frage:\n" + messageText;
}
JSONArray answerOptions = this.currentSurvey.getQuestionByQid(nextId, this.language).getAnswerOptionsForRest();
response.put("message", msg);
if(!answerOptions.isEmpty())
Expand Down Expand Up @@ -2152,6 +2149,7 @@ public Response surveyDone(String surveyDoneString){
SurveyHandlerServiceQueries.updateParticipantInDB(this, this.currentSurvey.database);
JSONArray interactiveElements = new JSONArray();
JSONObject button = new JSONObject();
System.out.println("participant done");
button.put("intent", "Fertig");
button.put("label", "Fertig");
button.put("description", "Fertig");
Expand All @@ -2161,7 +2159,6 @@ public Response surveyDone(String surveyDoneString){
response.put("channel", channel);
response.put("closeContext", true);
response.put("message", surveyDoneString); //+ currParticipant.getEmail() + currParticipant.getUnaskedQuestions() + currParticipant.getSkippedQuestions()
Context.get().monitorEvent(MonitoringEvent.RESPONSE_SENDING.toString());
return Response.ok().entity(response).build();
}
return null;
Expand Down

0 comments on commit 928f4e1

Please sign in to comment.