Welcome, Guest
Username: Password: Remember me

TOPIC: Condition on question in group by group visualization doesn't work

Condition on question in group by group visualization doesn't work 10 months 4 weeks ago #99285

Hi,
I have this problem that is similar to:
https://www.limesurvey.org/en/forum/design-issues/66204-condition-on-question-in-group-by-group-visualization-doesnt-work
but it supposed to be fixed now.

I created very simple survey where some questions within the same group should be displayed dynamically based on previous answers, but it doesn't work. All the questions are always displayed disregarding the conditions/relevance.

This is my survey logic:


This is what I get with group by group view:


The problem only occurs within one group (questions do not appear/disappear dynamically), because if I answer "No" for question G1Q1 in Group1 I go directly to Group3 question G3Q1 (Group2 is skipped, so its ok).

With question by question mode certainly everything is ok.
I don't know if it matters, but I noticed that "Previous" button doesn't work as well.
One more hint: if I go to Tools -> Expression Manager -> Unit Test Dynamic Relevance Processing then it works ok (questions are shown/hidden dynamically).

My LimeSurvey Version 2.00+ Build 130802. It was updated recently from 1.85+ (7253) where everything was ok.

Any idea what might be the problem (might it be PHP version or another component that is not up to date for 2.00+ release)?
:pinch:
Last Edit: 10 months 4 weeks ago by AndrzejKisiel. Reason: invalid screenshot links
The administrator has disabled public write access.

Condition on question in group by group visualization doesn't work 10 months 4 weeks ago #99286

PHP version is 5.2.6.dfsg.1-1+lenny3. All the installation checks were ok anyway.
I checked this survey in Firefox 17.0.1 and IE 8.0 - same problem.
The administrator has disabled public write access.

Condition on question in group by group visualization doesn't work 10 months 4 weeks ago #99287

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6192
  • Thank you received: 786
  • Karma: 238
Hi,

You have a javascript bug somwhere.

Better is to send us a link to test directly.

Denis
The administrator has disabled public write access.

Condition on question in group by group visualization doesn't work 10 months 4 weeks ago #99288

This is intranet server, so I cannot be publicly accessed. Should I check it via web developer tools in my web browser?
The administrator has disabled public write access.

Condition on question in group by group visualization doesn't work 10 months 4 weeks ago #99289

Ok, this is what I found .

When switching Yes/No radio button in the question G2Q1 "Do you want to see question G2Q2" following error is thrown on web browsers error console:
Time: 2013-08-23 15:13:18
Error: ReferenceError: $ is not defined
Source: konsolidator.nsn-intra.net/limesurvey/index.php/survey/index
Line: 104

Analysing page source it refers to this function:
function checkconditions(value, name, type, evt_type)
            {
                if (typeof evt_type === 'undefined')
                {
                    evt_type = 'onchange';
                }
                if (type == 'radio' || type == 'select-one')
                {
line 104 --->       $('#java'+name).val(value)
                }
                else if (type == 'checkbox')
                {
                    if ($('#answer'+name).is(':checked'))
                    {
                        $('#java'+name).val('Y');
                    } else
                    {
                        $('#java'+name).val('');
                    }
                }
                else if (type == 'text' && name.match(/other$/))
                {
                    $('#java'+name).val(value);
                }
Is it any helpful?
The administrator has disabled public write access.

Condition on question in group by group visualization doesn't work 10 months 3 weeks ago #99316

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6192
  • Thank you received: 786
  • Karma: 238
Hi,

Did you have {TEMPLATEJS} in your startpage.pstpl ?

Can you test with default template ?

Denis
The administrator has disabled public write access.

Condition on question in group by group visualization doesn't work 10 months 3 weeks ago #99318

Hi Denis,

I exported template default (default is also used in my survey) and here is the content of startpage.pstpl file:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>{SURVEYNAME}</title>
		<meta name="generator" content="LimeSurvey http://www.limesurvey.org" />
 
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}template.css" />
<!--[if lte IE 6]>
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_6.css" />
<![endif]-->
<!--[if IE 7]>
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<![endif]-->
<!--[if IE 8]>
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_8.css" />
<![endif]-->
 
<!-- The following CSS hides visual elements of the progress bar from screen readers. -->
		<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
		</style>
 
		<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
 
</head>
<body class="default">
<table width="75%" align="center" class="outerframe">
	<tr>
		<td>

I cannot see {TEMPLATEJS} but this line:
<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>

And the file template.js contains only two functions:
function focusFirst(Event)
function correctPNG()


Should it be the cause of my problem? How can I fix it?
Last Edit: 10 months 3 weeks ago by AndrzejKisiel. Reason: Added template.js info
The administrator has disabled public write access.

Condition on question in group by group visualization doesn't work 10 months 3 weeks ago #99319

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6192
  • Thank you received: 786
  • Karma: 238
Think there are a problem when you update the version.

1.85 to 2.0 is a big step.

1st : the default template HAVE {TEMPLATEJS} in startpage.pstpl. Look at ./template/default/startpage.pstpl. If you have a "default" template in your ./upload/templates : you have to delete it. github.com/LimeSurvey/LimeSurvey/blob/ma...ault/startpage.pstpl

2nd: replace the template.js line by {TEMPLATEJS}

3rd: there are more part to be updated in 1.85 to 2.0 (diffrence between 1.95 and 1.91) the start a new template with an inlcuded template is better.
The administrator has disabled public write access.
The following user(s) said Thank You: AndrzejKisiel

Condition on question in group by group visualization doesn't work 10 months 3 weeks ago #99324

I replaced whole ./template catalogue with files from the latest LimeSurvey release (as in your link).
Now everything is ok! :woohoo:

I have a suspicion that ./template catalogue was manually overwritten (by my colleague who was doing the installation) with old backup files after the installation of 2.0 version, so I am not going to report it as a bug.

Thank you so much for your prompt support Denis! LimeSurvey is a great project!
AndrzejK B)
Last Edit: 10 months 3 weeks ago by AndrzejKisiel. Reason: Icon changed to V
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.172 seconds
Donation Image