Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Telegram Plugin

  • sugeek
  • sugeek's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
1 week 6 days ago - 1 week 5 days ago #267690 by sugeek
Telegram Plugin was created by sugeek
Please help us help you and fill where relevant: Telegram Plugin ( github.com/LibreCodeCoop/LSTelegramNotify/tree/main )
Your LimeSurvey version: [5x and 6x]
Own server or LimeSurvey hosting: Own Server
==================
Hi Guys, we are using a Telegram Plugin for Notification, is a great solution for not use Email Notifications, but now, we need receive entire responses into message without pdf, so, we modify the plugin but only we receive questions codes and answers codes now its content. Maybe can help us with this?

We Add this code into sendmessage function, after $text variable definition and before $telegram->sendMensagge:
Code:
// Desde aqui
$response = $this->pluginManager->getAPI()->getResponse($surveyId, $responseId);
$answersText = "";
if ($response) {    
foreach ($response as $questionCode => $answerValue) {
        if (is_array($answerValue)) {
            $answerValue = implode(", ", $answerValue);
        }    
    $answersText .= htmlspecialchars($questionCode) . ": " . htmlspecialchars($answerValue) . "\n";     } }
$text .= "\nRespuestas:\n" . $answersText;
// Hasta aQUI

I receive telegram notification but with question and answers codes without content, for do it same content like email notification?.
Regards, 

LimeSurvey Colombia Partner
www.sugeek.co
Last edit: 1 week 5 days ago by DenisChenu. Reason: Update source to the original source https://librecode.coop/

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose