Max Forced Responses and !other option

Max Forced Responses and !other option

by Janet Smith -
Number of replies: 10
Hi,

The “Max. forced responses” limit setting and the !other option. According to the help file, if the
!other fill in the blank option has been created, then if it is checked by the respondent, it will count in the total of minimum/maximum required check boxes. But when I tested, “!other fill in the blank option” doesn’t count in the total of max required check boxed. For example, I set max number is Two. Then I chose two checkboxes, and I also checked and filled in Other textbox. But after I clicked on the submit button, I didn’t get any warning message. When I reviewed the submission result, I found all these three options showed up as the valid results. Can someone help me tweak the code to include the !other option in the Max Forced Responses?

Thanks!!

Average of ratings: -
In reply to Janet Smith

Re: Max Forced Responses and !other option

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Janet,
Unfortunately you do not say which version of Questionnaire you are using. On my Moodle 1.9 and version 1.9 of Questionnaire, I am not seeing the problem you mention, as you can see on attached screen shot.
Which type of database are you using on your Moodle (mySql, postgres...)?
Joseph
Attachment image00.jpg
In reply to Joseph Rézeau

Re: Max Forced Responses and !other option

by Janet Smith -
Hmmm... I did some more testing and I found that if I have 2 questions in my questionnaire both of which are checkbox type, both of which have the other option. If I set the max responses to 2 for each question and then in both questions I choose 2 checkboxes plus the other box, I do NOT get any error. But, if in one of the 2 questions I choose 3 checkboxes (that are not the other box) and then in the other choose 2 checkboxes and the other box, then I get an error on both questions.

It seems like if I choose more than 2 checkboxes (not including Other), I did get the error. But when I chose only two checkboxes and check “Other”/fill in the other textbox also, I didn’t get error which I supposed to get because Other field should be counted too.

Any ideas?


Attachment questionnaire_error.gif
In reply to Janet Smith

Re: Max Forced Responses and !other option

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Janet,
Thanks for the complete reporting. I will look into this matter as soon as I can.
Joseph
In reply to Joseph Rézeau

Re: Max Forced Responses and !other option

by Janet Smith -
Thanks Joseph. I look forward to your response. I'll be glad to test anything code changes you suggest. Just let me know how I can help. My school wants to use this feature in December, so hopefully we can find a fix before then.

Janet
In reply to Janet Smith

Re: Max Forced Responses and !other option

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Bug fixed in CONTRIB-884. Thanks for reporting.
Joseph
In reply to Joseph Rézeau

Re: Max Forced Responses and !other option

by Janet Smith -
Hi,

I saw that you had fixed it, so I downloaded and installed the new version. I tried the 1.8 and 1.9 versions. I don't see that the issue with the max responses is fixed. Perhaps I am doing something wrong? When I click submit with these responses, the questionnaire is accepted with no errors despite my having limited the max responses to 2 for each question.

Thanks for the quick fix, so sorry to bug you.
Attachment questionnaire_error.gif
In reply to Janet Smith

Re: Max Forced Responses and !other option

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Janet,
My fix works well on my 1.9 moodle local site. Do you have a live site where you could give me temporary access so I could test it? (e-mail me to the e-mail address in my profile page).
Are you sure you have downloaded the locallib.php fixed file.
It's first line is:
php 

In reply to Joseph Rézeau

Re: Max Forced Responses and !other option

by Janet Smith -
Ah, that is it. Actually I didn't get that version of locallib with any of the downloads I tried - "latest version", 1.9 or 1.8. Where can I get the up-to-date downloads? I got on dated 10/15 with all the downloads.
In reply to Janet Smith

Re: Max Forced Responses and !other option

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
The zipped latest versions are only available once a day, so my latest fix will be available sometime tomorrow. However, you can it just the fixed file by clicking on the link in my message above.