Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Ranking questions in Limesurvey 2

Ranking questions in Limesurvey 2 1 Jahr 2 Monate her #99900

  • pksupport
  • pksupports Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 34
  • Dank erhalten: 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. . .
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Ranking questions in Limesurvey 2 1 Jahr 2 Monate her #99906

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6551
  • Dank erhalten: 868
  • Karma: 257
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Ranking questions in Limesurvey 2 1 Jahr 2 Monate her #99930

  • pksupport
  • pksupports Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 34
  • Dank erhalten: 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 ;-)
Anhang:
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Ranking questions in Limesurvey 2 1 Jahr 2 Monate her #99967

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6551
  • Dank erhalten: 868
  • Karma: 257
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.
Letzte Änderung: 1 Jahr 2 Monate her von DenisChenu.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: pksupport

Ranking questions in Limesurvey 2 1 Jahr 1 Monat her #100049

  • pksupport
  • pksupports Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 34
  • Dank erhalten: 1
  • Karma: 0
Great thanks Denis. I reset the conditions on the survey before I exported it.
Letzte Änderung: 1 Jahr 1 Monat her von pksupport.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Ranking questions in Limesurvey 2 1 Jahr 1 Monat her #100050

  • pksupport
  • pksupports Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 34
  • Dank erhalten: 1
  • Karma: 0
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: DenisChenu

Ranking questions in Limesurvey 2 1 Jahr 1 Monat her #100054

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6551
  • Dank erhalten: 868
  • Karma: 257
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Ranking questions in Limesurvey 2 1 Jahr 1 Monat her #100068

  • pksupport
  • pksupports Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 34
  • Dank erhalten: 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!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Ranking questions in Limesurvey 2 1 Jahr 1 Monat her #100070

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6551
  • Dank erhalten: 868
  • Karma: 257
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.162 Sekunden
Donation Image