Welcome to the LimeSurvey Community Forum

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

Create PDF with token and QR code

  • evaluation2023
  • evaluation2023's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 1 week ago #242214 by evaluation2023
Create PDF with token and QR code was created by evaluation2023
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Would it be possible to create a list with the tokens of a survey and the qr code and url of the survey with a plug-in? So it would be easier to handle survey access e.g. in schools… you just need to give every participant a little peace of paper with token and qr code …

 

PHP Version 8.0.28
Version 5.6.4+230206

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 1 week ago #242225 by holch
Replied by holch on topic Create PDF with token and QR code
What would the QR-Code contain? Just the general link or the individual link with the token?

Overall, I think it makes more sense to create this in Word as a serial letter rather than trying to create a plugin. At the end of the day you will have to print it anyway.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • evaluation2023
  • evaluation2023's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 1 week ago - 1 year 1 week ago #242227 by evaluation2023
Replied by evaluation2023 on topic Create PDF with token and QR code
The qr code of the general link would be okay… in Limesurvey there should be a function, I can create the code in Limesurvey on the first site of the survey menu with one click…

It’s not for me, it’s for user which are not firm in using Limesurvey and it would be too complicated to create it with windows office. I’ve seen there are some plugins to create PDFs like limeMpdf …

PHP Version 8.0.28
Version 5.6.4+230206
Last edit: 1 year 1 week ago by evaluation2023.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 1 week ago #242229 by holch
Replied by holch on topic Create PDF with token and QR code
I am sure it is possible to create a QR code containing the link (but I would also put the link outside of the QR code, because QR codes are only good for when you use a smartphone, for a computer it isn't a good option).

But how should the PDF look like? With a QR-code, link and token for each participant?

I am sure this is doable with a plugin, somehow. Get in touch with Denis (or any other Limesurvey partner), they can probably give you a better estiamte of what this would involve in terms of costs.

Of course you can always create a feature request in the bug tracker, but this might take a while, if it will be included at all.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu, evaluation2023

Please Log in to join the conversation.

  • evaluation2023
  • evaluation2023's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 1 week ago #242264 by evaluation2023
Replied by evaluation2023 on topic Create PDF with token and QR code
Due to rare budget, I use the Easter days to try it by myself...

First, tried to get the existing tokens of a survey on one page:
Code:
public function actionIndex($surveyId) { if (!Permission::model()->hasSurveyPermission($surveyId, 'tokens', 'read')) { throw new CHttpException(403, gT("You do not have permission to access this page.")); } $surveyId = (int) $surveyId; $survey = Survey::model()->findByPk($surveyId); $tkcount = Token::model($surveyId)->count(); $tokensList = Token::model($surveyId)->summary(); $allAttributes = Survey::model()->findByPk($surveyId)->getTokenAttributes(); $tokenAttributes = array_keys($this->getTokensAttributeList($surveyId,'tokens.', true)); if ($survey->hasTokensTable) { $content = "There are ".$tkcount ." Tokens in the database for this survey".$tokenAttributes; } return $content; }

Unfortunately It does not work, does anybody have an idea how to show the tokens as list?

PHP Version 8.0.28
Version 5.6.4+230206

Please Log in to join the conversation.

  • evaluation2023
  • evaluation2023's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 1 week ago #242316 by evaluation2023
Replied by evaluation2023 on topic Create PDF with token and QR code
Does anybody know how to get a list of all tokens of a survey?
I can't find the function :/

PHP Version 8.0.28
Version 5.6.4+230206

Please Log in to join the conversation.

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
1 year 1 week ago #242317 by tammo
Replied by tammo on topic Create PDF with token and QR code
I would export the token table. Either via the user interface or via the RPC.

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl

Please Log in to join the conversation.

  • evaluation2023
  • evaluation2023's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 1 week ago #242318 by evaluation2023
Replied by evaluation2023 on topic Create PDF with token and QR code
It’s necessary to make it work easy for other user …
Can’t I get the tokens of a survey with a short script in a plug-in or with MySQL query e. g. Select?

PHP Version 8.0.28
Version 5.6.4+230206

Please Log in to join the conversation.

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
1 year 1 week ago #242320 by tammo
Replied by tammo on topic Create PDF with token and QR code
It's not difficult: manual.limesurvey.org/Survey_participants#Export

If it must be easier: please consult someone to make a plugin for you. Take care that the logged in user must have permission to access the token data.

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 1 week ago #242323 by Joffm
Replied by Joffm on topic Create PDF with token and QR code

Can’t I get the tokens of a survey with a short script in a plug-in or with MySQL query e. g. Select?

Of course you can write your own short php script to query the "lime_tokens_[SurveyId]".

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: evaluation2023

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 1 week ago #242332 by tpartner
Replied by tpartner on topic Create PDF with token and QR code
Or, use the API list_participants() method.

- api.limesurvey.org/classes/remotecontrol...od_list_participants

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: evaluation2023

Please Log in to join the conversation.

  • evaluation2023
  • evaluation2023's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 1 week ago #242346 by evaluation2023
Replied by evaluation2023 on topic Create PDF with token and QR code
Is there a way to connect to the database in the plugin-code without entering the database user and password?

Want to use something like:
$sql = 'SELECT token FROM lime_tokens_[surveyId]';

PHP Version 8.0.28
Version 5.6.4+230206

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose