Piping Ticked item from "Multiple question types in array" to ranking

Plus d'informations
il y a 5 ans 2 semaines #86272 par isme_tze
isme_tze a créé le sujet : Piping Ticked item from "Multiple question types in array" to ranking
Hi LS expert,

I am a LS newbie. I have no problem following "Multiple question types in array" code show here and create questions like follow. I have 2 different question groups for 2 different categories.



However, my questions is I want to use the "Ticked" items from both question groups into ranking system (only rank top 5 from x ticked items from both groups). Now I am stuck.

Can someone please help?

Your help is much appreciated.

Regards
Tze
Pièces jointes :

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines - il y a 5 ans 2 semaines #86289 par TMSWhite
TMSWhite a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
In version 2.0, you can use the array_filter advanced question option to pipe your checked products to rankings. The attached survey (also found in the /docs/demosurveys directory of your installation) shows many permutations of using various source question types to filter other question types, including ranking.


ls2_array_filter_tests.lss


Version 1.92 supports the same degree of filtering with one exception - ranking questions. Because of the way the JavaScript is implemented in 1.92 for ranking, it is not possible to filter it consistently across all browsers, so using array_filter within ranking questions is disabled in 1.92.
Dernière édition: il y a 5 ans 2 semaines par TMSWhite.

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86299 par isme_tze
isme_tze a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
HI TMSWhite,

Thanks for you prompt reply. sorry i forgot to mention that i am using LS Version 1.92+ Build 120405. I dont have admin right on LS. Furthermore, EM is disable due to unknown reason.

Can you please re-attach the Array Filter test .lss file again?

Regards
Tze

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86361 par isme_tze
isme_tze a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
Any one? any idea? please help.


Pièces jointes :

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86362 par TMSWhite
TMSWhite a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
You can't do this in 1.92 - that feature has been disabled due to cross-browser incompatibilities (if memory serves, it works for Firefox or Chrome, but not for IE).

However, it does work "out of the box" in version 2.0 using array_filter.

If you want to patch your 1.92installation to have it work there (for the few supported browsers), un-comment line 1102 in /classes/expressions/LimeExpressionManger.php. It is the line:
//   case 'R': //Ranking

within this block of code:
  case 'P': //Multiple choice with comments checkbox + text
  case 'K': //MULTIPLE NUMERICAL QUESTION
  case 'Q': //MULTIPLE SHORT TEXT
//   case 'R': //Ranking
//      if ($this->sgqaNaming)
//      {
          foreach ($cascadedAF as $_caf)
          {

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86410 par tpartner
tpartner a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
With a little tweaking you may be able to use this workaround - docs.limesurvey.org/Workarounds%3A+Manip...ith_Multiple-Options

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86428 par isme_tze
isme_tze a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
Thank for pointing out the workaround, tpartner. Will that work on my situation since all answer items show in the Demo is in the same question, whereby for mine, each item is a separate question.

I have not performed any programming for a long long time, since basic lauguage (and I don’t know how to program in LS). However, based on the javascript syntax display in all workarounds, in logical thinking, I come up with this conceptual logic as follow. conceptually I believe it should work. However, I need help with this, can you please help?




Regards
Tze
Pièces jointes :

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86431 par tpartner
tpartner a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
I think if you use the "FOR FILTER AND RANKING QUESTIONS ON SEPARATE PAGES" method of the workaround you can filter the multiple-choice question on page 2 by all of the multiple-choice questions on page 1. The "Array filter" setting allows for several question codes.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Les utilisateur(s) suivant ont remercié: isme_tze

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines - il y a 5 ans 2 semaines #86433 par isme_tze
isme_tze a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
Hi tpartner,

Thank you very much for you help. Do you have the Demo code (lss "FOR FILTER AND RANKING QUESTIONS ON SEPARATE PAGES") that i can try?

Another thing that I would highlight is that I am NOT the LS admin and I cant change any setting on LS. I cant even use LS EM due to unknown reason.

Regards
Tze
Dernière édition: il y a 5 ans 2 semaines par isme_tze.

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86442 par tpartner
tpartner a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking

Do you have the Demo code

You can find the code in the workaround - docs.limesurvey.org/Workarounds%3A+Manip...ith_Multiple-Options

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86446 par isme_tze
isme_tze a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
Dear tpartner,

Once again, thank you very much for your prompt reply. I did have a close inspection on the code that you have suggested, however, it seems that this workaround only work on one question group (whereby I will need to pipe and combine two question groups). How do I combine ticked items from both Question Groups into the same ranking question?

By the way, do you have the LS exported structure file (.lss) for "FOR FILTER AND RANKING QUESTIONS ON SEPARATE PAGES"? I might be able tweak it if I can have a bigger picture.

Regards
Tze

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86447 par tpartner
tpartner a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking

How do I combine ticked items from both Question Groups into the same ranking question?

Please see my previous comments about using several question codes in the array filter setting.

Attached are the Demo survey and template.

Fichier attaché :

Nom du fichier : limesurvey...0-04.lss
Taille du ficher :43 ko


Fichier attaché :

Nom du fichier : default_ra...lter.zip
Taille du ficher :48 ko

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Pièces jointes :

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 2 semaines #86450 par isme_tze
isme_tze a répondu au sujet : Piping Ticked item from "Multiple question types in array" to ranking
i really dont think it work for me as i cant edit the template.js file. without editing the template.js file, this is what i got from the lss file.










looks like i am hitting a brick wall.

anyway, i still appreciate your help, tpartner.

wish me good luck and hope to come up with a workaround......
Pièces jointes :

Connexion pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant