No Duplicate Choices sometimes doesnt work

No Duplicate Choices sometimes doesnt work

by Zeid Fanous -
Number of replies: 22

Hi All, 


I am currently using the questionnaire module with Moodle 3.6. I built a questionnaire with a "No Duplicate Choices" option and it works fine but sometimes i am able to click two option from the same coloumn as shown in the pic below. any idea whats going on ? Thank you smile 


Average of ratings: -
In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -

BUMP. Anyone ? 

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

This should not happen.

Please post here the complete data of your question (as per attached screenshot).

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Zeid,

When you say "sometimes i am able to click two options from the same coloumn", what does "sometimes" mean? Does it mean that all of your rate questions in a questionnaire work as expected most of the time, but sometimes you are able to click 2 radio buttons in one column for some of the questions ? Or do you mean that only some of the questions do not behave as expected all the time?

In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -

Hey Joseph, 


Thank you for your reply.


Its happening with all rated scale questions.. below are my settings.

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks for the info, again this should not happen. Could you export a sample questionnaire and attach the xml file to your reply so I can test it?

Have you tried it on different browsers? Which Moodle theme are you using? Have you tried a standard theme such as Boost? Which exact versions of Questionnaire and Moodle are you using?

In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -

Thanks Joseph for your prompt reply


I am currently using Moodle 3.5.3 with Boost and Questionnaire version 3.5.2 (Build - 2018120100). I am using Chrome and have tried on Edge with same result.

Attached is a backup file of the questionnaire.  im not sure hot to export the questions .


Thank you in advance for all your help

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I could reproduce this bug which seems to have gone un-noticed for a number of years! It happens if - instead of clicking on the radio button itself (2) you click anywhere else on the clickable zone to its right or to its left.(1)

I hope Mike, the plugin maintainer will be able to fix this bug.

In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -

Thanks Joseph,


I will also have a developer loool at it if you don’t mind as I am in urgent need of this feature, will try to fix and get back to you smile .

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

"I will also have a developer loool at it if you don’t mind"

That's fine. I have posted an issue on Mike's github here: https://github.com/PoetOS/moodle-mod_questionnaire/issues/176. If your developer finds a solution I suggest they post it there.

In the meantime you might inform your end-users that they should make sure they click on the radio button itself, not besides it. But of course a better solution will have to be found.

Thanks for pointing to that bug anyway.wink

In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -

Thanks Joseph, 


We should be done with it by monday or tuesday. Will test it out and post it on the github link. 

Thank you for your followup.

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -

Hey Jospeh, 


alright, attached are two files which need to replace the following:-


mod/questionnaire/templates/question_rate.mustache

mod/questionnaire/classes/question/rate.php


one being for the rated scale question issue and the other is for fixing an alignment issue when langauge is Arabic. 


We tested it out and it seems to be doing the job, let me know what you think.

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Zeid,

I can confirm that your change in question_rate.mustache does fix the bug. Please pull a request for it on Mike's github so he can integrate it.

And open a new issue/pull request for your change for Arabic in rate.php.

Thanks!

In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -
Hi Joseph


could you tell me how to do that.. this is my first time doing such thing. smile 

In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Zeid,

If you are not familiar with the github procedures it's not easy to explain in a few words. Since your fixes are really minimal, only a few lines of code (and you have attached the files to your previous message), I expect that will be enough for the plugin maintainer, Mike, to fix things up when he reads this discussion and when he has the time to do it.

In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Zeid Fanous -

alright great, 

my first real contribution.. it feels great smile 

In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

I commented on the issue on Github. Looks like it needs a Javascript fix.

Looking at your mustache fix, it does work. I'll use it for now, but I think ultimately there needs to be a better overall fix. Your fix is the right one for the code's current state.

Regarding the alignment issue, I will need a more detailed description of the problem in a Github issue (preferably) before I can accept a fix.


In reply to Joseph Rézeau

Re: No Duplicate Choices sometimes doesnt work

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

Clicking in the table cell, rather than only directly on the button, was a usability issue that was requested by many users. Clicking on the cell was implemented in 3.5.1 as can be seen in the release notes:

Rate question usability improvements, specifically a mouse click on table cell selects the radio button as well.

If there is a lot of objection to this, an issue will need to be raised to undo it, and then we will need votes to confirm it. At this point, I don't plan to undo that change.


In reply to Zeid Fanous

Re: No Duplicate Choices sometimes doesnt work

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Guys, this problem still exists. Moodle 3.6.2 and latest Questionnaire module installed.

I also noticed this problem can be created by clicking on the choice, holding the mouse-button and moving your mouse a bit. Then release the button.

I could still check all same choices...

In reply to Richard van Iwaarden

Re: No Duplicate Choices sometimes doesnt work

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

The issue has been fixed in the MOODLE_35_STABLE and MOODLE_36_STABLE branches on github. If you want the fix, you'll have to get it from there. It will be available in the next release as well, which is due pretty soon.

Average of ratings: Useful (1)