- Posts: 54
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to check if a question is answered and/or visible
- BBSR-SR5
- Topic Author
- Offline
- Senior Member
Less
More
4 weeks 15 hours ago #260130
by BBSR-SR5
How to check if a question is answered and/or visible was created by BBSR-SR5
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 6.5.2
Own server or LimeSurvey hosting: LimeSurvey Cloud
Survey theme/template: modified Fruity 23 Blueberry Template
==================
Hello everyone,
I'm working on a custom navigation menu (for an organisation survey). For this purpose I'm trying to find out if a question has already been answered.
The "normal" question index menu has the following code:
This seems to check wether a question has been opened but not answered ('index-item-unanswered'), if a question is the currently opened question ('index-item-current') and some other attribute I don't know ('index-item-error')
Is it possible to see if a question is actually answered?
Furthermore is it possible to see if a question is currently visible or filtered?
Your LimeSurvey version: Version 6.5.2
Own server or LimeSurvey hosting: LimeSurvey Cloud
Survey theme/template: modified Fruity 23 Blueberry Template
==================
Hello everyone,
I'm working on a custom navigation menu (for an organisation survey). For this purpose I'm trying to find out if a question has already been answered.
The "normal" question index menu has the following code:
Code:
{% for step, indexItem in aSurveyInfo.aQuestionIndex.items %} {% set statusClass = '' %} {% if attribute(indexItem.stepStatus, 'index-item-unanswered') is defined and attribute(indexItem.stepStatus, 'index-item-unanswered') == true %} {% set statusClass = statusClass ~ ' index-warning' %} {% endif %} {% if attribute(indexItem.stepStatus, 'index-item-error') is defined and attribute(indexItem.stepStatus, 'index-item-error') == true %} {% set statusClass = statusClass ~ ' index-danger' %} {% endif %} {% if attribute(indexItem.stepStatus, 'index-item-current') is defined and attribute(indexItem.stepStatus, 'index-item-current') == true %} {% set statusClass = statusClass ~ ' disabled' %} {% endif %} <li class="list-group-item {{ indexItem.coreClass }}"> <a href='{{ indexItem.url }}' data-limesurvey-submit='{{ indexItem.submit }}' class='dropdown-item {{ statusClass }}'> {{ indexItem.text }} </a> </li> {% endfor %}
Is it possible to see if a question is actually answered?
Furthermore is it possible to see if a question is currently visible or filtered?
Please Log in to join the conversation.
- Mazi
- Offline
- Official LimeSurvey Partner
3 weeks 4 days ago #260255
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic How to check if a question is answered and/or visible
To my knowledge there is also a class applied if all questions on a page have been answered. At least for LimeSurvey 5.x we developed a theme which indicates such a status (current/answered/not answered) at a colored question index.
If a question is visible or filtered is not indicated at the index.
If a question is visible or filtered is not indicated at the index.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Please Log in to join the conversation.
- BBSR-SR5
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 54
- Thank you received: 3
3 weeks 1 day ago #260315
by BBSR-SR5
Replied by BBSR-SR5 on topic How to check if a question is answered and/or visible
Hm, so it's always all questions on a page? No way to go through the questions individually to check?
Anyway, what's the class for "all questions answered"?
Anyway, what's the class for "all questions answered"?
Please Log in to join the conversation.
- Mazi
- Offline
- Official LimeSurvey Partner
3 weeks 1 day ago - 3 weeks 1 day ago #260322
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic How to check if a question is answered and/or visible
The index depends on the survey mode. If you run it group by group, each group is a list item.
I checked our theme with the colored index. For "all questions answered" there is no special class. But you can identify them anyway. It's the item which will NOT have a class "index-item-seen" and "index-item-unanswered":
I checked our theme with the colored index. For "all questions answered" there is no special class. But you can identify them anyway. It's the item which will NOT have a class "index-item-seen" and "index-item-unanswered":
Attachment not found
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Last edit: 3 weeks 1 day ago by Mazi.
Please Log in to join the conversation.