Welcome to the LimeSurvey Community Forum

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

Can user know if his IP address was saved?

  • follesi
  • follesi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 9 months ago #139558 by follesi
When creating a new survey, it is possible to record the IP address. As a user, can I know whether the survey I'm going to take will save my IP address or not? Suppose the survey creator doesn't mention anything.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #139594 by DenisChenu
Replied by DenisChenu on topic Can user know if his IP address was saved?
You're right : some kind of information can be register without clearly inform the user.

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.
More
7 years 8 months ago #139901 by halliballi123
Replied by halliballi123 on topic Can user know if his IP address was saved?
But the Question still stays. Is it possible to get the information in the survey and display that information?
e.g. I'd like to insert some kind of question like a text question and use expressionmanager to show the information if the survey is anonymously taken and if the IP address is stored.

Thanks in advance
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139905 by tpartner
Replied by tpartner on topic Can user know if his IP address was saved?
There are no Expression Manager placeholders for anonymous or IP address.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 8 months ago #139908 by halliballi123
Replied by halliballi123 on topic Can user know if his IP address was saved?
Is there any other chance to get that information. For example using the variables in the Template or are these variables the same like in Expression Manager?
The reason why I am asking is. I need to show different privacy policies depending on the way the survey results are stored (anonymous or not anonymous)
thanks
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139915 by tpartner
Replied by tpartner on topic Can user know if his IP address was saved?
I don't know of any direct way of getting that information but you could do it indirectly with JavaScript detecting the presence of the privacy message and adding a corresponding class to the welcome message so you could display an appropriate privacy message with CSS.

1) Modify welcome.pstpl something like this. Note that I have changed the .surveywelcome element from a <p> to a <div> (which I think should be done in all templates) and added a script to assign a anonymity-dependent class to that element.
Code:
<div class="row" id="welcome-container">
    <div class="col-sm-12 ">
        <h1>{SURVEYNAME}</h1><br />
        <p class='surveydescription text-info'>{SURVEYDESCRIPTION}</p>
    </div>
</div>
 
<!-- Survey Welcome -->
<div class="row survey-welcome">
    <div class="col-sm-12 ">
        <div class='surveywelcome'>
            {WELCOME}
        </div>
    </div>
</div>
 
<!-- Question number -->
<div class="row questions-number">
    <div class="col-sm-12">
        <p class="x-questions">{THEREAREXQUESTIONS}</p>
    </div>
</div>
 
<script type="text/javascript" charset="utf-8">     
  $(document).ready(function() {
    if($('.row.privacy').length > 0) {
      $('.row.survey-welcome').addClass('anonymous');
    }
    else {
      $('.row.survey-welcome').addClass('non-anonymous');
    }
  });
</script>

2) Add something like this to the end of template.css. It will hide the core privacy statement and display the appropriate element in the welcome message.
Code:
.row.privacy,
.survey-welcome.non-anonymous .privacy-anonymous,
.survey-welcome.anonymous .privacy-non-anonymous {
  display: none;
}

3) Add something like this to the welcome message. Note the different classes on th <p> elements.
Code:
<p class="privacy-anonymous">
  Some privacy statement for the anonymous survey...
</p>
<p class="privacy-non-anonymous">
  Some privacy statement for the non-anonymous survey...
</p>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 8 months ago #139962 by halliballi123
Replied by halliballi123 on topic Can user know if his IP address was saved?
Ok, that seems very helpful to me.
I did not know that limesurvey shows the privacy message only when the survey is not anonymous.

regards
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose