- Posts: 21
- Thank you received: 2
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
ensure privacy settings
- bewi
- Topic Author
- Offline
- Junior Member
Less
More
5 years 4 months ago #176431
by bewi
ensure privacy settings was created by bewi
How can I determine that surveys always have special settings about privacy
These settings should be applied to every survey at least by default at creation.
The best would be if no admin could change it later.
Code:
Save IP address: [ ] Save referrer URL: [ ] Google Analytics settings: None Anonymized responses: [x]
The best would be if no admin could change it later.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
5 years 4 months ago #176446
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic ensure privacy settings
There is currently no way to assign settings as a default or enforce settings to certain usergroups.
Modifying the php code of your LimeSurvey installation looks not like a sustainable solution.
Modifying the php code of your LimeSurvey installation looks not like a sustainable solution.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago #176459
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic ensure privacy settings
enforce can be done easily with some php in a plugin.jelo wrote: There is currently no way to assign settings as a default or enforce settings to certain usergroups.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- bewi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 2
5 years 4 months ago #176461
by bewi
Replied by bewi on topic ensure privacy settings
can you give an example?
I'm not very familiar with limesurvey and it's plugins
I'm not very familiar with limesurvey and it's plugins
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago #176499
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic ensure privacy settings
gitlab.com/SondagesPro
else : extensions.sondages.pro/about/contact.html or www.limesurvey.com/customization
else : extensions.sondages.pro/about/contact.html or www.limesurvey.com/customization
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 4 months ago #177317
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic ensure privacy settings
Tested (and working)
Code:
public function beforeSurveySave() { $oSurvey = $this->getEvent()->get('model'); $oSurvey->anonymized = 'Y'; }
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- bewi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 2
5 years 3 months ago #177579
by bewi
Replied by bewi on topic ensure privacy settings
Finaly I got that simple plugin. But only from documentation I would be lost. So great thanks to DenisChenu.
the plugin consists of one simple file (AnonOnly.php) in the plugin folder (AnonOnly/).
This will set each survey as anonymized on each saving. Starting from creating to each edit. An admin could change the field/checkbox in the edit form to 'N', but on save it is set again.
There is a loophole as you could change the value in the database itself, but that needs far more rights.
the plugin consists of one simple file (AnonOnly.php) in the plugin folder (AnonOnly/).
Code:
<?php class AnonOnly extends \LimeSurvey\PluginManager\PluginBase { static protected $name = 'AnonOnly'; static protected $description = 'forces all surveys to be anonymized'; public function init() { /** * Here you should handle subscribing to the events your plugin will handle */ $this->subscribe('beforeSurveySave'); } public function beforeSurveySave() { $model = $this->getEvent()->get('model'); $model->anonymized = 'Y'; } }
This will set each survey as anonymized on each saving. Starting from creating to each edit. An admin could change the field/checkbox in the edit form to 'N', but on save it is set again.
There is a loophole as you could change the value in the database itself, but that needs far more rights.
The following user(s) said Thank You: DenisChenu, tpartner
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 3 months ago - 5 years 3 months ago #177587
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic ensure privacy settings
I think you can do same with other settings too :
googleanalyticsstyle github.com/LimeSurvey/LimeSurvey/blob/e3...odels/Survey.php#L81
ipaddr github.com/LimeSurvey/LimeSurvey/blob/e3...odels/Survey.php#L48
refurl github.com/LimeSurvey/LimeSurvey/blob/e3...odels/Survey.php#L49
Else : you can hide it with another plugin adding a script in admin part, or create an admin template to hide it with CSS.
If user have access to database : he can deactivate any plugin … then … o even update config if it's done via LimeSurvey core …
googleanalyticsstyle github.com/LimeSurvey/LimeSurvey/blob/e3...odels/Survey.php#L81
ipaddr github.com/LimeSurvey/LimeSurvey/blob/e3...odels/Survey.php#L48
refurl github.com/LimeSurvey/LimeSurvey/blob/e3...odels/Survey.php#L49
Else : you can hide it with another plugin adding a script in admin part, or create an admin template to hide it with CSS.
If user have access to database : he can deactivate any plugin … then … o even update config if it's done via LimeSurvey core …
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 3 months ago by DenisChenu.
The topic has been locked.
- bewi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 2
5 years 3 months ago #178208
by bewi
Replied by bewi on topic ensure privacy settings
now I added this plugin into another instance and in the moment I want to enable the plugin I received an error:
Have I removed one line too much?
or a file?
I started with the AuditLog plugin. Based from that I deleted the line
in the main class.
Also I removed the file 'mdlAnonOnly.php' which was an adapted version of 'mdlAuditLog.php'.
Both changes were done in the dev installation and no error occurred.
500: Interner Serverfehler
CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value
Have I removed one line too much?
or a file?
I started with the AuditLog plugin. Based from that I deleted the line
Code:
protected $storage = 'DbStorage';
Also I removed the file 'mdlAnonOnly.php' which was an adapted version of 'mdlAuditLog.php'.
Both changes were done in the dev installation and no error occurred.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
5 years 3 months ago #178234
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic ensure privacy settings
Strange, LimeSurvey version difference ?
This one : www.limesurvey.org/forum/development/117...vacy-settings/178208
Must be OK in all 3.X version, for previous version, just remove \LimeSurvey\PluginManager\
This one : www.limesurvey.org/forum/development/117...vacy-settings/178208
Must be OK in all 3.X version, for previous version, just remove \LimeSurvey\PluginManager\
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.