search for: questions

Displaying 20 results from an estimated 105164 matches for "questions".

Did you mean: question
2006 Apr 26
7
Not updating
...39;edit'' flash[:notice] = "Edit failed" end end Awnser.rhtml <h1>Awnsering question</h1> <%= start_form_tag :action => ''update'', :id => @question %> <p><%= @question.question %></p> <p><label for="questions_awnser">Awnser</label><br/> <%= text_area ''questions'', ''awnser'' %></p> <%= submit_tag ''Awnser'' %> <%= end_form_tag %> It flashes that it works but it really dosn''t change the question.awn...
2007 Nov 10
2
Problem with view spec - works inside the browser but spec fails with nil object
...figure it out why. Here''s the spec that generates the error (the "it" block should test some tags inside the "response" object): require File.dirname(__FILE__) + ''/../../spec_helper'' describe ''/survey/show'' do fixtures ''questions'', ''alternatives'' before(:each) do assigns[:configurations] = {:survey_name => ''Whatever''} assigns[:questions] = Array.new assigns[:questions][4] = questions(:faixa_etaria) @faixa_etaria = questions(:faixa_etaria) end it '...
2006 Apr 20
1
Rails is losing key information
I am using ruby 1.8.4 with rails 1.0 under fedora core 3 on a WIntel platform. Rails appears to be losing key information under some circumstances. Specifically, in the Questions class that follows, the presentation_id property is apparently being lost. The STDOUT dump from the create method indicates that the presentation_id should be 42, but the dump from the database shows that it is 43, which is the same as the explanation_presentation_id Any ideas? Is this a known b...
2006 Mar 15
7
Populating text_tag with serialized data
I am using a serialized attribute in one of my models The serialized data is in the form of an array. I want to have a text_tag for each element contained in my serialized attribute. How would I construct the text_tag? My model name is ''questions''. The serialized attribute is "answers" So I might have: <% form tag %> <% text_tag ''question'', ''name'' %> <% text_tag ''question'', ''answers[0]'' %> <% text_tag ''question''...
2011 Jul 11
2
Pre-populating association
Hello, I think this is an easy one for the average Rails developer but I''m a bit stuck. I''m creating a simple voting app: any user can create a survey, with any number of questions, and other users can then vote by creating a ballot for that survey. Here''s the modeling: class Survey < ActiveRecord::Base has_many :questions has_many :eligibilities has_many :ballots accepts_nested_attributes_for :questions, :allow_destroy => true attr_accessible :...
2006 Jan 19
8
Passing variables across forms
I''ve been reading my Agile Dev book over and over again, but I can''t wrap my head around how to do this. There''s a question and answer portion site of my site. You begin the process by adding a question to the database. After that, the program should redirect you straight to adding an answer for that question. The problem is, I don''t know how to keep
2006 Apr 03
15
How should I pick a random entry from the database?
...;ve got a database table - real simple: question, answer, and id fields - and I want to pick one question out randomly and output to the HTML page. Right now I can''t even get single entries out - all I can do is copy and paste from the scaffolding, so it''s every question or no questions at this point. I''m not sure if you can put the value into a variable, like ''@question'', and then print that, or if i have to do something like make @question into an intermediary object, like ''question'', and then do something like ''question.q...
2006 May 02
10
[OT]: Asking questions on this list
Hi List, it appears that for the third or fourth time now, I''ve asked a question that nobody seems to respond to. Other questions (often things that could quite easily have been extracted by searching with Google or from api.rubyonrails.org) are answered almost momentarily. I''ve to admit I''m more than a little frustrated by this, so have to ask myself if it was my own fault that none of these questions was...
2005 May 18
2
R -SQL
Hello, I've got a problem in a sql query! for(j in 1:length(criteria$Title)) { graphe_par<-sqlQuery(channel,"select q.type,crit.Title, r.Value from criteria crit, reply r,question_reply qr, question q, question_criteria qc, form_question fq where qr.reply=r.ID and qr.question=q.ID and qc.question=q.ID and crit.ID=qc.criteria and fq.question=q.ID and fq.form=4 and
2012 Oct 06
0
rails 3.2 question/answer with a through table
I have a person has many questions through person_questions. I have an extra column in the join table for the answer. The section below works for a new submit but when I edit I get 3 each with the first 2 of each selected tand the third not so I get 6 check boxes some selected some not. Is there a way to get this to work pro...
2006 Mar 19
2
Functional Testing
Hey all, I have a many-to-many relationship (Questions has_and_belongs_to_many Answers), and when I destroy the Question (the one) I also destroy all the Answers (the many). Since the following doesn''t seem to work for has_and_belongs_to_many: class Question < AR::Base... has_and_belongs_to_many :answers, :dependent => :destroy end...
2006 Apr 23
4
Penalties of using an eval on every request
...ot;Welcome to a test of the new interviewing system." q2 = Question.new "q2" q2.quote "Do you like pie?" q2.single 1 => "Yes", 2 => "No" q2.validation_block = Proc.new { [1,2].include? @interview.answers["2"] } questionnaire.questions.concat [q1, q2] -- Real-life questionnaires can be thousands of questions long! How horrible would it be if I initialized the questionnaire.questions object, on each request, by reading survey.rb from disk and evaling it? Thanks for your time! - Mike -- Posted via http://www.ruby-forum.com/.
2009 Dec 15
1
R question type in Moodle
Moodle (www.moodle.org) is an open source course management system, a competitor to Blackboard. I am writing several hundred R questions that will be used within the quiz module in Moodle. Unfortunately, Moodle does not have a built in question type for R. You can read about the different questions types in Moodle here: http://moodle.org/mod/data/view.php?d=13&perpage=40&search=Question+Type&sort=0&order=DESC&ad...
2006 Apr 01
0
Okay, what gives? find_by_id is failing.
...cord.find_by_id method to identify the parent object (Quiz) to tie to the child object (Question) at create time. Here is the stdout log: 127.0.0.1 - - [31/Mar/2006:22:43:22 CST] "GET /question/new? parent_quiz=ff2d7022-be0a-11da-9f01-00400506faf5 HTTP/1.1" 200 806 http://localhost:3000/questions?parent_quiz=ff2d7022- be0a-11da-9f01-00400506faf5 -> /question/new?parent_quiz=ff2d7022- be0a-11da-9f01-00400506faf5 ------------------------------ Parent = nil ------------------------------ Parent should be = ff2d7022-be0a-11da-9f01-00400506faf5 127.0.0.1 - - [31/Mar/2006:22:43:2...
2004 Jun 29
2
Numbers as symbols
I want to use question numbers from my survey data (fake data below) as markers in a scatterplot. I'm using "as.character" to convert question numbers to characters. However, plot truncates the 0 (zero) off of question 10. How can I get the ending zero so I can add questions 11 - 20? # Sample code below Question <- c(1,2,3,4,5,6,7,8,9,10) Performance <- c(3.5,3.6,3.7,3.8,3.9,4,4.1,4.2,4.3,4.4) Importance <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.99) Survey <- data.frame(cbind(Question,Performance,Importance)) nums <-as.character(Question) plot(Perfo...
2006 Jul 01
4
Radio_button in loop problem
Hi all, I can''t figure out why my radio_buttons won''t reflect the values stored in my database. I read through some of the previous posts -- is it true that they don''t work with integers? This is the code I''m using: <% for question in @survey.questions %> <%= debug question %> <%= radio_button ( "question", :question_id, question.option_one.id) %> <%= question.option_one %> <%= radio_button ( "question", :question_id, question.option_two.id) %> <%= question.option_two %> <% end...
2009 Dec 11
1
Sources for open sourced homework questions for R?
Hi, I am teaching a one month class in applied statistics and want to bring my students up to speed in R without devoting much/any lecture time to R instruction. I think that the best way to do this is to provide them with a lot of R questions for homework. These questions would be numerous (there is a lot of material to cover), go from very simple to somewhat complex, and focus on all the commands and options that will be useful in applied work. Here are some of my initial questions: ------------------------ Q: Load the data from the c...
2003 Dec 20
6
draft of posting guide
...I've left out most HTML formatting (except for headings) to make it readable -- I'll insert that later (to conform with the style on the other pages at r-project.org.) I've placed "???" in places where feedback is specifically needed. <h2>Posting Guide: How to ask good questions that prompt useful answers</h2> * Remember that R is free software, constructed and maintained by volunteers. They have various reasons for contributing to R, but often have limited time. Remember that no one owes you anything, and if you rude or disrespectful in your questions, yo...
2011 Feb 13
4
A Math question
Dear all, I admit this is not anything to do R and even with Statistics perhaps. Strictly speaking this is a math related question. However I have some reasonable feeling that experts here would come up with some elegant suggestion to my question. Here my question is: What is sum of all Integers? I somewhere heard that it is Zero as positive and negative integers will just cancel each other out.
2006 Apr 02
2
"Quiz" site
Hi, I am thinking about how to best design a quiz site in RoR. I think it should be fairly easy, but have run into a wall. In the simplest form, the view would grab all of the questions for a particular quiz and display them (e.g. multiple choice, so 4 option buttons per question). However, I can''t figure out how to "mark" the quiz. The form is submitted to the controller, which must somehow work out whether each one is correct. Perhaps each option group c...