Questionnaire: share of improvement (IMHO)

Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Number of replies: 11
Picture of Core developers Picture of Plugin developers
In my personal opinion
specially for very long questionnaires
the current layout to choose questions to edit is not the best.
How can I remember that the button with label [38] is really about the particular question I want to edit?
and
even if I remember it, if I add one more question before the question 38, each question number increases by one, so, at the and, the possibility I really know what [38] means, is really nothing.

In order to solve this problem I made some modification to the editing page layout as shown in the picture.

It is really nice, in my opinion.
The surface of the web page doesn't grow with the number of question of the questionnaire and I get soon the information about the kind of question, about its text and about whether it is mandatory or not, even if I don't edit it.

Two more issues.
1. in my release I also added the use of alias for question number. My first question number may be 1 and my second question number may be 1.1 instead of 2.
In the patch I made, if is foreseen the use of the number alias.
If you start the name optional name of the field with the number alias and then you add a double colon, you get the number alias into the drop down menu list. If you don't use alias of number, they will be ignored.

2. The first time I used the questionnaire I was really in trouble. I didn't understand how to use it. This is the reason I made minor changes to this page too. Some string is missing in your language file, of course, but if you like this patch I can provide them in english.

If you like it, you can have it by applying the path I attached to the file questionnaire/questions.inc
Average of ratings: -
In reply to Daniele Cordella

Re: Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
I am sorry, I forget to tell you this patch if for Moodle 1.8, only
In reply to Daniele Cordella

Re: Questionnaire: share of improvement (IMHO)

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

Hi Daniele,

Thanks for your improvement suggestion. Please make an entry in the bugs tracker for this improvement, attaching your patch, as the tracker is the best place for such suggestions.

Your dropdown list of questions is a real improvement over the list of numbered buttons in the present questions editing interface.

However I'd like to point out that the Reordering Questions page already displays all the relevant information about existing questions, and from that page it is quite easy to click on the Edit button to immediately edit any question from the list. So your proposal is somewhat redundant and in fact does not save any number of clicks. It just makes the Edit questions page look less cluttered with buttons.

I see one potential danger with your proposed interface. When a question is selected from the drop-down list, the question displayed in the editing forms below does not necessarily correspond to that selection. The current question is only "updated" after the user has clicked the editquestion button. If a user is not careful, he may select a question from the dropdown list and click for example the deletecurrentquestion button, with the result that the question which will be deleted is not the question selected in the dropdown list but the question displayed in the edit forms below, which is a different question. Could you please change your proposal so that when a question is selected in the dropdown box the editquestion button is automatically clicked so that there is an exact match between the question selected in the dropdown list and the question actually displayed in the edit forms below?

Since this is a rather technical discussion, I think it should be continued in the bug tracker as soon as you have posted your bug/improvement report there.

Joseph

In reply to Joseph Rézeau

Re: Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Thank you Joseph.
I'll try to do all my best.
Have you any idea about how can I force the page reload at each drop down selection?
In reply to Daniele Cordella

Re: Questionnaire: share of improvement (IMHO)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Daniele "Have you any idea about how can I force the page reload at each drop down selection?"

Unfortunately no. If I knew how to do it I would have posted the solution. Hopefully someone (Mike?) will have the answer.

Joseph

In reply to Joseph Rézeau

Re: Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Ciao Joseph
waiting for Mike's support
I went to copy the idea from Moodle home page... the lang_menu works perfectly and looking at it with attention it is simple to understand the idea.

In spite of this I have a bigger problem.
If the user has javascript off from php code I have to evaluate this and I have to provide the solution I posted in my patch. (Page reload is provided by javascript) Which one is the wariable/routine I have to call in order to know whether the remote user has js enabled or disabled?

Thank you in advance.

In reply to Joseph Rézeau

Re: Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Ciao Joseph
as far as I can understand
I build what you asked.
It is attached.

PLEASE TAKE NOTE of what I posted before: I had the need to introduce the variable $jsisenabled and I tested it when that var is true and false.

That var should be defined on the basis of the remote user javascript status (enabled/disabled) but I still ignore where to find it.

Please help me.
wink
In reply to Joseph Rézeau

Re: Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Ciao Joseph.
This is the work.
The patch applies to last questionnaire for Moodle 1.8 and... if your javascript is activated it works, otherwise it works too. (In this second case it is as it was in my first release)
Try it.
Feature request was filed so... I feel I have done with this improvement.
Now it is up to you and Mike. Ciao
In reply to Joseph Rézeau

Re: Questionnaire: share of improvement (IMHO)

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
I like the idea a lot....

But, I'm also considering how we migrate this whole thing to the new 'formslib' (maybe we won't). I think the best way is to add a 'go' button next to the drop down and use it instead of a scripted 'onchange' (or implement the javascript hide of the 'go' button). We'd need to do the same for the other screens of course...
In reply to Joseph Rézeau

Re: Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
wow!!
tha patch correctly works on questions.inc for Moodle1.9... for free.
Nice to know.
sorpreso


If you are planning to adopt my patch... attached are the eng and ita lang files.

In reply to Joseph Rézeau

Re: Questionnaire: share of improvement (IMHO)

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
if the questionnaire is only one question long
the drop down menu is not able to let you select the unique question.
Problem solved.
Code fixed. Patch attached.