Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Ranking questions in Limesurvey 2

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #99900

  • pksupport
  • Portrait de pksupport
  • Hors ligne
  • Junior Lime
  • Messages : 34
  • Remerciements reçus 1
  • Karma: 0
I have been gradually moving projects to a new install of LS Version 2.00+ Build 130802. I have a registration form with a ranking question - pick ten schools out of 255. Works fine in 1.92; will not work in 2.00 No matter what I do, there is no next button after this question (even though it's not the last question).
Is it just me, or does the ranking in v2 seem slow and clunky compared to v1?

So - is there a limit on the number of choices for a ranking question? So far I have managed to get 160 answers. . .
L'administrateur a désactivé l'accès en écriture pour le public.

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #99906

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6471
  • Remerciements reçus 854
  • Karma: 254
Hi,

Can you send the lsg file ? (and tell us the language of the survey).

If you deactivate javascript : did you see the select/option ?

Ranking is now done "no javascript" compatible and use jqueryui.sortable. You can use your own script, but i think there are less PHP operation.

Denis
L'administrateur a désactivé l'accès en écriture pour le public.

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #99930

  • pksupport
  • Portrait de pksupport
  • Hors ligne
  • Junior Lime
  • Messages : 34
  • Remerciements reçus 1
  • Karma: 0
Thanks for the reply Denis. Just the question itself ok? (attached)
Survey is English. I can get 160 ranking answers to work and it doesn't seem to matter which answers I choose. I tried various methods of inserting them. Turned off Javascript (lost calendar) actually, no question appears at all. The survey stops at the branch before the ranking question, no Next or Submit. I can send you the whole survey or URL, prefer not to post.

This works in v1.92 (including those handy little red scissors we love ;-)
Pièces jointes :
L'administrateur a désactivé l'accès en écriture pour le public.

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #99967

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6471
  • Remerciements reçus 854
  • Karma: 254
OK,

Found the problem.
Seems LS 2 don't take into account the "max response" when construction the HTML page.
You have a lot of answers, in 1.92: only 10 input are created. We have to do the same think in LS2.

Please fill a bug report with an lss file
(your lsg file is a pity, because there are condition, filter etc, and need to be fixed before testing ..)

Denis
PS: please put the bug numbre and link here, and knock me by Private Message for the link.
Dernière édition: il y a 1 an 1 mois par DenisChenu.
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: pksupport

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #100049

  • pksupport
  • Portrait de pksupport
  • Hors ligne
  • Junior Lime
  • Messages : 34
  • Remerciements reçus 1
  • Karma: 0
Great thanks Denis. I reset the conditions on the survey before I exported it.
Dernière édition: il y a 1 an 1 mois par pksupport.
L'administrateur a désactivé l'accès en écriture pour le public.

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #100050

  • pksupport
  • Portrait de pksupport
  • Hors ligne
  • Junior Lime
  • Messages : 34
  • Remerciements reçus 1
  • Karma: 0
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: DenisChenu

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #100054

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6471
  • Remerciements reçus 854
  • Karma: 254
Fix is here:
github.com/LimeSurvey/LimeSurvey/commit/...1f225cf4bf97123b873d

And maybe you can update the javascript too, because seems difficult to choose with "sortable" system. Please give ot a try.

Another function can be:
in template.js:
function doDragDropRank(qID, showpopups, samechoiceheight, samelistheight) {
    var hintTextDefault="All your answers must be different.";
    $("#question"+qID+" .questionhelp").not("#vmsg_"+qID).remove();
    $("<div id='vmsg_"+qID+"_alldifferent' class='questionhelp'>"+hintTextDefault+"</div>").prependTo($("#vmsg_"+qID));
    checkAllRankDifferent(qID);
  $('#question'+qID+' .select-item select').change(function(e){
    checkconditions($(this).val(),$(this).attr("name"),'select-one','onchange');
    checkAllRankDifferent(qID);
  });
}
function checkAllRankDifferent(qID){
    var selectedVals = new Array();
    var uniqueVals = new Array();
    $('#question'+qID+' .select-item select').each(function(){
        var selectedvalue=$(this).val()
        if(selectedvalue!=""){
            selectedVals.push(selectedvalue);
            if(jQuery.inArray(selectedvalue,uniqueVals)<0){
                uniqueVals.push(selectedvalue);
                }
            }
    });
    if(selectedVals.length==uniqueVals.length){
        $("#vmsg_"+qID+"_alldifferent").removeClass("error").addClass("good");
    }else{
        $("#vmsg_"+qID+"_alldifferent").removeClass("good").addClass("error");
    }
    //console.log(selectedVals==uniqueVals);
}

Denis
L'administrateur a désactivé l'accès en écriture pour le public.

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #100068

  • pksupport
  • Portrait de pksupport
  • Hors ligne
  • Junior Lime
  • Messages : 34
  • Remerciements reçus 1
  • Karma: 0
qanda_helper.php is a winner Denis. Could not get the template.js working will try again tomorrow :-Q

Thank you so much for your time and expertise. Keen to have this going so very happy!
L'administrateur a désactivé l'accès en écriture pour le public.

Ranking questions in Limesurvey 2 il y a 1 an 1 mois #100070

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6471
  • Remerciements reçus 854
  • Karma: 254
Yes, but in your survey : it's very difficult to view all avalaible choose.

sortable seems not appropriate here ...

You can use your own function doDragDropRank but have to find the best.
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.135 secondes
Donation Image