Closed alepore closed 10 years ago
Ok. Ill look at surveyor tonight and give it some thought. On May 21, 2014 11:45 AM, "Alessandro Lepore" notifications@github.com wrote:
This is my main concern because most of my questions uses group. Would like to discuss how this can be implemented, not sure how to start.
— Reply to this email directly or view it on GitHubhttps://github.com/kjayma/surveyor_gui/issues/7 .
Not a simple exercise. Here are my thoughts ...
From a ui perspective:
From a processing perspective:
Not sure yet how to do this, but I think it will involve some methods in the Question model, and maybe a new class to handle moving around question groups.
That's all I've got for now.
thanks for your thoughts! in general i think the question group logic should be hidden to the user in some way for complex groups like grids. your idea may work for simple groups like "put all those questions under the same name (group)".
looking at SM types.. i'll need to replicate those 3 "matrix" types (for the third i tweaked surveyor so it's actually custom stuff). i'm a bit worried :worried:
their UI for grid is actually very basic this can be a way for my grids... "simply" get data from textareas and then do all the hard work to build the correct stuff
Hmm, I like that. We could toss the add row buttons for building answers and do it the same way. Much simpler.
The approach you point to eliminates the issue of orphan question groups. So in this case, we build two new question_types in the Question model.
Alessandro, what kind of time constraints are you up against?
I think this would be easier to do if we switch the question builder to an Exhibit Pattern. If you can hang loose for a few days, I could whip something up.
i'm pretty short with time, need to do most of the work this weekend and next week
I did some work to be able to generate rows based on lines in a textbox. You can take a look at the answers_from_text branch.
Almost have grids working. Take a look at show_groups_in_surveyform branch.
good! looking at it right now.
noticed a problem: when i edit a grid question and close the box, also without changes, SurveyformsController#replace_question
does something wrong, rows disappear and i get a list of the column values.
Yeah, its not there yet. I'm going to get it green, but then I'm going to have to refactor some. Peeling back the onion, my original idea became a lot more complicated than I wanted.
bug report: create survey, add grid question, add another grid question: i get 10 grid questions and not 2
more in general, seems a good start to me! this is becoming good stuff. agree that this whole thing is inherently complex, refactor can be very important to avoid going crazy with the code. but i had not chance to take a deep look to the code yet.
Reproduced thie issue - will address it.
10 grid questions issue fixed and pushed.
thanks!!
Think this one is just about put to bed. Repeaters still outstanding.
bug report: if i add an "other" answer at question creation i get a text field on all answers. instead, if i edit a question and add an "other" answer, i get the text box only on that one (correct). tried with "Multiple Choice (only one answer)"
i'm not sure about that "Are you:" question from my seed file. That's two different questions (pick one AND a text field) grouped under the same title. there's a simple way to support that? or maybe it's better to ask the client create two separate questions...
but i have also those grids with a free text area at the end... i think is basically the "comment" here https://github.com/NUBIC/surveyor/blob/master/doc/question%20types.png
maybe just adding an optional, simple free text "comment" may solve ?
about Repeaters i don't know nothing (probably because i don't need them :smile:)
So there are two major items outstanding,
There's one more item that I'm not sure is worth supporting. This is the ability to add multiple possible answers to a single question, like the kitchen sink "Help me write an Improv sketch question". It has text fields for "who", "what", and "where". To me, this always seemed redundant with groups and potentially confusing.
I think you should take a look at your survey and rethink using logic. IMHO, its sometimes a better alternative to a group question. If your application may eventually go mobile, it would suck for the user to have to navigate a massive group question. Much simpler to ask them one question at a time and only show the other questions in the group if they apply.
not sure about the 1), i'll try to explain better: what i need is not a generic way of grouping different questions but "just" adding a comment field to some (both picks and grids). the comment is basically a single text question, i've read the word "comment" on that surveyor image.
for example what SM does is, when adding the "other" answer, asking if it has to be one of the answers or a separate one (comment). can work for me.
what do you think?
So would the comment be a single field at the bottom? Like this:
A B C
X Y Z Comment: __
?
yes, just a name (to be inserted) and a textarea.
if i'm not wrong is like what surveyor creates as response_class: :string, display_type: "hidden_label"
Need to play with surveyor a bit and see how it mixes grids with other questions into the same group. Would want to come up with a generic solution for this.
fixed this bug:
bug report:
if i add an "other" answer at question creation i get a text field on all answers.
instead, if i edit a question and add an "other" answer, i get the text box only on that one (correct).
tried with "Multiple Choice (only one answer)"
Comments working well for grid. Showing properly on surveyform for picks, however, will need slight customization to surveyor to suppress radio button - that's outstanding.
looks good! no problems so far. how do you suggest radio suppression? via JS or template?
Template - need to query the newly added attribute; is_comment attribute == false ? show radio button : hide radio button
grid dropdowns working. Missing a bunch ot tests and some stuff I need to get green again though.
added a columns model to support grids (not rows) which will need to be supported in Surveyor with some custom code in the views.
grid dropdowns looks very good, closing this
This is my main concern because most of my questions uses groups. Would like to discuss how this can be implemented, not sure how to start.