I've just implemented a simple model in my app, to create a survey. Simple question and some answer.
There is no need to be connected to answer the survey, but I want people to answer it just one time. How can I do that?
I don't know how to track this easily: IP, user agent etc. But these things can be easily changed. Any idea?
Related
Just to give you a brief, I'm working on a Chatbot, that will suggest the user some things, based on the answers of a few quetions. Now, most of the questions that the agent asks the user are in Yes/No and with a very little variation.
So here's the usercase:
The agent asks the user these two questions:
Did you have your meal(s) on time?
Did you work out today?
The answers to both these questions can be in a YES/NO.
In that case, if the user is asked the meal question and the user responds with a NO, the agent updates the parameter values for both the meal question as well as the workout question.
But that's something that I don't want.
I'm using the slot-filling technique here. Is there a way around this problem.
Here's my User Info Intent and the parameters that I have:
PS - I don't really want to create multiple intents for all these parameters and want to handle all these answers with just one intent
If the agent updates the parameter values for both the meal question as well as the workout question that means you're using the same parameter to host both answers, you need to use different parameters.
If would be very helpful if you shared how you have handled the dialog so far. And can I ask why do you want to use only one intent?
You can try creating a generic intent and setting both parameters as required, defining your questions as prompts for each parameter. That way the answers will be hosted in two different parameters.
How List manager works. Can you write a few pages describing how it works - walk through the processing starting with EN^VALM(List Template) and what TAG^ROUTINE it calls, where each input by the user and display by the system is created, where it can branch to and why.
This is a fairly complex question. Have you seen this documenation? http://va.gov/vdl/documents/Infrastructure/List_Manager/list_manager_developer.pdf
Also there is a group of VistA users here: https://groups.google.com/forum/#!forum/hardhats They would be much more likely be to answer your questions.
Best wishes.
My goal is to ask a series of questions. Kind of like flashcards. I have the questions in a table, and I can load them into a hash and ask them at random. The problem is that I want to be able to ask a particular question once per review session. The problem I have is that as soon as the page loads I lose the history and the hash resets to all the questions. How do you solve this using (just) Rails? I know the answer is probably "use JavaScript" but was wondering if it was possible using pure Rails.
One solution I thought of was creating a temp table and pulling all the questions there, and then deleting the question as soon as it's asked. Is that the best solution?
Just use rails session to store information about your survey between requests: http://www.justinweiss.com/articles/how-rails-sessions-work/.
I am looking to created a voting system for my site. I am having a little trouble deciding on how to model it.
At present I have models like so:
Group has many users
On each group page it will have the same question, for example:
"What feature would you like next?"
Each group would have a the same set of answers which can be voted on. I am going to use the Thumbs Up gem to allow answers to be voted on.
The amount of groups is extremely large, somewhere in the region of 5000.
I was thinking about modelling it like so:
Answer has many Responses
Response belongs to Group, Answer and is voteable (acts_as_voteable with Thumbs Up gem)
Could anyone give suggestions on how other wise model this questions and answers? For some reason this doesn't feel correct.
Essentially mutltiple groups will have the same question and answers except different poll results. I want to try and avoid creating a poll and questions for each group as this would result in over 100,000 records in the database.
Cheers
"Essentially mutltiple groups will have the same question and answers except different poll results. I want to try and avoid creating a poll and questions for each group as this would result in over 100,000 records in the database."
As I understood it you have Questions with a fixed set of Possible Answers, and you store the result in Response?
I would go with a 1:n relationship between Question and Answer,
and probably n:m between Group and Question, this way you can "reuse" Questions in multiple Groups.
my first entry here.
I'm trying to add a comment system to our Posts model. However, I am not sure of the best way to go about it for a number of reasons. I'd like the comment system to be similar to that on Forrst.com but i'd rather have visitors who comment not need an account as the site is our company site not a large community.
Outline of features are:
Visitor can comment on post, entering name, email and comment.
Our team members can comment, i'd like these to be styled differently so would like the system to know it was from one of our team, they will be logged into the system when leaving a comment.
Visitors and team members can reply to a comment. The system needs to know which comment it was in reply to.
Lastly i'd like the system to know if the comment was written by the post author.
I have looked and been trying out acts_as_commentable_with_threading which seems perfect except everyone needs a user account to leave a comment, something I am trying to avoid unless anyone has other thoughts on that?
I have also implemented this myself by creating a comments model and using awesome_nested_set for the threading. Within the comments model I have a user_id which is only populated if the user is logged in (meaning they must be a team member), this seems a little messy though.
Does anyone have any thoughts on this?
Oh, and I would love each person to be notified of a reply to their comment (if pos).
Thanks in advance.
There are lot of tools available to post comments and working with ruby on rails.
http://ruby-toolbox.com/categories/rails_comments.html
also you can customize according your own requirement instead of writing a messy code.
If you do not want to integrate a third-party service like Disqus, you have Juvia The Comments and Commontator. Also you can count with opinio as alternative. but only with Rails 3 and at the moment and as notice the development seems stalled.