|Anonymous | Login||2016-07-23 23:10 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Repositories|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|06451||Bug reports||[All Projects] Survey design||public||2012-08-08 16:01||2012-08-16 10:23|
|Target Version||2.00RC9||Fixed in Version||2.00RC9|
|Summary||06451: Missing array filter edit boxes in Ranking Question|
|Description||See Issues: 6325[open] 6238[closed]|
There was a code change in 6238 which added the "R" to array QAttributes, in a few places in the common_helper.php -- which made it to the Yii branch with other changes.
That change is now gone, and RC8 doesn't allow for array filtering for ranking questions. See 6325. I assume, only, that ranking questions are intended to be array filtered in the LS UI.
See 200RC8: common_helper.php @ lines 3220, 3228 and 3236
I broke this one notation on 6325 out to this new issue, for if ranking can be array filtered, the "R"s could be re-added back, simply. I haven't checked to see if any other changes coded with 6238 are relevant.
|I will donate to the project if issue is resolved||No|
|LimeSurvey build number OR git commit ID||120803|
|Database & DB-Version||MySQL|
|Operating System (Server)||Win|
|Webserver software & version||XAMPP|
|Attached Files||limesurvey_survey_472317.lss [^] (469,090 bytes) 2012-08-14 00:45|
The array filtering for ranking questions in 1.92 was removed again, because there was no reliable cross-browser way to hide option entries in a list box.
However 2.0 uses a different approach to display items so it might work here.
Thomas, can you please have a look if this works with 2.0 if you reapply your patch?
|I tried array filter for ranking in 2.0 using Chrome, IE, and Firefox. It didn't work for any of them. I did not try to look at how Ranking is implemented in 2.0, just whether the relevance equations would properly control them with the simple fix.|
Uncommenting "case 'R':" in em_manager_helper.php will guarantee that EM generates the correct sub-question relevance equations. From there, someone else needs to figure out how to modify doDragDropRank() to get the visual behavior (having the option become invisible, regardless of whether it is in the selected or unselected lists.
Here is the code fragment from em_manager_helper.php that would need to be uncommented:
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)
$sgq = ((isset($this->qcode2sgq[$_caf])) ? $this->qcode2sgq[$_caf] : $_caf);
$fqid = explode('X',$sgq);
I rename "li" id for doDragDropRank.
I have to work on EM for this.
I can take it, but when i look the first time, there are some work.
I don't know if i rename doDragDropRank/li for em, or if i adapt em for doDragDropRank/li name.
hidden : display: none : it's OK
deactivated : Use : http://jqueryui.com/demos/sortable/#method-disable [^] not default EM disable.
Can either of the two of you point me towards the JS code which flops display:none to display:list-item for, say, multiple choice answers....
I see where qanda_helper.php creates the html code, but don't understand where the ID/Class is picked up for array swapping, during survey execution
edited on: 2012-08-09 20:58
I took a stab at fixing doDragDropRank, but didn't quite get it to work (and don't have any more time this week).
Here's what I think needs to be done:
(1) Make the IDs for ranking questions unique. Currently, they are 'choice_sq1', 'choice_sq2', etc. (assuming the sub-questions are sq1, sq2, etc. So, if you have ore than one ranking on the same page, the only way to access the right sub-question is via a compound jQuery selector (that selects the right question then the right sub-question). No other feature works that way, so I'd give the unique SGQA code names
(2) If you want to avoid having to change EM at all, name them 'javatbdSGQsq' where SGQ is the normal prefix (e.g. 111X22X33), and sq is the sub-question code (e.g. 'javatbd111X22X33sq4'). That is how all of the rest of the selectors are named.
I tried this. The drag and drop worked fine, but it didn't save its value or trigger any changed filtering (probably because it expects the current 'choice_sq' naming).
If you can safely change those li names, EM should make it work just fine (if you use .hide() - you may need to detect Ranking questions and use the sortable/#method-disable if authors want to disable rather than hide the option)
Done for id of the choice and rank list element.
Did you take EM ?
This doesn't quite work. One can use a ranking question to array_filter other questions; but ranking questions themselves are not array filtered.
Here is a sample survey letting you test the behavior.
Like i said : i put the same id than em used, not working on EM actually.
I ask if you want to work on EM or not.
|Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9350 [^]|
|Oups, sorry for javatb*d*SGQsq|
|Version 2.00 RC 9 released.|
LimeSurvey: Yii 3dfb41f4
Timestamp: 2012-08-13 21:07:32
Committer: Thomas White
|Fixed issue 06451: Missing array filter edit boxes in Ranking Question
Dev confirmed works with IE, Chrome, and Mozilla
|mod - application/helpers/common_helper.php|
|mod - application/helpers/expressions/em_manager_helper.php|
|mod - application/helpers/qanda_helper.php|
|2012-08-08 16:01||abita1||New Issue|
|2012-08-08 16:16||c_schmitz||Assigned To||=> TMSWhite|
|2012-08-08 16:16||c_schmitz||Status||new => assigned|
|2012-08-08 16:18||c_schmitz||Note Added: 20285|
|2012-08-09 06:26||TMSWhite||Note Added: 20297|
|2012-08-09 15:59||TMSWhite||Note Added: 20314|
|2012-08-09 15:59||TMSWhite||Assigned To||TMSWhite =>|
|2012-08-09 15:59||TMSWhite||Status||assigned => new|
|2012-08-09 18:00||DenisChenu||Note Added: 20318|
|2012-08-09 18:02||c_schmitz||Assigned To||=> DenisChenu|
|2012-08-09 18:02||c_schmitz||Status||new => assigned|
|2012-08-09 19:30||abita1||Note Added: 20320|
|2012-08-09 20:53||TMSWhite||Note Added: 20322|
|2012-08-09 20:58||TMSWhite||Note Edited: 20322||View Revisions|
|2012-08-13 19:07||DenisChenu||Note Added: 20395|
|2012-08-13 19:07||DenisChenu||Assigned To||DenisChenu => TMSWhite|
|2012-08-13 19:07||DenisChenu||Status||assigned => feedback|
|2012-08-14 00:44||TMSWhite||Note Added: 20399|
|2012-08-14 00:45||TMSWhite||File Added: limesurvey_survey_472317.lss|
|2012-08-14 01:42||DenisChenu||Note Added: 20405|
|2012-08-14 06:09||TMSWhite||Changeset attached||=> LimeSurvey Yii 3dfb41f4|
|2012-08-14 06:09||TMSWhite||Note Added: 20408|
|2012-08-14 06:09||TMSWhite||Resolution||open => fixed|
|2012-08-14 06:09||TMSWhite||Status||feedback => resolved|
|2012-08-14 06:09||TMSWhite||Fixed in Version||=> 2.00RC9|
|2012-08-14 10:06||DenisChenu||Note Added: 20416|
|2012-08-15 00:22||c_schmitz||Target Version||=> 2.00RC9|
|2012-08-16 10:23||c_schmitz||Note Added: 20460|
|2012-08-16 10:23||c_schmitz||Status||resolved => closed|
|Copyright © 2000 - 2016 MantisBT Team|