Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

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

Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86272

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Hi LS expert,

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

LS_qs.jpg


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
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86289

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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.
Last Edit: 2 years 1 month ago by TMSWhite.
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86299

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
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
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86361

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Any one? any idea? please help.


LS_qs_2012-10-02.jpg
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86362

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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)
          {
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86410

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4356
  • Thank you received: 826
  • Karma: 381
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86428

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
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?


LS_qs_2012-10-03.jpg


Regards
Tze
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86431

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4356
  • Thank you received: 826
  • Karma: 381
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: isme_tze

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86433

  • isme_tze
  • isme_tze's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
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
Last Edit: 2 years 1 month ago by isme_tze.
The administrator has disabled public write access.

Re: Piping Ticked item from "Multiple question types in array" to ranking 2 years 1 month ago #86442

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4356
  • Thank you received: 826
  • Karma: 381
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.274 seconds
Donation Image