Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Survey attributes

Survey attributes 2 years 10 months ago #99559

  • fredwhite
  • fredwhite's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
I have metadata about surveys-- beyond what is in lime_surveys and _language_settings tables-- I need to store somewhere. It's pretty easy to add new question_attributes for questions and store them in the "EAV" table format. How come there is no "survey_attributes" table like there is "question_attributes"?

What do other people do? Is it ok to add columns to the surveys table? I usually avoid this. Maybe add my own survey_attributes table and interface and leave the LS db and core alone?
The administrator has disabled public write access.

Survey attributes 2 years 10 months ago #99565

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9284
  • Thank you received: 1324
  • Karma: 384
Hi Fred :).

We have a new table in 2.05 / Plugin system :
id,plugin_id,model,model_id,jey,value

It's done for this .

For a 1.92: best it's to add an column.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Survey attributes 2 years 10 months ago #99588

  • fredwhite
  • fredwhite's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Hi Denis,

I'm using 1.92. I tested adding a couple of fields to lime_surveys and then adding and editing a survey. It seems ok.

To display the fields in LS admin screen, it looks like I'd also need to edit the admin/editsurveysettings.php?


Fred
The administrator has disabled public write access.

Survey attributes 2 years 10 months ago #99600

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9284
  • Thank you received: 1324
  • Karma: 384
Yep,

It's in editsurveysettings.php, and maybe in some other file, but think only here is OK. And for default value, if i remind, there are somewhere all default setting.

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Survey attributes 2 years 10 months ago #99615

  • fredwhite
  • fredwhite's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Thanks. I'll give it a try.
The administrator has disabled public write access.

Survey attributes 2 years 1 month ago #110068

Hi Denis,

I have installed LimeSurvey 2.05.

Could you please let me know how I could add custom attributes to surveys ?

The goal would be to fill one or more custom attributes when creating the survey, and search/filter the surveys against the values of these custom attributes.

What would be the best way to achieve this in LimeSurvey 2.0.5 ?
Is it required to use plugins ?
Have you got a planned feature coming out soon regarding survey attributes ?

Many thanks for your help

Kind regards

Laurent
The administrator has disabled public write access.

Survey attributes 2 years 1 month ago #110070

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9284
  • Thank you received: 1324
  • Karma: 384
gitorious.org/Demo-limesurvey/examplesettings
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: ynk10

Survey attributes 2 years 1 month ago #110085

Hi Denis,

Many thanks for the quick answer and the link, I will give it a try right now !

Laurent
The administrator has disabled public write access.

Survey attributes 2 years 1 month ago #110233

  • ynk10
  • ynk10's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
Hi Denis,

Thank you very much for your useful example. I'm now able to add metadata on my survey and store them in a dedicated table.

Is there a way to include those metadatas in the surveys list view in administration panel in order to filter surveys using metadatas ?

In advance thank you for your answer

King regards
Yannick
The administrator has disabled public write access.

Survey attributes 2 years 1 month ago #110234

  • DenisChenu
  • DenisChenu's Avatar
  • Online
  • Moderator Lime
  • Posts: 9284
  • Thank you received: 1324
  • Karma: 384
Do own survey listing page.

Or contribute to LS core to add some plugin event in survey listing
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.246 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form