Hi.
At the moment Limesurvey Sync creates a new token every time a user fills out a survey. It would be great if you could add a feature that first checks to see if there is a premade token in Lime Survey. I guess the best way would be to compare the email in drupal user database with the token table in lime. The main reason for this request is that without such a feature you can't use token specific attributes and fields. It would be even better if you could also add a feature that only allows a user to enter a survey if there is a premade token. I guess this feature should also check the token uses left field so that a user could only enter a new survey if there are uses left.
A different way to solve this would be if the limesurvey sync could add information to the token during creation. Like First Name, Last Name, Uses Left and token attributes. Even if you do it this way it would still require some way to restrict how many times a user could enter a survey.
Thanks for all your great work!
Comments
Comment #1
thedut CreditAttribution: thedut commentedHi,
This is an interesting thread about requested feature on the LimeSurvey Sync module.
However, some features are already availables :
If you check on the survey tab options page "Fill the token table of the LimeSurvey database with corresponding usernames and emails", the created token will contain
This is already available : on the LimeSurvey admin interface, set your survey to "switch to closed-access mode" and don't create tokens from the LimeSurvey admin interface : the survey will be available only from your drupal site, with the auto-generate token. Read below for restricting access depending on specific attribute values (not available yet).
In order to allow a user to edit a survey from the Drupal site, disctinct answers (from a same user and a same survey) should have distinct tokens (1 answer = 1 unique token). That why premade tokens is not the right way.
The right way should be to restrict how many new answer nodes a user may create. The Node Limit custom module can already do that (I have not tested it but it should work).
As a new feature, it could be interesting to create cck Fields for answer nodes : the drupal site would import thoses values into attribute colomns on the LimeSurvey token table.
Then it would be possible to create rules (using the Rules custom module) allowing to create a new answer only if the attribute value match an expected value.
Comment #2
thedut CreditAttribution: thedut commentedComment #3
henrkmunch CreditAttribution: henrkmunch commentedSounds like a great idea. I'll have to try out the nodes module. It would however be great if you could "map" more fields in drupal that could be passed to lime. For instance custom fields for First name, Last name and token attributes.
On the other hand lime has a great system for passing out tokens and keeping track of reminders and it would be nice if you could use it by doing it the other way around. That is mapping drupal user email to the a premade token database.
Rules module would also be great but I guess that takes alot more work.
I really love your module and for god sake don't make it into SurveyPress but there are still a few simple features that you could "steal" from that plugin..... ;)
Comment #4
thedut CreditAttribution: thedut commentedI'm glad you enjoy this module.
IHO, this is the best Drupal survey module ever ! ;)
Yes, it would.
I guess it is an advanced feature, that would only interest few users. I may implement it but it not my priory task.
I may work on that idea within monthes.
Comment #5
arellani CreditAttribution: arellani commentedHello
I select in survey tab options page "Fill the token table of the LimeSurvey database with corresponding usernames and emails", created token will contain:
the drupal username into the LimeSurvey field Last Name
and the Drupal user mail into the LimeSurvey field email.
Works Perfect! So...
I have in a User Profile some fields with "Token-value" already like Organization, Enterprice, telephone, Directions...
Is there some way to pre-fill this tokens in to the Lime survey field? Just like username or email..
Thanks for all your great work!
Comment #6
thedut CreditAttribution: thedut commentedHello arellani,
You are asking for a feature request.
I may implement it but it is not my priority task.
I am working right now on the LimeSurvey Sync 7.x-2.x version, then I will try to fix another issue, and then I may start to fix this one.
This request is postponed (within several monthes).
Comment #7
arellani CreditAttribution: arellani commentedHello thedut
I already have Syncronized My Survey (On Limesurvey Site) with my Drupal Site.
I have a Content Type "Survey FCEX" and his Content Type for his answers "Answers Survey FCEX"".
So, I have one views with Content Type = "Survey FCEX"
I can not find the way or the field i have to add on the view, for my users sites (not admin) can add answers to this survey.
Field Title goes to the Survey edit (like an admin) What I have to do?
Thank you for your support.
Comment #8
thedut CreditAttribution: thedut commented@arellani :
The issue system does not work that way.
Create a new issue going to https://drupal.org/node/add/project-issue/limesurvey_sync
Then I wil answer to your question.
[EDIT : answer HERE].
Comment #9
thedut CreditAttribution: thedut commentedThere is an interesting approch for premade tokens : the drupal sandbox project LimeSurvey Integeration (and its tutorial).
This module synchronize the Drupal users with the LimeSurvey central participant panel. You can then add token invitations from the central participant panel.
When synchronizing the Drupal users with the LimeSurvey central participant panel you can decide which fields to use as source for First name, Lastname, etc...
I may add such feature into the LimeSurvey Sync module in the future.
Comment #10
thedut CreditAttribution: thedut commentedThe limesurvey SYnc module v7.x-2.0 is available as an alpha.
It will handle the LimeSurvey participant system. but it is not available yet. It is a future develppement on this branch.
The v2 comes with many improvements.
More informations here.
Comment #11
thedut CreditAttribution: thedut commentedFixed Into the new v7.x-3.0-beta1 release : it is possible now to create tokens, and easily importing Dp user info (name, fields) into the LimeSurvey token table or Importing LimeSurvey token table infos into Drupal. A new interface is provided in order to create tokens for all users or only for specific roles users.
Comment #12
jsibley CreditAttribution: jsibley commentedHi,
Could you please explain the new token capabilities or point me to any documentation? For example, where does one create / define tokens?
Also, can there be more than one token per user and will it be possible for users to have more than one participant entity associated with each user?
Also, when tokens are used, will it be a one-to-one relationship between token and participant, or an there be multiple tokens for each participant?
Many thanks!
Comment #13
thedut CreditAttribution: thedut commentedHi Johnathan !
I need to precise first the context : the LimeSurvey central participant datas is not handled by the LimeSurvey Sync v7.x-3.0-beta1 module : In order to associated Drupal Users with LimeSurvey participants, you will have to do it for each LimeSurvey survey, using the LimeSurvey Token table of each survey.
There are many ways to transfert informations between Drupal Users and LimeSurvey. In a nutshell :
Assuming your survey ID is 598191 and survey machine name is my_survey :
First case : Your LimeSurvey Token table is empty and you want to fill it with Drupal Users,
clicking to "create tokens"
Hum, there is a bug : the ls-token-598191/add page returns a denied error, I'm going to fix this issue, I keep you in touch. Ok, Fixed !other case : your LimeSurvey Token table is fulled and you want to import those informations to Drupal Users
Yes and yes !
Assuming than a participant is a token invitation entry : multiple tokens for each participant.
Comment #14
jsibley CreditAttribution: jsibley commentedThis all sounds great, so far. I'm noticing a few potential issues. I'm not sure whether some of these might be by design.
Token is not listed in the structure/limesurvey submenu
If one selects structure/limesurvey (not one of the submenu items) there is a listing for token but clicking on it gives a message of "you do not have any administrative items"
Perhaps because of these two items, there doesn't seem to be a clear way to synchronize tokens
In content/entities I see answer and survey but not item
The limesurvey fields seem to be named differently in rules and in views
Thanks!
Comment #15
thedut CreditAttribution: thedut commented2 possible explications for this :
Please report about those points.
Could you be more specific ?
Comment #16
jsibley CreditAttribution: jsibley commentedHi,
I was using beta1, not dev. You were correct.
Switching to dev, I now see tokens in the submenu, but nothing seems to work.
There are "//" instead of "/" in the submenu URLS (e.g., admin/structure/limesurvey/token//fields), but changing it to one slash doesn't seem to go anywhere useful for any of the submenu options
I did create the token table in Limesurvey with closed access. Perhaps this is because there are tokens that were created in the previous version of limesurvey_sync?
If I create a rule to put the correct UID in each existing token, should that allow everything to work properly?
Thanks. This seems to be a huge step forward!
Comment #17
jsibley CreditAttribution: jsibley commentedAlso, I was referring to (for example):
in rules, entity:lss-uid (User)
in views, User (User)
or
in rules, entity : lss-uid : mail (Email)
in views, LS Admin : email (LS Admin : email)
Am I correct that these are referring, in each case, to the same field?
Thanks.