Hi, teracomp,
let me say something about your approach.
First two obvious things:
1. Of course you do the ranking only if two or more items were rated "5". At the end some ways of the relevance equation.
2. If only one item was rated "5", you should set the rank value of this item to "1",. Normally it fulfills the ranking criteria, but because of obvious reasons the ranking isn't done by the respondents.
Well, it's very clear and easy to follow by the respondents.
BUT: Did you think about the analysis?
Of course, I do not know the incidence of the "5"
Anyway, each of your items will have a different base in the ranking question.
If you calculate a mean of the rankings, what does it say?
Example:
Item 5 was rated "5" only twice, but each time ranked 1st. So the mean of this item is 1.00
Item 8 was rated "5" twenty times and the mean is 1.75
So, how will you compare?
A workaround is to distribute "dummy" ranks to all not ranked items, e.g. the mean value of all not used ranks, or maybe with consideration of the rating in the question before, some "weighted dummy ranks".
And last but not least four ways of a relevance setting to count the "5" ratings:
A1Q1 is the question code. And example with only 5 subquestions.
1. The longest, but easiest to understand:
{sum(if(A1Q1_SQ001==5,1,0),if(A1Q1_SQ002==5,1,0),if(A1Q1_SQ003==5,1,0),if(A1Q1_SQ004==5,1,0),if(A1Q1_SQ005==5,1,0))}
You sum up:
If the 1st subquestion is equal 5, you sum 1, else 0
If the 2nd subquestion is equal 5, you sum 1, else 0
...
2. The use of boolean expression
{sum(A1Q1_SQ001==5,A1Q1_SQ002==5,A1Q1_SQ003==5,A1Q1_SQ004==5,A1Q1_SQ005==5)}
Again you sum up.
And you know that a boolean comparison is equal 1, if true, 0, if false.
So again you sum up the five subquestion with each comparison has a value of 1 or 0.
3. Use of the function countifop
(Count the number of answered questions in the list which pass the criteria (arg op value))
{countifop('==',5,A1Q1_SQ001,A1Q1_SQ002,A1Q1_SQ003,A1Q1_SQ004,A1Q1_SQ005)}
You see the first two parameters, which say "equal" and "5".
Then the five subquestions.
4. Use of countifop and "that"
{countifop('==',5,that.A1Q1.NAOK)}
You count the appearance of "=5" in the whole question A1Q1.
(The 'that' variable is like the 'self' variable, but lets you refer to other questions.)
www.limesurvey.org/manual/Expression_Man....27that.27_variables
Beause I set the relevance in the next question I refer to the "other" question A1Q1
How to solve your current problem with the hidden rank items, I have not the least idea.
To be honest, my knowledge of JS is very limited. (very, very, very limited)
Best regards
Joffm