From 928f4e15c0ca4573d870b66af15b070c22b13df9 Mon Sep 17 00:00:00 2001 From: Tobasco99 Date: Wed, 26 Jun 2024 09:13:18 +0200 Subject: [PATCH] logging --- .../i5/las2peer/services/SurveyHandler/Participant.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/i5/las2peer/services/SurveyHandler/Participant.java b/app/src/main/java/i5/las2peer/services/SurveyHandler/Participant.java index 6ef9cdd..24b0aea 100644 --- a/app/src/main/java/i5/las2peer/services/SurveyHandler/Participant.java +++ b/app/src/main/java/i5/las2peer/services/SurveyHandler/Participant.java @@ -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"); @@ -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(); } @@ -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()) @@ -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"); @@ -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;