Questions not shown after equation is in question group

Más
1 mes 3 semanas antes #191513 por larissabruebach
Hello,

so I'm relatively new to LimeSurvey. I will try to explain the issue as good as possible.

I have 4 different categories of question groups (for 4 emotions: happy, sad, angry, neutral). Each of these categories should consist of 15 question groups. A question group consists of a video and questions about that video that will be displayed after the video is finished.

I do not want to show each participant all 15 question groups of one category. I would like randomly select 4 of each categoery. But I want ALL question groups to be mixed and not show one category after the other.

What I have come up with so far ist the following:
I have an equation "question" that should function as a counter (e.g. happyCounter).
This counter should be incremented by one after a video from the category "happy" is shown.
In the relevance equation I check if this counter is smaller than 4. If this is the case the question group should be shown, if not it will not be shown.

It seems like this is working. BUT I can't see my questions anymore. I know they're there, because I can't continue, when it contains a non-skippable question. It seems like they are just not displayed.

I hope anyone can help with this. Attached you can find a small Demo project.

Thanks! :)
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

LimeSurvey Partners
Más
1 mes 3 semanas antes #191521 por jelo

larissabruebach escribió: I do not want to show each participant all 15 question groups of one category. I would like randomly select 4 of each categoery. But I want ALL question groups to be mixed and not show one category after the other.)


So you have 4 topics. Each topic has 15 Questionsgroups. Each question group consists of a Video and a few questions). You want to show 4 questions groups per topic. And you want the order of topics mixed.

I don't see in your lss export how you randomly select the questionsgroups you want to show.

The first equation, where you want to assign 0 to happy is not assigning 0, but {0}.
If you check happy==0 the result is FALSE cause happy is {0} instead of 0.

An approach which might work would be to assign the 15 questiongroups of one topic to one Randomization group and then try to show only 4 of the 15 via a workaround like this here:
www.limesurvey.org/forum/can-i-do-this-w...lect-question-groups

Randomization group: To start randomizing a question group, enter a string into the field such as randgroup1. You will need to enter that same string in all question groups that you want to randomize and which will then appear in a random order when taking the survey. Only places inside the same group will be randomly switched!


I don't get your approach, but if you fix the first equation to assign 0 to happy instead of {0} you might can show us how your solution is working. Deutsche Elemente in der Umfrage sind kein Problem.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191532 por larissabruebach

I don't see in your lss export how you randomly select the questionsgroups you want to show.

As for now I only have one group, because the general concept is not working. That's why I only have one for now.

The first equation, where you want to assign 0 to happy is not assigning 0, but {0}.
If you check happy==0 the result is FALSE cause happy is {0} instead of 0.

If I write happy = 0 in the equation nothing happens and I cannot use happy as a variable (e.g. change it) in a later equation. If I just write 0 I can at least use the variable in later equations.
If I put the equations in a seperate question group everything works just fine. But as I want it to be randomized, it needs to be in that questiongroup or else it'll be missing.

I attached a new .lss where my solution works, but ONLY when I increment my counter (happy) in a new questiongroup.

Alternativ question: Is there a way to ensure that one questiongroup comes after a specific other questiongroup?
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191533 por jelo

larissabruebach escribió: If I write happy = 0 in the equation nothing happens and I cannot use happy as a variable

I suggested to write 0 instead of {0}. In your new LSSexport you did that and the variable has now a number instead of text assigned as a value.


I still don't get your concept and where you are heading. But I might learn.
Let's say you implement a group randomizing and the groups are then displayed in a random order.

If you then want to increment happy when viewing a group you cannot just assign a value to happy. You need really to increment happy.

When you use
happy= 1
, you don't increment happy, you assign happy the value 1.

Increment would be:
happy = happy+1

That would the equation in every question group.

If you then have a relevance to show a question group only when happy is below a threshold you can might continue to develop your concept.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191536 por larissabruebach

I suggested to write 0 instead of {0}. In your new LSSexport you did that and the variable has now a number instead of text assigned as a value.

Thanks! I now just wrote 0 and it works like before

Increment would be:

happy = happy+1

This doesn't work for me. When I use this I just get text and it does not compute anything. When I write {happy = happy +1} in the first equation I get 2 and in the second one 6.

That would the equation in every question group.

The problem is putting this equation in the question group. When it's in a separate question group it works just fine. As soon as it's in the same question group I can't see my questions (e.g. they're not shown, but they're there).

If you then have a relevance to show a question group only when happy is below a threshold you can might continue to develop your concept.

This is what I'm going for actually. Thanks for your help and quick replies! :)

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191538 por jelo

larissabruebach escribió: This doesn't work for me. When I use this I just get text and it does not compute anything. When I write {happy = happy +1} in the first equation I get 2 and in the second one 6.


First: I don't write copy and paste code. I just wanted to point out, the difference between increasing a variable by one and assigning a value.


happy=0
Group5 happy=happy+1 (happy has value 1)
Group3 happy=happy+1 (happy has value 2)
Group7 happy=happy+1 (happy has value 3)
etc..

And on all groups you want to have a relevance rule to be only shown when happy is below a threshold.

We ignore the fact that you have four topics.

Please attach your new LSSexport and state what exact version of LimeSurvey you use.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191539 por larissabruebach

And on all groups you want to have a relevance rule to be only shown when happy is below a threshold.

That's what I have for the important question groups.

We ignore the fact that you have four topics.

That is fine for now as this is not the real issue here.

The issue is that I can't use an equation in a question group. When I use an equation in a question group the question group is shown, but there are no questions. The code hasn't changed from my previous post.
We can also ignore the fact that I'm not incrementing, but assigning the value for now.

I use Version 3.17.2

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191543 por jelo

larissabruebach escribió: The issue is that I can't use an equation in a question group. When I use an equation in a question group the question group is shown, but there are no questions.


Create a new survey with just two groups. Try to reproduce the issue there again.
The issue you state is "If you place an equationtype question with other questions inside a group, the questions inside the group are not shown.

If I try your latest LSS-export where do you get the first empty group?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191547 por larissabruebach
So I created a test survey.
There are 3 question groups that contain questions.

The first display is the counter. (counter = 1)
Then it should show the first question group with one question and one equation. BUT there is only the button "next", NO question or equation. (relevance equation counter == 1) (sets counter = 2)
The second question group does not contain an equation and the question is shown. (relevance equation counter == 2)
In the next group I set the counter in an equation within a group with no other questions. (counter = 3)
The ThirdQuestionGroup does not contain a counter and is shown as it's supposed to. (relevance equation counter == 3)

This shows that the assigment of the counter variable works.

Does this help with understanding the problem?
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191550 por jelo

larissabruebach escribió: Then it should show the first question group with one question and one equation. BUT there is only the button "next", NO question or equation. (relevance equation counter == 1) (sets counter = 2)


The "FirstQuestionGroup" has a relevance "counter == 1"
Inside "FirstQuestionGroup" you set counter=2, which will then hide the group (counter no longer 1).

It's working correctly. You need to take into account that the relevance is checked constantly.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191555 por larissabruebach

It's working correctly. You need to take into account that the relevance is checked constantly.


In this case shouldn't it work when I set the relevance equation to counter == 1 and then set the counter within the group to 1? As far as I can see it doesn't.

I don't really understand why it comiles the code within first and then checks the relevant equation.
If it checks constantly it should realize that it is now true.

I'm sorry, but this seems really odd to me.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes #191559 por jelo
Constantly is not the correct term. If you use ExpressionManager code, the code is evaluated via PHP and Javascript.
PHP is serverside. JS is clientside. You expect a pure serverside evaluation which would only be triggered again when going to the next questiongroup. But the revelance is checked browserside too. So when you change the counter inside the questiongroup the relevance of the whole questiongroup gets 0 and the content is hidden via Javascript.

If you think that is a bug or want a different behavior, you can open a bug report or feature request.

If you have the feeling, I got something wrong, let's wait for input from other users.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 3 semanas antes - 1 mes 3 semanas antes #191562 por tpartner
I also think that this is working as expected.

In the first group, "counter" is set to 1 - this allows (via relevance) the second group and its questions to be shown. BUT, in the second group you have an equation question that immediately sets "counter" to 2, hiding both itself and the first question in that group.

In fact, if you look carefully, you can see a brief flash of those questions before they are hidden.

larissabruebach said: In this case shouldn't it work when I set the relevance equation to counter == 1 and then set the counter within the group to 1? As far as I can see it doesn't.

This also does work as far as I can see. If I change the equation question in the second group to "counter = 1", both questions are shown in that group.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Última Edición: 1 mes 3 semanas antes por tpartner.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

¡Comenzar ahora!

Simplemente cree una cuenta y comience a usar LimeSurvey hoy mismo.

Registrarse ahora
¡Únase a nuestro boletín informativo!

Iniciar sesión