View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|10055||Feature requests||[All Projects] Expression Manager||public||2015-11-23 14:01||2018-11-01 16:22|
|Target Version||Fixed in Version|
|Summary||10055: Hide question if all sub-questions are hidden.|
LS 2.06 offers the great feature of hiding sub-questions conditionally. Unfortunately, if all sub-questions of a certain question are hidden by conditions, the question still shows up but without any items.
|Steps To Reproduce|
Take any error question and enter "0" at the relevance field for each sub-question.
While groups at which all questions are hidden are automatically skipped by Limesurvey, this doesn't apply to questions at which all sub-questions are hidden.
We don't have a FR for array_filter ?
More for 2.5 or 3.0 than 2.06 i think
Denis, I tested several different approaches using COUNT or SUM and SELF or THAT but none worked.
I'm silly :
QQ_Subq.relevanceStatus == (QQ_Subq.relevance && QQ.relevanceStus)
Buggy here ... with relevanceStatus ....
Can be done in event.
But : template related ? Adding it in a new function OR core related : adding it in existing function.
Start by adding it to template
... Only for 'view'/css/js : not for PHP.
Touch this is more complex in EM
Fix committed to answers_html branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=21299
Fixed in js in default template . Reopen for PHP/QUestion by question mode (or only one question in such group).
Is linked with another issue : .relevanceStaus for sub question + .relevance must give direct equation relevance (not group.relevance && question.relevance if i remind).
"Reopen for PHP/QUestion by question mode"
I bet it's going to be pretty hard. Do you yet have any idea about how to proceed?
@LouisGac : yes.
When we have it:
Need a lot of work and testing
I think this could be useful, in SurveyRuntimeHelper:
@LouiGac : linked with this feature ?
If i remind step is 0 indexed, and -1 is for "welcome page"
PS : about this issue :
But really : i don't think we must show it in Expresssion Manager file.
An alterantive solution can be :
@LouisGac maybe i can take a look next week : you work on twig next week ? If yes : i give it a try (working on EM mmmm !)
Is that issue fixed / feature added?
Really more hard to have a clean way in EM currently (relevanceStatus and relevance is broken)
ANd : if it's not set 'fixed' => it's not fixed
this bug will be very easy to fix in the twig, so I suggest to leave it as it is in 2.50.
Easy to fix in HTML : OK : "fix it if there other question in same page" .
BUT : this don't fix question by question mode .... if you have a question with all subquestion hidden : the 'step' still valid.
Current develop default template fix it too ....
well, that's should be a fix in the next step calculation.
<autoquote> Touch this is more complex in EM </autoquote> and step are managed by EM currently
something like this:
in SurveyRuntime Helper, here:
if ( question by question mode && all subquestion hidde )
Denis: I've just seen your comment about EM. I trend to consider SurveyRuntime as a controller and EM as a model.
To be more accurate, I bet that piece of pseudo code should work:
I think we should have:
Still relevant for LS 3.X? Subquestion relevance and array filter can end with everything hide.
@jelo : template-core.js have a solution for this. The real only issue (must) be in question by question mode.
I put must because : not tested since 3.X (not RC) release mean not really fixed (a lot of update are done in HTML and JS after answers_html work)
LimeSurvey: answers_html b15dba57
2016-11-08 01:58:32Details Diff
|New feature 10055: Hide question if all sub-questions are hidden (partial : not for question by question mode)
Dev: core or template issue ?
|mod - application/core/packages/limesurvey/survey.js||Diff File|
|mod - templates/default/scripts/template.js||Diff File|
|mod - templates/default/views/endpage.pstpl||Diff File|
|2015-11-23 14:01||Mazi||New Issue|
|2015-11-23 14:01||Mazi||Status||new => assigned|
|2015-11-23 14:01||Mazi||Assigned To||=> DenisChenu|
|2015-11-23 14:31||DenisChenu||Assigned To||DenisChenu =>|
|2015-11-23 14:31||DenisChenu||Project||Bug reports => Feature requests|
|2015-11-23 14:32||DenisChenu||Note Added: 33619|
|2015-11-23 14:32||DenisChenu||Status||assigned => new|
|2015-11-23 14:33||DenisChenu||Severity||@50@ => feature|
|2015-11-23 14:33||DenisChenu||Product Version||2.06+ => 2.05+|
|2015-11-23 14:33||DenisChenu||Target Version||2.06+ =>|
|2015-11-23 15:34||Mazi||Note Added: 33620|
|2015-11-23 16:08||DenisChenu||Note Added: 33621|
|2015-12-01 14:33||DenisChenu||Note Added: 33641|
|2016-11-06 19:43||DenisChenu||Assigned To||=> DenisChenu|
|2016-11-06 19:43||DenisChenu||Status||new => assigned|
|2016-11-06 19:44||DenisChenu||Relationship added||child of 11692|
|2016-11-06 19:44||DenisChenu||Tag Attached: answers_html|
|2016-11-06 19:44||DenisChenu||Target Version||=> 3.0|
|2016-11-06 19:45||DenisChenu||Note Added: 41736|
|2016-11-06 19:46||DenisChenu||Note Added: 41737|
|2016-11-07 19:29||DenisChenu||Relationship deleted||child of 11692|
|2016-11-07 19:29||DenisChenu||Relationship added||related to 11692|
|2016-11-08 01:59||DenisChenu||Changeset attached||=> LimeSurvey answers_html b15dba57|
|2016-11-08 01:59||DenisChenu||Note Added: 41766|
|2016-11-08 01:59||DenisChenu||Resolution||open => fixed|
|2016-11-08 01:59||DenisChenu||Assigned To||DenisChenu =>|
|2016-11-08 01:59||DenisChenu||Status||assigned => new|
|2016-11-08 02:00||DenisChenu||Resolution||fixed => open|
|2016-11-08 02:00||DenisChenu||Target Version||3.0 =>|
|2016-11-08 02:01||DenisChenu||Note Added: 41767|
|2016-11-14 15:52||LouisGac||Note Added: 41895|
|2016-11-14 15:53||LouisGac||Assigned To||=> LouisGac|
|2016-11-14 15:53||LouisGac||Status||new => assigned|
|2016-11-14 16:42||DenisChenu||Note Added: 41908|
|2016-11-14 16:42||DenisChenu||Note Edited: 41908||View Revisions|
|2016-11-18 14:50||LouisGac||Note Added: 42063|
|2016-11-18 15:03||DenisChenu||Note Added: 42064|
|2016-11-18 15:08||DenisChenu||Note Added: 42065|
|2016-11-18 15:08||DenisChenu||Note Edited: 42065||View Revisions|
|2016-11-19 01:09||DenisChenu||Note Added: 42069|
|2017-02-28 17:37||jelo||Note Added: 43105|
|2017-02-28 17:42||DenisChenu||Note Added: 43106|
|2017-03-01 14:51||DenisChenu||Relationship added||related to 12162|
|2017-03-02 10:37||LouisGac||Note Added: 43117|
|2017-03-02 10:42||DenisChenu||Note Added: 43118|
|2017-03-02 10:43||DenisChenu||Note Edited: 43118||View Revisions|
|2017-03-02 10:43||DenisChenu||Note Edited: 43118||View Revisions|
|2017-03-02 10:47||LouisGac||Note Added: 43120|
|2017-03-02 10:51||DenisChenu||Note Added: 43121|
|2017-03-02 11:01||LouisGac||Note Added: 43122|
|2017-03-02 11:08||LouisGac||Note Added: 43123|
|2018-01-25 22:24||jelo||Note Added: 46103|
|2018-11-01 16:22||DenisChenu||Note Added: 49503|