Dependency Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
11733 | Bug reports | Expression Manager | public | 2016-09-30 18:21 | 2020-03-13 18:46 |
Reporter | ecoutinho | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | reopened | ||
Product Version | 2.52.x | ||||
Summary | 11733: Multiple Choice: 'Please check at least one item' helper when minimum is two | ||||
Description | On a mandatory multiple choice question configured for two minimum answers, if you don't select any, you get conflicting help messages: | ||||
Steps To Reproduce | Create a Multiple Choice Question | ||||
Additional Information | On application/helpers/expressions/em_manager_helper.php, this code should also check the minimum answers: if (!($qInfo['type'] == '!' || $qInfo['type'] == 'L')) { | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 2.52+160920 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mariadb-5.5.50-1.el7_2.x86_64 | ||||
Server OS (if known) | Linux CentOS | ||||
Webserver software & version (if known) | Apache 2.4.6 | ||||
PHP Version | 5.4.16 | ||||
Can reproduce. Do we even need the message "Please check at least one item". It's not enough to have it show that it's mandatory? |
|
I think the message would be necessary if the question was not set up as mandatory, but with a minimum of one item. |
|
Further tests show that in this last scenario, it already presents the message 'Please select at least one answer', so the message 'Please check at least one item' is not necessary. Nevertheless, please notice that these tests were on a multiple choice question, but that 'if' statement is applied to every question, whose type is neither '!' nor 'L'. So, the message might be needed on other question types. It would be safer to check the minimum answers and produce a message which takes that number into account. |
|
One way to solve this is to query about question information in _ValidateQuestion, to see if there is a minimum number of answers. I'm not convinced I want to make that change - EM is cluttery enough. Any other ideas? |
|
You could also exclude case 'M' from printing the message. Or better yet, include only 'P', as is the one that is left: if ($qInfo['type'] == 'P') |
|
There could be a situation where the question is mandatory but there is no specific limit on how many. So the code has to check which message to choose. |
|
We redo some issue now ;). I think we must remove the 'default tip' in some condition. The old system are here :https://github.com/LimeSurvey/LimeSurvey/blob/2.06lts/application/helpers/qanda_helper.php#L171 2 solution :
Think 1. is better when we move all this system to specific Question(model|attribute) wher another attrivute can updarte string of another attribute. I can do it for 2.5X on 3.0 only if you want. |
|
Denis, you're the one with the most experience of the Expression Manager, so if you think 1 is better, let's go for one. I like 2, because it kept everything in a single logic, and it "would" probably make refactorisation easier. But we're not here for now. I have only one question: you reopened this bug, but for me, it seems resolved in 2.50 with the fix of #11867, did you reopen only to leave the note, or does this bug still happen? Else, if it's fixed it 2.50, we can let it like that. In 3.0, use solution 1 if you want. I'd like to move to twig today, so I prefer not spend to much time in redoing debugging again and again. |
|
I reopen the bug : because original bug is : Multiple choice show 2 errors Actual bug is Then the original bug happen again now with just some difference in sentence. :). OK for 2 , but really unsure for refactorisation . |
|
I think I cheked Denis, and it's no more showing "Please check at least one item. Also... that was before we changed eqn to 1 for default |
|
See https://bugs.limesurvey.org/file_download.php?file_id=8790&type=bug |
|
ok so it's the "eqn => 1" that did it again. |
|
Just about refactorisation :
:) .... Always hard to find the best way. |
|
This version of LimeSurvey is not longer supported. Please check so that the issue is fixed in a more recent version of LimeSurvey. If it's not, please reopen this bug report. Thank you. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2016-09-30 18:21 | ecoutinho | New Issue | |
2016-09-30 18:21 | ecoutinho | File Added: limesurvey_survey_531176.lss | |
2016-09-30 18:23 | ecoutinho | File Added: multiple_choice.PNG | |
2016-10-04 12:35 | ollehar | Note Added: 41083 | |
2016-10-04 13:10 | ecoutinho | Note Added: 41090 | |
2016-10-04 13:30 | ecoutinho | Note Added: 41093 | |
2016-10-14 12:34 | ollehar | Assigned To | => ollehar |
2016-10-14 12:34 | ollehar | Status | new => assigned |
2016-10-14 12:51 | ollehar | Note Added: 41349 | |
2016-10-14 12:51 | ollehar | Priority | none => normal |
2016-10-14 12:52 | ollehar | Assigned To | ollehar => |
2016-10-14 12:52 | ollehar | Status | assigned => new |
2016-10-14 12:52 | ollehar | Status | new => acknowledged |
2016-10-14 16:18 | ecoutinho | Note Added: 41357 | |
2016-10-14 16:30 | ollehar | Note Added: 41358 | |
2016-12-09 17:04 |
|
Assigned To | => LouisGac |
2016-12-09 17:04 |
|
Status | acknowledged => resolved |
2016-12-09 17:04 |
|
Resolution | open => fixed |
2016-12-09 17:04 |
|
Note Added: 42505 | |
2016-12-10 18:32 | DenisChenu | Status | resolved => feedback |
2016-12-10 18:32 | DenisChenu | Resolution | fixed => reopened |
2016-12-10 18:32 | DenisChenu | Note Added: 42516 | |
2016-12-10 18:33 | DenisChenu | File Added: 2.57_system.png | |
2016-12-12 10:09 |
|
Note Added: 42519 | |
2016-12-12 10:42 | DenisChenu | Note Added: 42520 | |
2016-12-12 11:20 |
|
Note Added: 42521 | |
2016-12-12 11:39 | DenisChenu | Note Added: 42522 | |
2016-12-12 11:41 |
|
Note Added: 42523 | |
2016-12-13 08:46 | DenisChenu | Note Added: 42527 | |
2020-03-13 18:46 | c_schmitz | Note Added: 56455 | |
2020-03-13 18:46 | c_schmitz | Status | feedback => closed |