Survey settings inheritance
From LimeSurvey Manual
This documentation will give you an overview how the inheritance process of survey settings works in Limesurvey software.
Database tables for inheritance
- Table surveys_groups There is one default group in table “survey groups” with the gsid=1 and name=”default”. This is the group from which a new created survey and a new created survey group inherit from. All other survey groups that could be created by the user are stored in this table too. The next screenshot shows the process of creating a new survey with "default group" selected. Every new created survey belongs to a group. When no special group is selected it belongs to the default group, inheriting all settings from that group. The next screenshot shows the default group from which a new created survey and a new created survey group inherit from.
- Table surveys_groupsettings Here we save all group settings. There is a relation to table survey_groups (1:1). The table "survey_groupssettings" has two basic entries (inserted to DB on installation):
- gsid = 0: There is no entry in table surveys_group that is related to this. Example attribute: save ip address “ipaddr” = ‘N’. That are the values the software starts with.These values are the global survey settings.
- gsid: 1 “insert settings for default survey group” (save ip address “ipaddr” = ‘I’ ) ‘I’ means inherit the behaviour from gsid=0
- Table surveys Every survey belongs to one group. The attribute “gsid” from this table is the relation to that group in table surveys_group.All settings are, in first step, inherited by a group (when not changed, it's the default group)and the attribute is set to “I”. All survey settings could be changed and will then not be part of inheritance (for the single attribute that has changed)anymore.
Creating a survey group
A survey group can be created like this:This will produce a new entry in surveys_groups (gsid=X) and a new entry in surveys_groupsettings (gsid=X) all values that are set to “I” are inherited from the surveys_groupsettings (gsid=1) and the “real” values come from gsid=0. In this case no "Parent group" is selected.
Creating a survey group with parent group
This is an option to easily create a new survey group copying some specific settings from another group (and/or having a parent group to change all child groups easily) Not selecting a parent group means: you can change your new created group and it will not be effected by changes in other groups.
- Survey gets active Before a survey gets active, you always have a special menu to review and change some settings for the survey: So as you can see here, there is no “inheritance” to select anymore. You can only select “Yes” or “No” for those values (attributes). This is really important because the whole process of running/participating a survey depends on this values NOT being set to “I” (inheritance) anymore.The result, when activating the survey, is that these values will loose inheritance. Will those settings go back to “I” (inheritance) when
- survey expires → no values stay “Y” or “N”
- survey gets deactivated → no values stay “Y” or “N”
- Result: Inheritance is lost after activating a survey. Of course the user could set the values back to inheritance manually.
- Special setting usecaptcha This attribute (setting) in table "surveys" and "surveys_groupsettings" is a value for three values (registration, survey access, save&load) at once. The value has the following meaning (copied from method ‘saveTranscribeCaptchaOptions’ documentation): Transcribe from 3 checkboxes to 1 char for captcha usages
- 'A' = All three captcha enabled
- 'B' = All but save and load
- 'C' = All but registration
- 'D' = All but survey access
- 'X' = Only survey access
- 'R' = Only registration
- 'S' = Only save and load
- 'E' = All inherited
- 'F' = Inherited save and load + survey access + registration
- 'G' = Inherited survey access + registration + save and load
- 'H' = Inherited registration + save and load + survey access
- 'I' = Inherited save and load + inherited survey access + registration
- 'J' = Inherited survey access + inherited registration + save and load
- 'K' = Inherited registration + inherited save and load + survey access
- 'L' = Inherited survey access + save and load
- 'M' = Inherited survey access + registration
- 'O' = Inherited registration + survey access
- '1' = Inherited survey access + inherited registration
- '2' = Inherited survey access + inherited save and load
- '3' = Inherited registration + inherited save and load
- '4' = Inherited survey access
- '5' = Inherited save and load
- '6' = Inherited registration
- 'N' = None